Subject: Re: Recording the current branch on each commit?

From: Jeremy Morton <[email-masked]>
Date: Mon, 28 Apr 2014 10:10:14 +0100

On 28/04/2014 10:02, David Kastrup wrote:
> Jeremy Morton<[email-masked]>  writes:
>
>> On 28/04/2014 09:32, Felipe Contreras wrote:
>>>>> some people to is to always merge with --no-ff, that way you see the branch
>>>>> name in the merge commit.
>>>>
>>>> But surely, it's recommended with Git that you try to avoid doing
>>>> --no-ff merges to avoid commit noise?
>>>
>>> Nope. Different people have different needs, there's no recommendation. If
>>> anything, the recommendation is to do a ff merge, because that's the default.
>>
>> That's what I'm saying.  With an ff merge, you don't get the merge
>> commit message telling you the branch name.
>
> And I don't _want_ that branch name to be recorded.  The whole point of
> a distributed version control system is that it's nobody else's business
> how I organize my work before submitting it.

Well it would be optional, so obviously you wouldn't be forced to share 
the branch name.  It's not like we're trying to "pry in" to your private 
development.  It's a way of choosing to share what you may consider to 
be useful contextual information about the commit.

> I don't want to have people tell me when submitting patches "but can't
> you give this a better branch name?" and then have to use git
> filter-branch or whatever else to get the branch name removed.
>
>> As I said before, I usually consider my branch names useful
>> information worth keeping around - I'm not sure why you don't.
>
> It is _totally_ useless information in a distributed development model.
> Why would or should anybody be concerned what private branches some
> submitter has developed his patches in?

Why should anybody be concerned about what commit message some submitter 
has typed in for his commit?  They could just read the source code to 
see what has changed, right?

Because the commit message is a way for the submitter to try and make it 
easier for the people looking at the commit to understand what the 
commit is doing.  In the same way, a meaningful branch name may also 
make it easier for people looking at the commit to understand what it is 
doing, or what part of the application it is affecting, or what group of 
commits it is a part of.

-- 
Best regards,
Jeremy Morton (Jez)