News for hackers. Stuff that matters.
Re:Git Tips by falcolas on Wednesday April 20, 2016 @09:25AM (#11534158)
> Love #16 and the associated article.

I can't recall where now, but I remember reading (and agreeing with) an article which proposed a slightly different format - describe what the commit did. "Fixes the js typo on the foo page".

Grammatically, I prefer this method as well, since the commit has already been applied, so it's not "going" to do anything; it's already been done.

Of course, the only difference is in the tense of the leading verb, so it's probably one of those "potato" thing.

Re:Git Tips by tenken on Wednesday April 20, 2016 @10:27AM (#11534600)
I thought git commit messages were supposed to be present tense. "Fix the JS typo on foo page for Chrome."
Re:Git Tips by falcolas on Wednesday April 20, 2016 @12:44PM (#11535692)
Well, especially if you take the source article to heart, "Fix" is actually future tense - "When applied this commit will fix the JS typo on foo page for Chrome". "Fixes" would indicate the present tense: "This commit fixes the JS typo [...]"
Re:Git Tips by pklausler on Wednesday April 20, 2016 @02:38PM (#11536682)
I read it as using the imperative mood, myself; otherwise the sentence is missing its subject.
Re:Git Tips by falcolas on Wednesday April 20, 2016 @03:42PM (#11537154)
I've seen that reasoning as well, but who is doing the telling, and to whom?

Ain't English fun?

Re:Git Tips by pklausler on Wednesday April 20, 2016 @04:10PM (#11537348)
If the sentence still makes sense when ", dammit!" is appended to it, it's in the imperative mood and you are the subject.
Re:Git Tips by falcolas on Wednesday April 20, 2016 @04:56PM (#11537689)
Fair enough, but how does a command apply to a git commit? If it's telling the git commit what to do, that doesn't make sense, since the commit comment is supposed to be about the commit, not a command to the commit.

If it's telling me what to do, that doesn't make any sense either, since the work's already been done; the results of doing that work is the commit.

I guess it could be considered to be an abstraction of what request initiated the change, but what value does that provide when going back through git logs (when compared to a past or present verb tense that describes the changes)?

Re:Git Tips by ZeroGravitas on Wednesday April 20, 2016 @09:34AM (#11534224)
I think the actualy reason for the choice of tense is brevity. Fix is three characters fixes or fixed is five, similar for update vs updates/updated, add vs adds/added etc.