git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Make rebase save ORIG_HEAD if changing current branch
@ 2008-07-06  8:40 Brian Gernhardt
  2008-07-06 16:16 ` [PATCH v3] " Brian Gernhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Brian Gernhardt @ 2008-07-06  8:40 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>
---

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

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

 Let me know if there are any other issues.

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

diff --git a/git-rebase.sh b/git-rebase.sh
index e2d85ee..44db7e6 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -434,3 +434,4 @@ do
 done
 
 finish_rb_merge
+git update-ref ORIG_HEAD $orig_head
-- 
1.5.6.1.324.gc55f7

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

* [PATCH v3] Make rebase save ORIG_HEAD if changing current branch
  2008-07-06  8:40 [PATCH v2] Make rebase save ORIG_HEAD if changing current branch Brian Gernhardt
@ 2008-07-06 16:16 ` Brian Gernhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Gernhardt @ 2008-07-06 16:16 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>
---

 Okay, I apparently should stop coding after midnight, even if I think I'm
 awake enough.  This version uses the correct variable.  $orig_head looks like
 the right name, but it stores the symbolic ref.  $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..44db7e6 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -434,3 +434,4 @@ do
 done
 
 finish_rb_merge
+git update-ref ORIG_HEAD $orig_head
-- 
1.5.6.2.337.gf6537

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

end of thread, other threads:[~2008-07-06 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-06  8:40 [PATCH v2] Make rebase save ORIG_HEAD if changing current branch Brian Gernhardt
2008-07-06 16:16 ` [PATCH v3] " 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).