# [PATCH] Clarify: rebase abort leaves <branch> checked-out

5 messages from 2011-03-13 to 2011-03-14. Participants: Drew Northup, Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/26723

## Drew Northup, 2011-03-13 16:54

Subject: [PATCH] Clarify: rebase abort leaves <branch> checked-out
Message-ID: <1300035258.5129.12.camel@drew-northup.unet.maine.edu>
URL: https://gitlist.dev/e/1300035258.5129.12.camel%40drew-northup.unet.maine.edu

```
This change makes it clearer that while the change
to the history effected by executing
'git rebase master' and 'git rebase master topic'
(in the example given) will be the same the
implicit checkout of the second form will not be
undone even if the rebase operation itself is
aborted.

Signed-off-by: Drew Northup <drew.northup@maine.edu>
---
 Documentation/git-rebase.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 96680c8..4e2411a 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -66,8 +66,9 @@ would be:
     D---E---F---G master
 ------------
 
-The latter form is just a short-hand of `git checkout topic`
-followed by `git rebase master`.
+*NOTE:* The latter form is just a short-hand of `git checkout topic`
+followed by `git rebase master`. If the rebase is aborted `topic` will 
+remain the checked-out branch.
 
 If the upstream branch already contains a change you have made (e.g.,
 because you mailed a patch which was applied upstream), then that commit
-- 
1.6.4
-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

```

## Johannes Schindelin, 2011-03-13 17:40

Subject: Re: [PATCH] Clarify: rebase abort leaves <branch> checked-out
Message-ID: <alpine.DEB.1.00.1103131839030.1561@bonsai2>
URL: https://gitlist.dev/e/alpine.DEB.1.00.1103131839030.1561%40bonsai2
In-Reply-To: <1300035258.5129.12.camel@drew-northup.unet.maine.edu>

```
Hi,

On Sun, 13 Mar 2011, Drew Northup wrote:

> This change makes it clearer that while the change
> to the history effected by executing
> 'git rebase master' and 'git rebase master topic'
> (in the example given) will be the same the
> implicit checkout of the second form will not be
> undone even if the rebase operation itself is
> aborted.

I wonder whether we should not handle that case better. I know that I 
would have expected an abort to undo the branch switch.

Thanks for bringing this to our attention,
Dscho

P.S.:

> 1.6.4

Whoa!

```

## Junio C Hamano, 2011-03-13 19:41

Subject: Re: [PATCH] Clarify: rebase abort leaves <branch> checked-out
Message-ID: <7vtyf6hkpo.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vtyf6hkpo.fsf%40alter.siamese.dyndns.org
In-Reply-To: <1300035258.5129.12.camel@drew-northup.unet.maine.edu>

```
Drew Northup <drew.northup@maine.edu> writes:

> -The latter form is just a short-hand of `git checkout topic`
> -followed by `git rebase master`.
> +*NOTE:* The latter form is just a short-hand of `git checkout topic`
> +followed by `git rebase master`. If the rebase is aborted `topic` will 
> +remain the checked-out branch.

The behaviour is consistent between the case where "this on that" form
succeeds and it stops and gets aborted, and I think both are euqally
noteworthy.  So I'd suggest dropping "if aborted".

```

## Drew Northup, 2011-03-14 11:40

Subject: Re: [PATCH] Clarify: rebase abort leaves <branch> checked-out
Message-ID: <1300102832.5129.17.camel@drew-northup.unet.maine.edu>
URL: https://gitlist.dev/e/1300102832.5129.17.camel%40drew-northup.unet.maine.edu
In-Reply-To: <7vtyf6hkpo.fsf@alter.siamese.dyndns.org>

```

On Sun, 2011-03-13 at 12:41 -0700, Junio C Hamano wrote:
> Drew Northup <drew.northup@maine.edu> writes:
> 
> > -The latter form is just a short-hand of `git checkout topic`
> > -followed by `git rebase master`.
> > +*NOTE:* The latter form is just a short-hand of `git checkout topic`
> > +followed by `git rebase master`. If the rebase is aborted `topic` will 
> > +remain the checked-out branch.
> 
> The behaviour is consistent between the case where "this on that" form
> succeeds and it stops and gets aborted, and I think both are euqally
> noteworthy.  So I'd suggest dropping "if aborted".

So a synthetic look at that might be:

-If the rebase is aborted
+When rebase exits

Comments?

I'll see about re-rolling likewise (and on something with a more recent
runtime!).

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

```

## Drew Northup, 2011-03-14 15:47

Subject: [PATCH v2] Clarify: rebase exit leaves <branch> checked-out
Message-ID: <1300117657.5129.41.camel@drew-northup.unet.maine.edu>
URL: https://gitlist.dev/e/1300117657.5129.41.camel%40drew-northup.unet.maine.edu
In-Reply-To: <7vtyf6hkpo.fsf@alter.siamese.dyndns.org>

```
This change makes it clearer that while the change
to the history effected by executing
'git rebase master' and 'git rebase master topic'
(in the example given) will be the same the
implicit checkout of the second form will always
remain following the rebase.

Signed-off-by: Drew Northup <drew.northup@maine.edu>
---

This applies cleanly to both master and pu. Changed patch subject to
better match the amended contents.

 Documentation/git-rebase.txt |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 96680c8..ac35894 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -66,8 +66,9 @@ would be:
     D---E---F---G master
 ------------
 
-The latter form is just a short-hand of `git checkout topic`
-followed by `git rebase master`.
+*NOTE:* The latter form is just a short-hand of `git checkout topic`
+followed by `git rebase master`. When rebase exits `topic` will
+remain the checked-out branch.
 
 If the upstream branch already contains a change you have made (e.g.,
 because you mailed a patch which was applied upstream), then that commit
-- 
1.7.4
-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59

```
