Live data from Hacker News

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

spencer.wtf

241–250 of 273 posts

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

#241
post #64

Dont most git instances, like github, delete branch after a PR was merged, by default? I am not sure under what usecases, you will end up with a lot of stale branches. And git fetch -pa should fix it locally

> Dont most git instances, like github, delete branch after a PR was merged, by default? By default, I don't think so. And even if the branch is deleted, objects can still be there. I think GitLab has a "Clean stale objects" thing you can trigger, I don't seem to recall ever seeing any "Git Maintenance" UI actions on GitHub so not sure how it works there.

> I think GitLab has a "Clean stale objects" thing you can trigger

This deletes orphaned objects in commits that are unreachable after force-pushes or deleting branches or such, it doesn't delete branches itself.

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

#242

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…

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

There was only a single standard before, so there was no reason why a company should make any company specific standard. The need for companies to make a standard only exists, since the master to main change, because now there are two standards.

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

#243

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

"too many lines of bash" and "lines of code" seem like very strange metrics to use to form these types of opinions.

Yeah "too many lines of bash" is like "too many clicks needed". Actually since there are aliases, it's more like "too many clicks needed to add it to favourites and then it needs a single click"

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

#244

Earlier quoted context omitted.

> 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"?

Maybe they are able to write unambiguous fully specified English prose? But yeah there should tell the world then, we others desperately don't know how to do that.

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

#245
post #50
post #29

Earlier quoted context omitted.

Terminal User Interface, contrasting with a Graphical User Interface (GUI). Most often applied to programs that use the terminal as a pseudo-graphical canvas that they draw on with characters to provide an interactive page that can be navigated around with the keyboard. Really, they're just a GUI drawn with Unicode instead of drawing primitives. Like many restrictions, limiting oneself to just a fixed grid of colored…

I prefer tui's for two reasons. 1. Very used to vi keybindings 2. I like low resources software. I love the ability to open the software in less than a second in a second do what I needed using vi motions. And close it less than a second. Some people will be like you save two seconds trying to do something simple. You lose more time building the tool than you will use it in your life. It's not about saving time. It's…

Yet another benefit is that it is buffered, so you don't need to wait for the program to catch up, before you can type the next key.

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

#246

The Git command is whatever, pretty basic and stuff i have done forever but i am glad i clicked because ended up going down the rabbithole of the Wikileaks it was sourced from Some unhinged stuff there. Like the CIA having a project called "Fine Dining" which was basically a catalog of apps that could be put on a USB drive to hide malicious code. A case officer picks a cover app from a list of 24: VLC, Chrome, Notepa…

If someone else is messing with my computer, it doesn't really matter if he claims that he only played games. They could have done what ever else and still opened the game at the end, this is just a way to make that process smoother.

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

#247
post #116

Earlier quoted context omitted.

> For that reason I always use a git config variable to reference such branches. In my global git config it's main $(git config user.primaryBranch) What about using git's own `init.defaultBranch`? I mean, while useless in terms of `git init` because the repo's already init'd, this works: git config --local init.defaultBranch main And if you have `init.defaultBranch` set up already globally for `git init` then it all…

Hmm that might be nice actually. I like not conflating those two things, but as you say if the repo is already init'd then there's no chance it'll be used for the wrong purpose. In any case the main thrust was just to avoid embeddings assumptions about branch names in your scripts :)

> I like not conflating those two things

Fair enough!

It simply occurred to me that if your `user.defaultBranch` is set to e.g `trunk` then presumably when you `git init` you also want it to create a `trunk` branch, ergo `init.defaultBranch` would be set to the same value, ergo... irrespective of naming, could they actually be the same thing?

I can see a case for keeping them apart too though.

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

#248

What's wrong with just deleting the whole folder and clone repo and whatever branch you're interested in? In any case it's not an urgent thing. You don't have to do this mid-work, you can wait until you push most stuff and then rm && git clone. The only case in which this wouldn't work is when you have a ton of necessary local branches you can't even push to remote, which is a risk and anti-pattern per se.

In addition to the already mentioned stash, which I often have stuff in for months, there is also all the commits not reachable from any branch and all the history of any branch I ever created. Throwing all that away would be quite a disruptive change for me.

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

#249

Earlier quoted context omitted.

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

Blacklist and Whitelist come from the behaviour of light on coloured surfaces. A black surface absorbs all light, a white reflects it. There is also Graylist.

I don't know of any connotation of black meaning "evil, bad, or undesirable". If anything black means "missing or vanished". Maybe that is different in your culture, but I never heard of it until now. Tons of things in everyday life are black including the most letters, signs and a lot of devices. The only thing that comes to my mind is tooth decay or pestilence, but that is hardly anything connotated with the colour per se.

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

#250

Earlier quoted context omitted.

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

There was only a single standard before, so there was no reason why a company should make any company specific standard. The need for companies to make a standard only exists, since the master to main change, because now there are two standards.

I would argue there is still only one standard and it's main.
Post reply on HN