Re: [PATCH 1/3] Accept root <tree-ish> in 'git-svn commit-diff'
- From
- Sergey 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.