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

Re: [PATCH] git-svn: prevent dcommitting if the index is dirty.

From
EWEric Wong <normalperson@yhbt.net>
Date
Nov 12, 2007, 02:28 UTC
Message-ID
<20071112022851.GA25675@mayonaise>
In-Reply-To
<1194806501-4796-1-git-send-email-tsuna@lrde.epita.fr>
Benoit Sigoure <tsuna@lrde.epita.fr> wrote:
Show 6 quoted lines
> 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>
Show 16 quoted lines
> ---
>  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.
>  	$head ||= 'HEAD';
>  	my @refs;
>  	my ($url, $rev, $uuid, $gs) = working_head_info($head, \@refs);
-- 
Eric Wong
Previous: Benoit SigoureNext: Benoit Sigoure
Message 2 of 4 in “git-svn: prevent dcommitting if the index is dirty.”
  1. git-svn: prevent dcommitting if the index is dirty.Benoit Sigoure, Nov 11, 2007
  2. Eric WongNov 12, 2007
  3. Benoit SigoureNov 12, 2007
  4. Eric WongNov 17, 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.