git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org, Eric Wong <normalperson@yhbt.net>
Subject: [PATCH 3/3] git-svn: preserve uncommitted changes after dcommit
Date: Thu, 23 Nov 2006 14:54:05 -0800	[thread overview]
Message-ID: <11643224483832-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: <1164322445180-git-send-email-normalperson@yhbt.net>

Using dcommit could cause the user to lose uncommitted changes
during the reset --hard operation, so change it to reset --mixed.

If dcommit chooses the rebase path, then git-rebase will already
error out when local changes are made.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
---
 git-svn.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/git-svn.perl b/git-svn.perl
index 6feae56..bb8935a 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -623,7 +623,7 @@ sub dcommit {
 	} else {
 		print "No changes between current HEAD and $gs\n",
 		      "Hard resetting to the latest $gs\n";
-		@finish = qw/reset --hard/;
+		@finish = qw/reset --mixed/;
 	}
 	sys('git', @finish, $gs);
 }
-- 
1.4.4.1.g22a08

      parent reply	other threads:[~2006-11-23 22:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23 22:54 [PATCH 1/3] git-svn: error out from dcommit on a parent-less commit Eric Wong
2006-11-23 22:54 ` [PATCH 2/3] git-svn: correctly handle revision 0 in SVN repositories Eric Wong
2006-11-23 22:54 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11643224483832-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).