git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] New commit object headers: note headers

From
Jakub Narebski <jnareb@gmail.com>
Date
Feb 9, 2008, 23:26 UTC
Message-ID
<200802100026.39340.jnareb@gmail.com>
In-Reply-To
<7vlk5tetaa.fsf@gitster.siamese.dyndns.org>
On Sat, 9 Feb 2008, Junio C Hamano wrote:
Show 29 quoted lines
> "Nguyen Thai Ngoc Duy" <pclouds@gmail.com> writes:
>> On Sun, Feb 10, 2008 at 12:35 AM, Daniel Barkalow <barkalow@iabervon.org> wrote:
>>> On Sat, 9 Feb 2008, Jakub Narebski wrote:
>>>>
>>>> 2. 'note' header (no semantical meaning)
>>>>
>>>> There was some time ago discussion about adding 'note' header, initially
>>>> to save original sha-1 of a commit for cherry-picking and rebase; then
>>>> for saving explicit rename or corrected rename info, for saving chosen
>>>> merge strategy, and for saving original ID of SCM import.
>>>
>>>  Probably want to have a prescribed syntax for specifying what note this
>>>  is, so that different programs using notes don't confuse each other.
>>
>> How about git ignoring all X- headers and let programs freely add
>> them? For example, X-SVN may be used for git-svn.
> 
> Please don't.
> 
> When two people/programs create an otherwise identical (for the
> purpose of git) commits that have two different object names,
> there'd better be a very good reason other than "I felt like
> adding an extra header that I can use willy-nilly".
> 
> Please separate the 'note' part and the 'generation' part and
> make two separate discussion threads.
> 
> And kill 'note' part altogether, but that can be done in that
> thread ;-).

Ah, well... very good reservation. So here it goes generic 'note' (or 'X-*', similarly to non-standarized email headers) header...

Still I think it is would be nice to have original commit id in a header when importing from foreign SCM. First, it would not pollute commit message, which would be identical with the original commit message (which allows easy two-way interaction). Second, it is much easier and much less error prone to extract it by machine.

As to marking explicitely renames and copies...
-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Johannes Schindelin
Message 5 of 7 in “[RFC] New commit object headers: generation and note headers”
  1. Jakub NarebskiFeb 9, 2008
  2. Daniel BarkalowFeb 9, 2008
  3. Nguyen Thai Ngoc DuyFeb 9, 2008
  4. Junio C HamanoFeb 9, 2008
  5. Jakub NarebskiFeb 9, 2008
  6. Johannes SchindelinFeb 10, 2008
  7. Jakub NarebskiFeb 11, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.