Most active commenters
  • mhh__(5)
  • eru(4)
  • IshKebab(3)

←back to thread

848 points thefilmore | 27 comments | | HN request time: 0.625s | source | bottom
1. IshKebab ◴[] No.43970002[source]
Plenty of people use Codeberg and Gitlab. And it's still distributed - I don't need to lock files and ask coworkers if I can work on them.

Maybe if Git had native support for PRs and issues this wouldn't have happened. (And yes I'm aware of git send-email etc.)

replies(3): >>43970054 #>>43970113 #>>43970150 #
2. mmis1000 ◴[] No.43970054[source]
I think it would be great if git have some kind of soft lock by default (like attach a text on some file without make it into actual commit). It could probably make peoples' live easier when you and teamates need to communicate what files you are changing thus reduce the chance of conflict.
replies(2): >>43970149 #>>43970543 #
3. mhh__ ◴[] No.43970113[source]
Git should have issue support or something like it as a convention but pull requests are an abomination that we are stuck with. No thank you.
replies(3): >>43970148 #>>43970157 #>>43970328 #
4. kace91 ◴[] No.43970148[source]
Can you expand on that? I’m probably younger but I can’t imagine a more comfortable way to review code.
replies(3): >>43970331 #>>43970946 #>>43974284 #
5. spookie ◴[] No.43970149[source]
Yeah, especially binaries.
6. qwertox ◴[] No.43970150[source]
In Codeberg, how does one even search for files containing a given string? Probably the #1 thing I do on GitHub is searching for files in a project containing a given string.
replies(3): >>43970190 #>>43970201 #>>43971145 #
7. captn3m0 ◴[] No.43970157[source]
Not Git, but several forges are working towards an ActivityOub based federation format for these: https://f3.forgefriends.org/
8. sph ◴[] No.43970190[source]
Given how terrible GitHub search in files is, what I usually do is clone the repo and run ripgrep.
replies(3): >>43970268 #>>43970391 #>>43970500 #
9. jimbob45 ◴[] No.43970201[source]
That exact exercise filled a quarter of my workday today.
10. eXpl0it3r ◴[] No.43970268{3}[source]
Not sure when you tried last, but it's gotten a lot better over the years. If you need something from the latest master, you'll be able to find it.
11. eru ◴[] No.43970328[source]
Git was invented with pull requests in mind. It's just that they were originally meant to be sent via email, not on the web.
12. eru ◴[] No.43970331{3}[source]
Pull requests are great, but the typical github UI isn't necessarily the best way to review code.

It's often useful. But sometimes you want to use other tools, like firing up your editor to explore.

replies(1): >>43974277 #
13. nicce ◴[] No.43970391{3}[source]
If the repository is indexed, there isn’t really competitive search. You can find blog posts about it. They actually used ripgrep at some point. (not anymore I guess because too slow?).

Edit: ripgrep was just a test

More: https://github.blog/engineering/the-technology-behind-github...

14. mrweasel ◴[] No.43970500{3}[source]
But Github is actually pretty good at searching for something across all files in a repo.
replies(1): >>43971336 #
15. mashlol ◴[] No.43970543[source]
FWIW git lfs does have support for locking files.
16. baq ◴[] No.43970946{3}[source]
It’s only good if you haven’t tried anything else. Check out gerrit, but there are many more tools and workflows.

Note we’re talking about the GitHub UI mostly. Pulling and merging a remote branch is a basic git operation, almost a primitive.

17. throwaway290 ◴[] No.43971145[source]
I'm not being sarcastic but how do you do it on github?;) it basically never works

Not only results are incomplete but it seems once they went into training LLMs on all code they host they made sure no one else can do the same easily and so now everything is madly rate limited.

Every time I just clone and grep.

18. IshKebab ◴[] No.43971336{4}[source]
Not remotely as good as grep.app.
replies(1): >>43977904 #
19. mhh__ ◴[] No.43974277{4}[source]
No, they're terrible. We should be reviewing stacks of commits not branches
replies(1): >>43977227 #
20. mhh__ ◴[] No.43974284{3}[source]
Phabricator.
21. IshKebab ◴[] No.43977227{5}[source]
Why? A branch is a stack of commits.
replies(2): >>43977997 #>>43987967 #
22. qwertox ◴[] No.43977904{5}[source]
I was shocked at how fast I was able to find "Open an audio file and read as mono waveform, resampling as necessary" of whisperX in audio.py on grep.app.

It was instantaneous. But where do I go from there? I cannot navigate through the code. It shows me where I can find that string, but that's it. I also cannot look at blame to see when that line got edited.

Though thanks a lot for bringing this onto my radar.

23. Dylan16807 ◴[] No.43977997{6}[source]
The workflow I believe they're talking about is like a branch but you can have multiple versions of the branch as you develop and refine it.

And those updates are properly tracked by your version control, not done jankily by editing a commit and rebasing and force pushing.

24. mhh__ ◴[] No.43987967{6}[source]
Then whence merge commits?

A branch is a commit with a hat on, strictly speaking.

replies(1): >>43990972 #
25. eru ◴[] No.43990972{7}[source]
Yes, a branch together with information about the intended point of divergence is a stack of commits. (Most of the time, the point of divergence is arrived at implicitly by specifying the intended mother branch, and git figures out the last common ancestor, ie the merge-base.) Let's call the branch-plus-point-of-divergence a 'PR branch'.

Though your 'stack of commits' is more like a 'stack of diffs' (at least in the Git sense of commit-is-a-snapshot-of-the-whole-repo.)

And actually, for better or worse, a PR branch is more expressive than a 'stack of commits', exactly for the reason you suggest: a PR branch can also contain merge commits, it doesn't have to be a linear chain.

replies(1): >>43991327 #
26. mhh__ ◴[] No.43991327{8}[source]
They are often called stacked diffs yes.
replies(1): >>43991813 #
27. eru ◴[] No.43991813{9}[source]
Basically in terms of git speak branches are mutable pointers to immutable commits. (They are basically the only mutable thing in git.)

What you'd need to do to support 'stacked diffs' or 'stacks of commits' is to keep a history of what you mutable pointers were doing. It's a 'meta-git'.

Once you have that, you could build all the convenient operations on top of that abstraction.

Btw, if memory serves right, git has some plugins (or whatever these things are called, plugins or so?) for implementing the stack of commits concept.

I don't know whether they go the 'meta-git' route that I sketched, or whether they do something less abstract.