Re: [PATCH] git-svn: prevent dcommitting if the index is dirty.
- From
Benoit Sigoure <tsuna@lrde.epita.fr>
- Date
- Nov 12, 2007, 09:11 UTC
- Message-ID
- <F711CC72-4A91-4B69-B26A-31B0FB6621B0@lrde.epita.fr>
- In-Reply-To
- <20071112022851.GA25675@mayonaise>
On Nov 12, 2007, at 3:28 AM, Eric Wong wrote:
Show 37 quoted lines
> Benoit Sigoure <tsuna@lrde.epita.fr> wrote:
>> dcommit uses rebase `sync' the history with what has just been
>> pushed to
>> SVN. Trying to dcommit with a dirty index is troublesome for
>> rebase, so now
>> the user will get an error message if he attempts to dcommit with
>> a dirty
>> index.
>>
>> Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
>
> Thanks,
>
> Minor nit below about indentation (which Junio can fix when applying),
> but nevertheless:
>
> Acked-by: Eric Wong <normalperson@yhbt.net>
>
>> ---
>> git-svn.perl | 3 +++
>> t/t9106-git-svn-dcommit-clobber-series.sh | 6 ++++++
>> 2 files changed, 9 insertions(+), 0 deletions(-)
>>
>> diff --git a/git-svn.perl b/git-svn.perl
>> index dd93e32..a15df4f 100755
>> --- a/git-svn.perl
>> +++ b/git-svn.perl
>> @@ -390,6 +390,9 @@ sub cmd_set_tree {
>>
>> sub cmd_dcommit {
>> my $head = shift;
>> + git_cmd_try { command_oneline(qw/diff-index --quiet HEAD/) }
>> + 'Cannot dcommit with a dirty index. Commit your
>> changes first'
>> + . "or stash them with `git stash'.\n";
>
> We use tabs for indentation, and spaces for alignment.Yes, sorry again, would you consider to add `# vi: set noexpandtab:' at the end of the file so that ViM users (like me) don't have to think about it? (it tells ViM to NOT expand tabs to series of spaces)
-- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory