git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch
@ 2008-07-06 21:22 Brian Gernhardt
  2008-07-07  4:43 ` Junio C Hamano
  2008-07-07  6:14 ` Nanako Shiraishi
  0 siblings, 2 replies; 28+ messages in thread
From: Brian Gernhardt @ 2008-07-06 21:22 UTC (permalink / raw)
  To: Git List; +Cc: Junio C Hamano

This makes rebase act a little more like merge when working on the
current branch.  This is particularly useful for `git pull --rebase`

Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
---

 ARG!  This is what v3 was supposed to be.  I should make sure I am sending in
 the correct patch.  (Tip: run format-patch again after a commit --amend.)  Bad
 weekend for me, apparently trying to do too many things at once.  Sorry for
 all the noise.

 To recap:

 If I followed the discussion correctly the first time I sent in this patch,
 the two issues were:

 - Ugly "echo > ORIG_HEAD" instead of pretty "git update-ref ORIG_HEAD"
 - Setting ORIG_HEAD at the wrong place

 This version (as opposed to v2, or the embarrassingly identital "v3")  uses
 the correct variable.  $orig_head looks like the right name, but it stores the
 branch.  $prev_head stores the actual SHA1, which is what I was looking for.

 git-rebase.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/git-rebase.sh b/git-rebase.sh
index e2d85ee..1048f7e 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -434,3 +434,4 @@ do
 done
 
 finish_rb_merge
+git update-ref ORIG_HEAD $prev_head
-- 
1.5.6.2.348.gcff8f.dirty

^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2008-07-08 19:29 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-06 21:22 [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch Brian Gernhardt
2008-07-07  4:43 ` Junio C Hamano
2008-07-07  5:16   ` Brian Gernhardt
2008-07-07  5:24     ` Junio C Hamano
2008-07-07  6:28     ` Junio C Hamano
2008-07-07  6:48       ` Junio C Hamano
2008-07-07 11:18       ` Theodore Tso
2008-07-07 11:42         ` Jakub Narebski
2008-07-07 15:03           ` Brian Gernhardt
2008-07-08  4:26             ` Jeff King
2008-07-08 14:32               ` Brian Gernhardt
2008-07-07 14:36         ` Brian Gernhardt
2008-07-07 18:04         ` Junio C Hamano
2008-07-07 21:58       ` Junio C Hamano
2008-07-07 22:14         ` Jakub Narebski
2008-07-07 22:33           ` Junio C Hamano
2008-07-07 22:58             ` Jakub Narebski
2008-07-08  3:24         ` Brian Gernhardt
2008-07-08  4:12           ` [PATCH] Documentation: mention ORIG_HEAD in am, merge, and rebase Brian Gernhardt
2008-07-08 19:23             ` Junio C Hamano
2008-07-08 19:28               ` Brian Gernhardt
2008-07-08  3:28         ` [FIXED PATCH] Make rebase save ORIG_HEAD if changing current branch Jay Soffian
2008-07-07  5:41   ` Mike Hommey
2008-07-07  5:46     ` Junio C Hamano
2008-07-07  5:48     ` Mike Hommey
2008-07-07  6:14 ` Nanako Shiraishi
2008-07-07  7:16   ` Re* " Junio C Hamano
2008-07-07 14:36     ` Brian Gernhardt

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).