Live data from Hacker News

My Favourite Git Commit

fatbusinessman.com

141–150 of 389 posts

Re: My Favourite Git Commit

#141
post #7

Earlier quoted context omitted.

The commit message still logs in the usual way, but it carries the whole set of information with it, in a way that a centralised ticket system doesn't. When a developer is looking at logs for solving some problem, they can easily review the rationale for changes. I'd much prefer the log explaining everything, rather than having to look to a ticket that may no longer exist.

> in a way that a centralised ticket system doesn't Why doesn't it? Are closed issues not searchable? It seems to me you doubt the ticket retention, but instead of fixing that, use commits to store issues instead. How do you provide comments or updates on an issue "relevant to the commit" without arbitrary commits?

> Why doesn't it? Are closed issues not searchable?

Everywhere I have ever worked has changed ticket systems at one point, and even when they are transferred, the transfer is "lossy".

Heck, just moving from one JIRA version to another can be "lossy".

> How do you provide comments or updates on an issue "relevant to the commit" without arbitrary commits?

In the ticket system. I was not advocating that a ticket system is pointless, because they are very useful.

But a decent commit message about why a change is necessary, especially when it may not be straight forward, can save you plenty of development time further down the line.

Re: My Favourite Git Commit

#142
post #13

Should this go into a commit message, instead of an issue/ticket?

Absolutely yes. As a developer I can: git log | grep git show I don't have to go looking for an issue tracker and figuring out how to search it effectively.

As a developer, you can also search the issue tracker, and don't have to go looking for commit in the VCS and figuring out how to search it effectively.

Re: My Favourite Git Commit

#143
post #64
post #45

Earlier quoted context omitted.

> I don't want your entire life story in my commit log. I[1] want enough debug information in the commit log to be able to reproduce the issue without having to go on web hunts to understand the problem. Especially when the change appears to be trivial on the surface, because these are the ones that can turn out to be rabbit holes. I don't want to have to interrupt you to get this information because you didn't write…

> I don't want go look at an external issue tracker Related question: are there projects that use git itself as issue tracker?

https://github.com/MichaelMure/git-bug

Re: My Favourite Git Commit

#145
post #79
post #28

Earlier quoted context omitted.

It's like preventing the headache with a guillotine.

Why? Usually non-ascii characters belongs to translation, and translation usually not belongs to codebase.

They definitely belong in comments though. Names, non-English languages and the like.

Re: My Favourite Git Commit

#146

I think my favorite (in terms of humor) is a commit from mpv complaining about locales and encodings. You can practically feel the committer's sheer frustration. [1] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...

That reminds me of the glorious https://en.wikipedia.org/wiki/File:JIS_and_Shift-JIS_variant... .

Wonder if there's some more ideal way to lay out those so they are less of a tangled web. This graph makes me want an adjacency list.

Re: My Favourite Git Commit

#147
Contrary to the author's point, I don't think a git commit becomes more beneficial to the readers by adding a human context.

Building "compassion and trust" actually distracts readers from the essence of the commit: what happened and why. I am not discarding the importance of human element in collaborative endeavors but maybe such area should be pursued outside of a version control system.

Re: My Favourite Git Commit

#149
When reading code, you want somthing simple and to the point most of the time (if that). Yes, it's nice to be able to tunnel down into the details - but this was fixing a bug, the code should just have a short description and more so - the reference number of the bug and if you need to, you can look that up on your bug tracking solution and get that detail.

Big problem with detailed comments, things change and comments (like code) can become obsolete/redundant and not reflect the code as the code got updated, but the ocmment did not.

No solid solution really and gets down to preference and also mindfulness of the life of code/comments.

Would be great to have code that you could rightclick and get the documentation, some woudl even prefer being able to write documentation and that gets turned into code, others would love code that could could be autodocumented. Get's down to taste, preferences and more so, experience. See, every programmer over time will eventually encounter a situation on somebody else's code that they are maintaining, fixing or replacing and find that the comments do not reflect the code. You eventually get down to the stage that you almost actively ignore comments based upon such experiences.

So whilst a detailed description in the form of a comment is good, it can and should be elsewhere, either the initial spec and program documentation or in this instance - bug tracking software system and just simple short line with bug reference or indeed just bug reference.

Re: My Favourite Git Commit

#150

I think my favorite (in terms of humor) is a commit from mpv complaining about locales and encodings. You can practically feel the committer's sheer frustration. [1] https://github.com/mpv-player/mpv/commit/1e70e82baa9193f6f02...

That is... wonderful. I've spent some time dealing with locales in C and other places that depend on the things being discussed in the commit. Just reading it bring back some of the rage I felt.
Post reply on HN