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

Re: [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff'

From
SYSergey Yanovich <ynvich@gmail.com>
Date
Jun 20, 2007, 09:20 UTC
Message-ID
<4678F17B.8010902@gmail.com>
In-Reply-To
<20070620062548.GA25840@muzzle>
Eric Wong wrote:
Show 8 quoted lines
>> -	push @diff_tree, $tree_a, $tree_b;
>> +	if ($tree_a eq '0000000000000000000000000000000000000000') {
> 
> You can make this more legible by using '0' x40 instead of repeating
> 40 '0' characters.  Also, it might be a good idea to support --root
> directly for git-svn so the user won't have to type 40 zeroes in the
> command-line :)
> 
Sorry, I am not a perl expert or even user.

I did try to process '--root' in 'git-svn', but in vain. And I can explain, why 40 '0'. That is the only reference to root commit as an object that I managed to find in git - in the output of 'git-rev-list'.

If 40 '0' is not good, then it may worth to introduce a shorthand for it, just as we have one for 'HEAD'. 'NULL' or 'ROOT' may be. If this is implemented in 'git-rev-list', there will be no need to change 'git-svn' at all.

Previous: Eric WongNext: Eric Wong
Message 9 of 11 in “git tool to keep a subversion mirror”
  1. Sergey YanovichJun 18, 2007
  2. 1/3 Accept root <tree-ish> in 'git-svn commit-diff'Sergey Yanovich, Jun 18, 2007
  3. 2/3 'git-svndump'Sergey Yanovich, Jun 18, 2007
  4. 3/3 Fix large-scale exports by 'git-svndump'Sergey Yanovich, Jun 18, 2007
  5. Johannes SixtJun 18, 2007
  6. Charlie ShepherdJun 18, 2007
  7. Johannes SixtJun 18, 2007
  8. Eric WongJun 20, 2007
  9. Sergey YanovichJun 20, 2007
  10. Eric WongJun 20, 2007
  11. Sergey YanovichJun 20, 2007

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.