Re: git notes and git-commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 10, 2010 at 9:13 PM, Johan Herland <johan@xxxxxxxxxxx> wrote:
> On Friday 10 December 2010, Nguyen Thai Ngoc Duy wrote:
>> Hi,
>>
>> I have never used git-notes before, just have had a quick look over
>> git-notes.txt so this may have already been discussed.
>>
>> Isn't it more convenient to write/update notes when editing commit
>> message? Jakub mentioned of "---" in the archive elsewhere. There's
>> notes.rewriteRef for commit --amend. But if I amend a commit, I might
>> as well change my notes. rewriteRef would not work with "git commit
>> -c" either.
>
> It seems your notes data is very much tied to your commit messages. If
> your notes needs editing every time you edit the commit message, I have
> to ask why you simply don't fold the notes into the commit message.

Both commit message and notes are "notes" related to a commit. Some
info, like todos, I'd rather leave them out of commit message. I
wasn't clear what I was getting to. But as you said below, notes can
be cleaned up without rewriting history, making it separate from
commit message. So basically they all are just notes (with different
purpose), which makes me think they should be able to be edited at the
same time.

> The same goes for rewriteRef vs. "git commit -c". If the notes should
> follow the commit message around, I have to ask why the notes are
> separate from the commit message in the first place.

Aside from "all editable at the same time" above, I think related
notes should show up when I write commit messages. Notes can give
helpful info for writing commit message, even if I don't update them.

> That said, there might well be good use cases for this (e.g. using notes
> to store data types - e.g. binary data - that cannot be part of the
> commit message), so I will not advise against implementing this, but if
> you do, please also consider that there are notes use cases where the
> notes are tied to the actual contents of the commit, and not the commit
> message (e.g. notes-cache).

Ah, I didn't know this. Thanks.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]