Live data from Hacker News

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

spencer.wtf

231–240 of 273 posts

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

#231
post #150

Earlier quoted context omitted.

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

>I don't write code, I write English prose, yet nothing is vibe coded

If the input is English prose, how is it not "vibe coded"?

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

#232

Earlier quoted context omitted.

Isn't it this case no matter who wrote the code? How do you ever run anything if you're worried about bugs?

When I write the code myself, I'm not worried that I snuck a `git reset --hard` somewhere.

Do you only run code you wrote yourself?

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

#233

Earlier quoted context omitted.

The use of init.defaultBranch here is really problematic, because different repositories may use a different name for their default, and this is a global (your home directory scope) setting you have to pre-set. I have an alias I use called git default which works like this: default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' then it becomes ..."$(git default)"... This figures out th…

This is a great solution to a stupid problem. I work at a company that was born and grew during the master->main transition. As a result, we have a 50/50 split of main and master. No matter what you think about the reason for the transition, any reasonable person must admit that this was a stupid, user hostile, and needlessly complexifying change. I am a trainer at my company. I literally teach git. And: I have no wo…

No, actually, zero people 'must admit' that it was a stupid, user hostile and needlessly complexifying change.

I would say any reasonable person would have to agree that a company which didn't bother to set a standard for new repos once there are multiple common options is stupid, user hostile and needlessly complexifying. And if the company does have a standard for new repos, but for some reason you don't explain that to new engineers....

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

#234
I published essentially the same thing ten years ago, maybe it inspired the CIA? ;)

The “trunk” check shows how old this is. Not nearly as useful now with rebase/squash on a remote being common, as others have mentioned.

https://github.com/ricardobeat/git-commands/blob/master/git-...

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

#235

Earlier quoted context omitted.

The use of init.defaultBranch here is really problematic, because different repositories may use a different name for their default, and this is a global (your home directory scope) setting you have to pre-set. I have an alias I use called git default which works like this: default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' then it becomes ..."$(git default)"... This figures out th…

This is a great solution to a stupid problem. I work at a company that was born and grew during the master->main transition. As a result, we have a 50/50 split of main and master. No matter what you think about the reason for the transition, any reasonable person must admit that this was a stupid, user hostile, and needlessly complexifying change. I am a trainer at my company. I literally teach git. And: I have no wo…

I love the arguments where you tell me what I “must admit”. I simply don’t, therefore your entire point is meaningless. I’m sorry that something so inconsequential irked you so much. Maybe you need to read a book about git if this stumped you bad enough to want to voice your upset about it years later?

I’d consider yourself lucky that everything else is going so well that this is what’s occupying you.

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

#236

If something this natural requires several lines of bash, something is just not right. Maybe branches should go sorted by default, either chronologically or topologically? git's LoC budget is 20x LevelDBs or 30% of PostgreSQL or 3 SQLites. It must be able to do these things out of the box, isn't it? https://replicated.wiki/blog/partII.html

Branches can be sorted.

    git config branch.sort ...

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

#237

If something this natural requires several lines of bash, something is just not right. Maybe branches should go sorted by default, either chronologically or topologically? git's LoC budget is 20x LevelDBs or 30% of PostgreSQL or 3 SQLites. It must be able to do these things out of the box, isn't it? https://replicated.wiki/blog/partII.html

Branches can be sorted. git config branch.sort ...

Amazing

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

#238

Earlier quoted context omitted.

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 gui…

The irony is that the term "Black" was precisely chosen by Black civil rights activists in the 1960s. This wasn't a term given by white people, it was specifically chosen by Blacks, because of its negative connotations. They wanted to embrace its negative connotations and turn it on its head, and that's where terms like "Black is beautiful" came from. They didn't want to be ashamed of it, that's why they embraced it.…

I think you've constructed a strawman. Can you point to evidence that people think the word black is shameful and racist?

Or maybe you are confusing the idea that 'using black to mean bad and white to mean good' is a problem?

Those are two different concepts.

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

#239

Earlier quoted context omitted.

This is a great solution to a stupid problem. I work at a company that was born and grew during the master->main transition. As a result, we have a 50/50 split of main and master. No matter what you think about the reason for the transition, any reasonable person must admit that this was a stupid, user hostile, and needlessly complexifying change. I am a trainer at my company. I literally teach git. And: I have no wo…

Why does your company not migrate to one standard? Github has this functionality built in, and it's also easy enough to do with just git. I'm personally a huge fan of the master-> main changejus5t because main is shorter to type. Might be a small win, but I checkout projects' main branches a lot.

It's extremely obvious that "main" is more ergonomic. It's sad that we're so resistant to change (regardless of how valid you think the initial trigger was)

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

#240

So effectively "I just discovered xargs"? Not to disparage OP but there isn't anything particularly novel here.

This feels like gatekeeping someone sharing something cool they've recently learned. I personally lean more towards the "let's share cool little productivity tips and tricks with one another" instead of the "in order to share this you have to meet [entirely arbitrary line of novelty/cleverness/originality]." But each to their own I suppose. I wonder how you learned about using xargs? Maybe a blog-post or article not…

>This feels like gatekeeping someone sharing something cool they've recently learned.

Calling out clickbait isn't gatekeeping.

Post reply on HN