* [PATCH] git-rebase: Teach rebase "-" shorthand.
@ 2014-03-18 8:44 Brian Gesiak
2014-03-18 19:26 ` Torsten Bögershausen
2014-03-18 19:42 ` Junio C Hamano
0 siblings, 2 replies; 12+ messages in thread
From: Brian Gesiak @ 2014-03-18 8:44 UTC (permalink / raw)
To: git; +Cc: Brian Gesiak
Teach rebase the same shorthand as checkout and merge; that is, that "-"
means "the branch we were previously on".
Reported-by: Tim Chase <git@tim.thechases.com>
Signed-off-by: Brian Gesiak <modocache@gmail.com>
---
git-rebase.sh | 4 ++++
t/t3400-rebase.sh | 6 ++++++
2 files changed, 10 insertions(+)
diff --git a/git-rebase.sh b/git-rebase.sh
index 5f6732b..2c75e9f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -453,6 +453,10 @@ then
test "$fork_point" = auto && fork_point=t
;;
*) upstream_name="$1"
+ if test "$upstream_name" = "-"
+ then
+ upstream_name="@{-1}"
+ fi
shift
;;
esac
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 6d94b1f..00aba9f 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -88,6 +88,12 @@ test_expect_success 'rebase from ambiguous branch name' '
git rebase master
'
+test_expect_success 'rebase using shorthand' '
+ git checkout master
+ git checkout -b shorthand HEAD^
+ GIT_TRACE=1 git rebase -
+'
+
test_expect_success 'rebase a single mode change' '
git checkout master &&
git branch -D topic &&
--
1.8.5.2 (Apple Git-48)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] git-rebase: Teach rebase "-" shorthand.
2014-03-18 8:44 [PATCH] git-rebase: Teach rebase "-" shorthand Brian Gesiak
@ 2014-03-18 19:26 ` Torsten Bögershausen
2014-03-18 19:42 ` Junio C Hamano
1 sibling, 0 replies; 12+ messages in thread
From: Torsten Bögershausen @ 2014-03-18 19:26 UTC (permalink / raw)
To: Brian Gesiak; +Cc: git
On 03/18/2014 09:44 AM, Brian Gesiak wrote:
> Teach rebase the same shorthand as checkout and merge; that is, that "-"
> means "the branch we were previously on".
>
> Reported-by: Tim Chase <git@tim.thechases.com>
> Signed-off-by: Brian Gesiak <modocache@gmail.com>
> ---
> git-rebase.sh | 4 ++++
> t/t3400-rebase.sh | 6 ++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 5f6732b..2c75e9f 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -453,6 +453,10 @@ then
> test "$fork_point" = auto && fork_point=t
> ;;
> *) upstream_name="$1"
> + if test "$upstream_name" = "-"
> + then
> + upstream_name="@{-1}"
> + fi
> shift
> ;;
> esac
> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> index 6d94b1f..00aba9f 100755
> --- a/t/t3400-rebase.sh
> +++ b/t/t3400-rebase.sh
> @@ -88,6 +88,12 @@ test_expect_success 'rebase from ambiguous branch name' '
> git rebase master
> '
>
> +test_expect_success 'rebase using shorthand' '
> + git checkout master
we schould have the "&&" ^^
> + git checkout -b shorthand HEAD^
we schould have the "&&" ^^
> + GIT_TRACE=1 git rebase -
And why the GIT_TRACE ?
> +'
> +
> test_expect_success 'rebase a single mode change' '
> git checkout master &&
> git branch -D topic &&
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] git-rebase: Teach rebase "-" shorthand.
2014-03-18 8:44 [PATCH] git-rebase: Teach rebase "-" shorthand Brian Gesiak
2014-03-18 19:26 ` Torsten Bögershausen
@ 2014-03-18 19:42 ` Junio C Hamano
2014-03-19 11:02 ` [PATCH v2] " Brian Gesiak
1 sibling, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2014-03-18 19:42 UTC (permalink / raw)
To: Brian Gesiak; +Cc: git
Brian Gesiak <modocache@gmail.com> writes:
> Teach rebase the same shorthand as checkout and merge; that is, that "-"
> means "the branch we were previously on".
>
> Reported-by: Tim Chase <git@tim.thechases.com>
> Signed-off-by: Brian Gesiak <modocache@gmail.com>
> ---
> git-rebase.sh | 4 ++++
> t/t3400-rebase.sh | 6 ++++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/git-rebase.sh b/git-rebase.sh
> index 5f6732b..2c75e9f 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -453,6 +453,10 @@ then
> test "$fork_point" = auto && fork_point=t
> ;;
> *) upstream_name="$1"
> + if test "$upstream_name" = "-"
> + then
> + upstream_name="@{-1}"
> + fi
> shift
> ;;
> esac
> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> index 6d94b1f..00aba9f 100755
> --- a/t/t3400-rebase.sh
> +++ b/t/t3400-rebase.sh
> @@ -88,6 +88,12 @@ test_expect_success 'rebase from ambiguous branch name' '
> git rebase master
> '
>
> +test_expect_success 'rebase using shorthand' '
> + git checkout master
> + git checkout -b shorthand HEAD^
> + GIT_TRACE=1 git rebase -
I'd rather not to see that TRACE there. We would also want to make
sure the result is what we expect to see, not only the command does
not error out, no?
> +'
> +
> test_expect_success 'rebase a single mode change' '
> git checkout master &&
> git branch -D topic &&
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-18 19:42 ` Junio C Hamano
@ 2014-03-19 11:02 ` Brian Gesiak
2014-03-19 17:53 ` Junio C Hamano
0 siblings, 1 reply; 12+ messages in thread
From: Brian Gesiak @ 2014-03-19 11:02 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Torsten Bögershausen, Brian Gesiak
Teach rebase the same shorthand as checkout and merge; that is, that "-"
means "the branch we were previously on".
Reported-by: Tim Chase <git@tim.thechases.com>
Signed-off-by: Brian Gesiak <modocache@gmail.com>
---
git-rebase.sh | 4 ++++
t/t3400-rebase.sh | 11 +++++++++++
2 files changed, 15 insertions(+)
diff --git a/git-rebase.sh b/git-rebase.sh
index 5f6732b..2c75e9f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -453,6 +453,10 @@ then
test "$fork_point" = auto && fork_point=t
;;
*) upstream_name="$1"
+ if test "$upstream_name" = "-"
+ then
+ upstream_name="@{-1}"
+ fi
shift
;;
esac
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 6d94b1f..6176754 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -88,6 +88,17 @@ test_expect_success 'rebase from ambiguous branch name' '
git rebase master
'
+test_expect_success 'rebase using shorthand' '
+ git checkout master &&
+ git checkout -b shorthand HEAD^ &&
+ git rebase - 1>shorthand.stdout &&
+ git checkout master &&
+ git branch -D shorthand &&
+ git checkout -b shorthand HEAD^ &&
+ git rebase @{-1} 1>without_shorthand.stdout &&
+ test_i18ncmp without_shorthand.stdout shorthand.stdout
+'
+
test_expect_success 'rebase a single mode change' '
git checkout master &&
git branch -D topic &&
--
1.8.5.2 (Apple Git-48)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 11:02 ` [PATCH v2] " Brian Gesiak
@ 2014-03-19 17:53 ` Junio C Hamano
2014-03-19 18:02 ` John Keeping
0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2014-03-19 17:53 UTC (permalink / raw)
To: Brian Gesiak; +Cc: git, Torsten Bögershausen, Tim Chase
Brian Gesiak <modocache@gmail.com> writes:
> diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
> index 6d94b1f..6176754 100755
> --- a/t/t3400-rebase.sh
> +++ b/t/t3400-rebase.sh
> @@ -88,6 +88,17 @@ test_expect_success 'rebase from ambiguous branch name' '
> git rebase master
> '
>
> +test_expect_success 'rebase using shorthand' '
> + git checkout master &&
> + git checkout -b shorthand HEAD^ &&
> + git rebase - 1>shorthand.stdout &&
> + git checkout master &&
> + git branch -D shorthand &&
> + git checkout -b shorthand HEAD^ &&
> + git rebase @{-1} 1>without_shorthand.stdout &&
> + test_i18ncmp without_shorthand.stdout shorthand.stdout
> +'
A handful of issues here:
* "1>target" looks unconventional and wastes readers' time, forcing
them to wonder if there is anything special going on, only to
realize there isn't anything noteworthy. Saying ">target" like
everybody else does avoids attracting unnecessary attention.
* "rebase using shorthand" is somewhat a myopic title; it assumes
that the only short-hand relevant to rebase will be that a "-"
stands for "@{-1}" to specify the branch we rebase the current
branch off of.
* The usual filename for the output from the command being tested
is 'actual', and the usual filename for the expected output is
'expect'. In this case, you are verifying that the output from
"rebase -" is the same as the output from "rebase @{-1}", so it
is more conventional to call the former 'actual' and the latter
'expect'.
* Is the eye-candy output to the standard output what is the most
interesting during the execution of a rebase? Wouldn't we be
more interested to make sure that we did transplant the history
on the same commit between two cases?
"rebase -" with your change still says something like this:
First, rewinding head to replay your work on top of it...
Fast-forwarded HEAD to @{-1}.
instead of "Fast-forwarded HEAD to -". Somebody may later want
to "fix" this, making these two eye-candy output to be different
from each other, and what your test expects will no longer hold
(not that I think it is better to say "-" instead of @{-1}
there).
I'll tentatively queue it with a minor tweak (see below).
Thanks.
-- >8 --
From: Brian Gesiak <modocache@gmail.com>
Date: Wed, 19 Mar 2014 20:02:15 +0900
Subject: [PATCH] rebase: allow "-" short-hand for the previous branch
Teach rebase the same shorthand as checkout and merge to name the
branch to rebase the current branch on; that is, that "-" means "the
branch we were previously on".
Requested-by: Tim Chase <git@tim.thechases.com>
Signed-off-by: Brian Gesiak <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
git-rebase.sh | 4 ++++
t/t3400-rebase.sh | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/git-rebase.sh b/git-rebase.sh
index 8a3efa2..658c003 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -449,6 +449,10 @@ then
test "$fork_point" = auto && fork_point=t
;;
*) upstream_name="$1"
+ if test "$upstream_name" = "-"
+ then
+ upstream_name="@{-1}"
+ fi
shift
;;
esac
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index 6d94b1f..80e0a95 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -88,6 +88,23 @@ test_expect_success 'rebase from ambiguous branch name' '
git rebase master
'
+test_expect_success 'rebase off of the previous branch using "-"' '
+ git checkout master &&
+ git checkout HEAD^ &&
+ git rebase @{-1} >expect.messages &&
+ git merge-base master HEAD >expect.forkpoint &&
+
+ git checkout master &&
+ git checkout HEAD^ &&
+ git rebase - >actual.messages &&
+ git merge-base master HEAD >actual.forkpoint &&
+
+ test_cmp expect.forkpoint actual.forkpoint &&
+ # the next one is dubious---we may want to say "-",
+ # instead of @{-1}, in the message
+ test_i18ncmp expect.messages actual.messages
+'
+
test_expect_success 'rebase a single mode change' '
git checkout master &&
git branch -D topic &&
--
1.9.1-423-g4596e3a
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 17:53 ` Junio C Hamano
@ 2014-03-19 18:02 ` John Keeping
2014-03-19 18:09 ` Brian Gesiak
2014-03-19 19:02 ` Junio C Hamano
0 siblings, 2 replies; 12+ messages in thread
From: John Keeping @ 2014-03-19 18:02 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
On Wed, Mar 19, 2014 at 10:53:01AM -0700, Junio C Hamano wrote:
> "rebase -" with your change still says something like this:
>
> First, rewinding head to replay your work on top of it...
> Fast-forwarded HEAD to @{-1}.
>
> instead of "Fast-forwarded HEAD to -". Somebody may later want
> to "fix" this, making these two eye-candy output to be different
> from each other, and what your test expects will no longer hold
> (not that I think it is better to say "-" instead of @{-1}
> there).
I don't think either of these is correct. When using "-" with the
commands that already support it, I have occasionally found that "-"
isn't what I thought it was.
Can we use `git name-rev` to put the actual name here, so that people
who have not done what they intended can hopefully notice sooner?
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 18:02 ` John Keeping
@ 2014-03-19 18:09 ` Brian Gesiak
2014-03-19 19:02 ` Junio C Hamano
1 sibling, 0 replies; 12+ messages in thread
From: Brian Gesiak @ 2014-03-19 18:09 UTC (permalink / raw)
To: John Keeping; +Cc: Junio C Hamano, git, Torsten Bögershausen, Tim Chase
Thank you for the feedback and tweaks!
> Is the eye-candy output to the standard output what is the most
> interesting during the execution of a rebase? Wouldn't we be
> more interested to make sure that we did transplant the history
> on the same commit between two cases?
I agree. I'll consult the other tests to see how to write such a test.
> Can we use `git name-rev` to put the actual name here, so that people
> who have not done what they intended can hopefully notice sooner?
This sounds like a great idea! Doing so would mirror how `git checkout`
behaves; checkout informs the user of which branch they have switched
to when using the "-" shorthand: "Switched to branch 'master'".
Should I submit a new patch, or reroll this one?
- Brian Gesiak
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 18:02 ` John Keeping
2014-03-19 18:09 ` Brian Gesiak
@ 2014-03-19 19:02 ` Junio C Hamano
2014-03-19 19:12 ` John Keeping
1 sibling, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2014-03-19 19:02 UTC (permalink / raw)
To: John Keeping; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
John Keeping <john@keeping.me.uk> writes:
> On Wed, Mar 19, 2014 at 10:53:01AM -0700, Junio C Hamano wrote:
>> "rebase -" with your change still says something like this:
>>
>> First, rewinding head to replay your work on top of it...
>> Fast-forwarded HEAD to @{-1}.
>>
>> instead of "Fast-forwarded HEAD to -". Somebody may later want
>> to "fix" this, making these two eye-candy output to be different
>> from each other, and what your test expects will no longer hold
>> (not that I think it is better to say "-" instead of @{-1}
>> there).
>
> I don't think either of these is correct. When using "-" with the
> commands that already support it, I have occasionally found that "-"
> isn't what I thought it was.
>
> Can we use `git name-rev` to put the actual name here, so that people
> who have not done what they intended can hopefully notice sooner?
That sounds like a right thing to do. It however is totally
orthogonal to the change we are discussing, and should be done as a
separate patch.
Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 19:02 ` Junio C Hamano
@ 2014-03-19 19:12 ` John Keeping
2014-03-19 19:41 ` Junio C Hamano
0 siblings, 1 reply; 12+ messages in thread
From: John Keeping @ 2014-03-19 19:12 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
On Wed, Mar 19, 2014 at 12:02:01PM -0700, Junio C Hamano wrote:
> John Keeping <john@keeping.me.uk> writes:
>
> > On Wed, Mar 19, 2014 at 10:53:01AM -0700, Junio C Hamano wrote:
> >> "rebase -" with your change still says something like this:
> >>
> >> First, rewinding head to replay your work on top of it...
> >> Fast-forwarded HEAD to @{-1}.
> >>
> >> instead of "Fast-forwarded HEAD to -". Somebody may later want
> >> to "fix" this, making these two eye-candy output to be different
> >> from each other, and what your test expects will no longer hold
> >> (not that I think it is better to say "-" instead of @{-1}
> >> there).
> >
> > I don't think either of these is correct. When using "-" with the
> > commands that already support it, I have occasionally found that "-"
> > isn't what I thought it was.
> >
> > Can we use `git name-rev` to put the actual name here, so that people
> > who have not done what they intended can hopefully notice sooner?
>
> That sounds like a right thing to do. It however is totally
> orthogonal to the change we are discussing, and should be done as a
> separate patch.
Is it not part of adding support for "-"?
I'm not arguing for a change to any existing functionality, just to the
behaviour introduced by this patch, which is basically a change from
"@{-1}" to "$(git name-rev --name-only @{-1})" in the patch. (The error
handling of name-rev appears not to be very useful here when the
previous branch has been deleted, so I don't think it's quite that
simple, but that's the principle.)
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 19:12 ` John Keeping
@ 2014-03-19 19:41 ` Junio C Hamano
2014-03-19 19:55 ` John Keeping
0 siblings, 1 reply; 12+ messages in thread
From: Junio C Hamano @ 2014-03-19 19:41 UTC (permalink / raw)
To: John Keeping; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
John Keeping <john@keeping.me.uk> writes:
> On Wed, Mar 19, 2014 at 12:02:01PM -0700, Junio C Hamano wrote:
>> John Keeping <john@keeping.me.uk> writes:
>>
>> > On Wed, Mar 19, 2014 at 10:53:01AM -0700, Junio C Hamano wrote:
>> >> "rebase -" with your change still says something like this:
>> >>
>> >> First, rewinding head to replay your work on top of it...
>> >> Fast-forwarded HEAD to @{-1}.
>> >>
>> >> instead of "Fast-forwarded HEAD to -". Somebody may later want
>> >> to "fix" this, making these two eye-candy output to be different
>> >> from each other, and what your test expects will no longer hold
>> >> (not that I think it is better to say "-" instead of @{-1}
>> >> there).
>> >
>> > I don't think either of these is correct. When using "-" with the
>> > commands that already support it, I have occasionally found that "-"
>> > isn't what I thought it was.
>> >
>> > Can we use `git name-rev` to put the actual name here, so that people
>> > who have not done what they intended can hopefully notice sooner?
>>
>> That sounds like a right thing to do. It however is totally
>> orthogonal to the change we are discussing, and should be done as a
>> separate patch.
>
> Is it not part of adding support for "-"?
I thought your suggestion was:
'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
'Fast-forwarded HEAD to 4f407407 (rebase: allow "-" short-hand
for the previous branch, 2014-03-19)' instead.
Or it could be:
'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
'Fast-forwarded HEAD to master' instead.
In either case, it does not look like such a change is about
teaching "-" as a synonym to "@{-1}".
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 19:41 ` Junio C Hamano
@ 2014-03-19 19:55 ` John Keeping
2014-03-19 21:02 ` Junio C Hamano
0 siblings, 1 reply; 12+ messages in thread
From: John Keeping @ 2014-03-19 19:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
On Wed, Mar 19, 2014 at 12:41:31PM -0700, Junio C Hamano wrote:
> John Keeping <john@keeping.me.uk> writes:
>
> > On Wed, Mar 19, 2014 at 12:02:01PM -0700, Junio C Hamano wrote:
> >> John Keeping <john@keeping.me.uk> writes:
> >>
> >> > On Wed, Mar 19, 2014 at 10:53:01AM -0700, Junio C Hamano wrote:
> >> >> "rebase -" with your change still says something like this:
> >> >>
> >> >> First, rewinding head to replay your work on top of it...
> >> >> Fast-forwarded HEAD to @{-1}.
> >> >>
> >> >> instead of "Fast-forwarded HEAD to -". Somebody may later want
> >> >> to "fix" this, making these two eye-candy output to be different
> >> >> from each other, and what your test expects will no longer hold
> >> >> (not that I think it is better to say "-" instead of @{-1}
> >> >> there).
> >> >
> >> > I don't think either of these is correct. When using "-" with the
> >> > commands that already support it, I have occasionally found that "-"
> >> > isn't what I thought it was.
> >> >
> >> > Can we use `git name-rev` to put the actual name here, so that people
> >> > who have not done what they intended can hopefully notice sooner?
> >>
> >> That sounds like a right thing to do. It however is totally
> >> orthogonal to the change we are discussing, and should be done as a
> >> separate patch.
> >
> > Is it not part of adding support for "-"?
>
> I thought your suggestion was:
>
> 'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
> 'Fast-forwarded HEAD to 4f407407 (rebase: allow "-" short-hand
> for the previous branch, 2014-03-19)' instead.
>
> Or it could be:
>
> 'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
> 'Fast-forwarded HEAD to master' instead.
>
> In either case, it does not look like such a change is about
> teaching "-" as a synonym to "@{-1}".
My suggestion was specifically:
'rebase -' says 'Fast-forwarded HEAD to -'. It should say
'Fast-forwarded HEAD to master' instead.
I'm not sure it's desirable to attempt to canonicalise whatever the user
writes on the command line, but since we're special-casing '-' I think
it is a good thing to print the branch name in that case.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2] git-rebase: Teach rebase "-" shorthand.
2014-03-19 19:55 ` John Keeping
@ 2014-03-19 21:02 ` Junio C Hamano
0 siblings, 0 replies; 12+ messages in thread
From: Junio C Hamano @ 2014-03-19 21:02 UTC (permalink / raw)
To: John Keeping; +Cc: Brian Gesiak, git, Torsten Bögershausen, Tim Chase
John Keeping <john@keeping.me.uk> writes:
>> I thought your suggestion was:
>>
>> 'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
>> 'Fast-forwarded HEAD to 4f407407 (rebase: allow "-" short-hand
>> for the previous branch, 2014-03-19)' instead.
>>
>> Or it could be:
>>
>> 'rebase @{-1}' says 'Fast-fowarded HEAD to @{-1}'. It should say
>> 'Fast-forwarded HEAD to master' instead.
>>
>> In either case, it does not look like such a change is about
>> teaching "-" as a synonym to "@{-1}".
>
> My suggestion was specifically:
>
> 'rebase -' says 'Fast-forwarded HEAD to -'. It should say
> 'Fast-forwarded HEAD to master' instead.
OK, it was closer to the latter.
But why is it OK to leave @{-1}, which is just as "hmm, I do not
remember what the previous branch was myself" when the user says
"@{-1}" in the output while it not OK to leave "-" in the output?
I do not think of any sane reason, and that is why I think this
improvement is not part of "teaching rebase that '-' can be used in
place of @{-1}" topic.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-03-19 21:02 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-18 8:44 [PATCH] git-rebase: Teach rebase "-" shorthand Brian Gesiak
2014-03-18 19:26 ` Torsten Bögershausen
2014-03-18 19:42 ` Junio C Hamano
2014-03-19 11:02 ` [PATCH v2] " Brian Gesiak
2014-03-19 17:53 ` Junio C Hamano
2014-03-19 18:02 ` John Keeping
2014-03-19 18:09 ` Brian Gesiak
2014-03-19 19:02 ` Junio C Hamano
2014-03-19 19:12 ` John Keeping
2014-03-19 19:41 ` Junio C Hamano
2014-03-19 19:55 ` John Keeping
2014-03-19 21:02 ` Junio C Hamano
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).