Live data from Hacker News

I found a useful Git one liner buried in leaked CIA developer docs

spencer.wtf

171–180 of 273 posts

Re: I found a useful Git one liner buried in leaked CIA developer docs

#171
post #30

The main issue with `git branch --merged` is that if the repo enforces squash merges, it obviously won't work, because SHA of squash-merged commit in main != SHA of the original branch HEAD. What tools are the best to do the equivalent but for squash-merged branches detections? Note: this problem is harder than it seems to do safely, because e.g. I can have a branch `foo` locally that was squash-merged on remote, but…

I have the same issue. Changes get pushed to gerrit and rebased on the server. This is what I have, though not perfected yet. prunable = "!f() { \ : git log ; \ target=\"$1\"; \ [ -z \"$target\" ] && target=$(git for-each-ref --format=\"%(refname:short)\" --count=1 refs/remotes/m/); \ if [ -z \"$target\" ]; then echo \"No remote branches found in refs/remotes/m/\"; return 1; fi; \ echo \"# git branch --merged shows m…

if you're using gerrit then you have the Change-Id trailer you can match against?

Re: I found a useful Git one liner buried in leaked CIA developer docs

#172

Earlier quoted context omitted.

At Meta, when this mass push for the rename happened across the industry, a few people spent nearly the full year just shepherding the renaming of master to main, and white box/black box to allowlist/blocklist. This let them claim huge diff counts and major contributions to DEI and get promos.

Same at my org at the time, blacklist was nixed, no matter how many times the question, "What color is ink on a page?" was brought up.

Seems like a bad faith question, unfortunate that it was asked multiple times. Blacklist is derived from a definition where black means "evil, bad, or undesirable". When you say that ink is black, you're using a different definition, which relates to color. I don't know if I see the objection to blackbox, which uses a definition of "unknown". Personally, I think the harm is small but I look to people of color for guidance and prefer the more descriptive deny-list where I can. Cuts down on possible confusion for non-native English speakers too.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#173

I use `master` in all my repos because I've been using it since forever and it never has once occurred to me "oh shit I better change it to `main` this time in case `master` may offend somebody some day. Unfortunately, that's the last thing on my mind when I'm in programming mode. Now that everything is `master`, maybe it is just a simple git command to change it to `main`. But, my fear is it'll subtly break somethin…

Im just tuning out of the whole master vs main discussion. I use whatever is the default branch name of my current project OR what git init gives me. When / if git init produces a default branch named main, i'll use that.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#174

I use `master` in all my repos because I've been using it since forever and it never has once occurred to me "oh shit I better change it to `main` this time in case `master` may offend somebody some day. Unfortunately, that's the last thing on my mind when I'm in programming mode. Now that everything is `master`, maybe it is just a simple git command to change it to `main`. But, my fear is it'll subtly break somethin…

> But, my fear is it'll subtly break something and I just don't have enough hours left in my life to accept yet unknown risk that it'll cost me even more hours, Yeah, it's not like 99% of the world has already switched from master to main already (without any major problems) ...

You'll find CI/CD automation probably needs to be updated. (Triggering different actions when merges to the default branch happen, or perhaps just deployments.)

These are the kinda local things that the parent was probably referring to.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#175

I use `master` in all my repos because I've been using it since forever and it never has once occurred to me "oh shit I better change it to `main` this time in case `master` may offend somebody some day. Unfortunately, that's the last thing on my mind when I'm in programming mode. Now that everything is `master`, maybe it is just a simple git command to change it to `main`. But, my fear is it'll subtly break somethin…

At Meta, when this mass push for the rename happened across the industry, a few people spent nearly the full year just shepherding the renaming of master to main, and white box/black box to allowlist/blocklist. This let them claim huge diff counts and major contributions to DEI and get promos.

This is why diffs / LoC is a terrible metric. It shows nothing other than a willingness to push large changesets upstream.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#176

I use `master` in all my repos because I've been using it since forever and it never has once occurred to me "oh shit I better change it to `main` this time in case `master` may offend somebody some day. Unfortunately, that's the last thing on my mind when I'm in programming mode. Now that everything is `master`, maybe it is just a simple git command to change it to `main`. But, my fear is it'll subtly break somethin…

not on your mind, yet you found the time to write this comment

are you sure this is about time/breaking and not "being told how to think"?

Re: I found a useful Git one liner buried in leaked CIA developer docs

#177
post #158

Earlier quoted context omitted.

Also, git's "master" branch is named after a master recording or master copy, the canonical original from which duplicates are made. There is literally no reason for it be offensive except for those who retroactively associate the word with slavery.

Nope, the term comes from bitkeeper which does refer to master/slave. See this email for some references: https://mail.gnome.org/archives/desktop-devel-list/2019-May/...

I'm fully on-board with not using master-slave terminology. I work in the embedded space where those terms were and still are frequently used, and I support not using them any more. But I've been using git pretty much since it was released and I've never heard anyone refer to a "slave repo" or "slave branch". It's always been local repo, local branch, etc. I fully believe these sorts of digital hermeneutics (e.g. using a 26-year-old mailing list post to "prove" something, when actual usage is completely different) drive division and strife, all because some people want to use it to acquire status/prestige.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#178
post #150

Earlier quoted context omitted.

Depends. If I was the one coming up with the implementation anyways, it's basically just the "coding" part that was replaced with "fingers hitting keyboard" and "agents writing to disk", so reviewing the code certainly is faster, you just have to "check" it, not understand it from scratch. If we're talking receiving random patches where first you have to understand the context, background and so on, then yeah I agree…

> you just have to "check" it, not understand it from scratch. How can you "check" that which you don't "understand"? > I'm not sure that's how professionals use LLMs right now I'm a professional and I can tell you how I use LLMs: I write code with their assistance, they don't write code for me. The few times I let Claude or Copilot loose, the results were heartbreaking and I spent more time reviewing (and then disca…

> How can you "check" that which you don't "understand"?

??? I do understand, since I literally just instructed it, how would I otherwise? I'm not letting the LLM do the design, it's all me still. So the "understand" already exists before the LLM even finished working.

> I'm a professional and I can tell you how I use LLMs: I write code with their assistance, they don't write code for me.

Hey, welcome to the club, me too :) I don't write code, I write English prose, yet nothing is vibe coded, and probably I'll end up being able to spend more time than you thinking about the design and architecture and how it fits in, because actual typing is no longer slowing me down. Yet again, every line is reviewed multiple times.

It's more about the person behind the tools, than the tools themselves I think ultimately. Except for Copilot probably, the times I've tried it I've just not been able to produce code that is even slightly up to my standards. It's a breeze with Codex though (5.2), and kind of hit and miss with Claude Code.

Re: I found a useful Git one liner buried in leaked CIA developer docs

#180

I use `master` in all my repos because I've been using it since forever and it never has once occurred to me "oh shit I better change it to `main` this time in case `master` may offend somebody some day. Unfortunately, that's the last thing on my mind when I'm in programming mode. Now that everything is `master`, maybe it is just a simple git command to change it to `main`. But, my fear is it'll subtly break somethin…

In current times, there will be more people offended that some prefer to use "main" rather than "master", than people that will be offended if "master" is used
Post reply on HN