this post was submitted on 11 Apr 2025
456 points (98.7% liked)

Programming

19468 readers
111 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] SpaceNoodle@lemmy.world 3 points 3 days ago (2 children)

That just sounds like an implementation detail.

Can you provide an example of something that's possible in Mercurial, but not git?

[–] Kayana@ttrpg.network 3 points 3 days ago (1 children)

I've never used Mercurial, but a simple one based on the explanations and my experience with Git:

Locating the branch a commit originated from. If a git branch has been merged into (or rebased on) main or another branch, there's no way to tell which commit came from which branch. But sometimes I'd really like that information to figure out what prompted a certain change. Without it, I need to use external tools like a ticketing system and hope the other developers added in the necessary information.

[–] SpaceNoodle@lemmy.world 2 points 3 days ago* (last edited 3 days ago)

That seems to be the opposite of useful if a commit is initially pushed to a development branch, which is relatively standard practice; now you're polluting the tree with data that's purposefully ephemeral, and even potentially leaking internal information.

Also, I'd argue that such deep details do belong in another tool, rather than asking the source control tool perform triple duty by being a CR and issue tracker as well.

[–] notabot@lemm.ee 1 points 3 days ago

Most of the time you're right, it's little more than a detail, but sometimes I miss the querying that it allowed. You could ask for things like a list of all branches that branched from a specific parent branch and modified a specific file, Which can be handy when you want to understand the impact a change might have before you make it and try merging.

Having the branch name embedded in the commit means you can meaningfully ask this sort of question. In git's model you can't say a changeset is in a specific branch once there are child branches further downstream because the changeset is in all of those branches.

Rather than come up with lots of examples for other queries (I know it wasn't the focus of your question, but I think it's really neat), I found this page which seems like a reasonable description.