Live data from Hacker News

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

spencer.wtf

151–160 of 273 posts

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

#152

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…

[flagged]

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

#153

Earlier quoted context omitted.

Can you explain TUI? I have never heard this before

It's definitely an acronym that got popular in the last year or so, though I'm sure there are people out there who will pretend otherwise. I've been in the industry 15+ years now and never heard it before. Previously it was just UI, GUI, or CLI.

My friends and I have been actively in the "CLI/TUI" since middle school. Anyone tinkering on linux that used tiling window managers is already very familiar with the domain.

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

#155
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…

Mine's this-ish (nushell, but easily bashified or pwshd) for finding all merged, including squashed:

    let t = "origin/dev"; git for-each-ref refs/heads/ --format="%(refname:short)" | lines | where {|b| $b !~ 'dev' and (git merge-tree --write-tree $t $b | lines | first) == (git rev-parse $"($t)^{tree}") }
Does a 3-way in-mem merge against (in my case) dev. If there's code in the branch that isn't in the target it won't show up.

Pipe right to deletion if brave, or to a choice-thingy if prudent :)

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

#156
post #78

Earlier quoted context omitted.

Sorry, but this 65 yo grey-beard disagrees. A TUI to me, back in the 80s/90s, was something that ran in the terminal and was almost always ncurses-based. This was back when I was still using ADM-3A serial terminals, none of that new-fangled PCs stuff.

We might've been caught on different parts of the wave. I checked Ngrams out of curiosity https://books.google.com/ngrams/graph?content=TUI&year_start... Basically it was never used, then it was heavily used, and then never used, and then in the early 00s it took off again. That'd explain why you used it, I never did, and now young kids are.

I don't think that search is very valid - the TUI group travel companies are likely much more mentioned than Terminal User Interface. They are pretty big around the world and have an airline, cruises, hotels etc.

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

#157
post #128

Earlier quoted context omitted.

how do you trust the code claude wrote? don't you get anxiety "what if there's an error in tui code and it would mess up my git repo"?

I push my branches daily, so I wouldn't lose that much work. If it breaks then I ask it to fix it. But I do quickly check the output what it does, and especially the commands it runs. Sometimes it throws all code in a single file, so I ask for 'good architecture with abstractions'.

I see this regularly: "I use GitHub to backup my local repos."

If `gh repo ...` commands get run you can lose everything instantly. You can force push and be left with a single blank commit on both sides. The agent has full control of everything, not just your local data.

Just set up Rclone/restic and get your stuff into a system with some immutability.

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

#158

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…

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/...

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

#159

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.

> What color is ink on a page?

Middle gray, according to modern UX designers. ;)

Post reply on HN