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 11, 2008, 10:08 UTC
Message-ID
<200802111108.31828.jnareb@gmail.com>
In-Reply-To
<alpine.LSU.1.00.0802100106330.11591@racer.site>
On Sunday, 10 February 2008, Johannes Schindelin wrote:
Show 10 quoted lines
> On Sun, 10 Feb 2008, Jakub Narebski wrote:
> 
>> 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.
> 
> I cannot agree to either reason.  It is _not_ a git specific header, so it 
> does not belong in the commit header.

Well, that, and the fact that the same commit imported using two different tools, one using this header and one didn't would result in different commit object... although if they differ in adding original revision id to the commit message commit objects would differ too.

> Also, I find it does not clutter the commit message _at all_, but adds 
> information that the user might find useful.

Revisions ids can be long, and together with prefix introducing original SCM revision identifier be longer than customary 80 characters.

Besides, "git cherry-pick" was changed to _not_ add information about original commit id by default. Shouldn't this apply also for import?

> Lastly, I cannot see _any_ reason why it should be _easier_ or _less error 
> prone_ to put an "original commit id" into the commit header than into the 
> commit body.
Well, if commit message talks about foreign commit IDs...
-- 
Jakub Narebski
Poland
Previous: Johannes Schindelin
Message 7 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.