* rebase backend change interaction with rebase.abbreviateCommands and autostash
@ 2020-04-14 20:27 Philippe Blain
2020-04-14 20:30 ` Elijah Newren
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Blain @ 2020-04-14 20:27 UTC (permalink / raw)
To: git; +Cc: Elijah Newren
Hi,
I just had a bizarre error related to the change in the merge backend. I don't have a full reproducer yet but the following sequence should hopefully give some hints.
In my config for this repo I have `pull.rebase=true` and in my global config I have
[rebase]
abbreviateCommands = true
autoSquash = true
Also my local `master` branch tracks `origin/master`.
If `master` on `origin` is at the same commit as my local master branch, and I have some uncommitted change so I must use `--autostash`:
```
$ git pull --autostash
Created autostash: 6a6c685
Applied autostash.
error: nothing to do
$ git pull --autostash --apply
# or right that just works for `git rebase`
```
Now if `master` on `origin` is ahead of my local `master`:
```
$ git pull --autostash
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 6 (delta 4), reused 0 (delta 0)
Unpacking objects: 100% (6/6), 758 bytes | 6.00 KiB/s, done.
From <redacted>
42033de..a3d6919 master -> origin/master
Created autostash: cdae23b
Applied autostash.
error: nothing to do
Now if I stash manually and re-pull:
$ git stash push -m "test rebase merge"
Saved working directory and index state On master: test rebase merge
$ git pull
Updating 42033de..a3d6919
Fast-forward
.gitconfig | 1 +
.tmux.conf | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
error: nothing to do
$ git pull
Already up to date.
error: nothing to do
$ git -c rebase.abbreviateCommands=0 pull
Already up to date.
Successfully rebased and updated refs/heads/master.
Note: I also got "error: nothing to do" when manually running the commands in the last test of t/t5572-pull-submodule.sh ("branch has no merge base with remote-tracking counterpart') (and again using `git -c rebase.abbreviateCommands=0` succeeded).
Cheers,
Philippe.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rebase backend change interaction with rebase.abbreviateCommands and autostash
2020-04-14 20:27 rebase backend change interaction with rebase.abbreviateCommands and autostash Philippe Blain
@ 2020-04-14 20:30 ` Elijah Newren
2020-04-14 20:45 ` Philippe Blain
0 siblings, 1 reply; 3+ messages in thread
From: Elijah Newren @ 2020-04-14 20:30 UTC (permalink / raw)
To: Philippe Blain; +Cc: git, Alban Gruin
On Tue, Apr 14, 2020 at 1:27 PM Philippe Blain <philippe.blain@me.com> wrote:
>
> Hi,
>
> I just had a bizarre error related to the change in the merge backend. I don't have a full reproducer yet but the following sequence should hopefully give some hints.
>
> In my config for this repo I have `pull.rebase=true` and in my global config I have
>
> [rebase]
> abbreviateCommands = true
> autoSquash = true
>
> Also my local `master` branch tracks `origin/master`.
>
> If `master` on `origin` is at the same commit as my local master branch, and I have some uncommitted change so I must use `--autostash`:
>
> ```
> $ git pull --autostash
> Created autostash: 6a6c685
> Applied autostash.
> error: nothing to do
>
> $ git pull --autostash --apply
> # or right that just works for `git rebase`
> ```
>
> Now if `master` on `origin` is ahead of my local `master`:
>
> ```
> $ git pull --autostash
> remote: Counting objects: 6, done.
> remote: Compressing objects: 100% (6/6), done.
> remote: Total 6 (delta 4), reused 0 (delta 0)
> Unpacking objects: 100% (6/6), 758 bytes | 6.00 KiB/s, done.
> From <redacted>
> 42033de..a3d6919 master -> origin/master
> Created autostash: cdae23b
> Applied autostash.
> error: nothing to do
>
> Now if I stash manually and re-pull:
>
> $ git stash push -m "test rebase merge"
> Saved working directory and index state On master: test rebase merge
> $ git pull
> Updating 42033de..a3d6919
> Fast-forward
> .gitconfig | 1 +
> .tmux.conf | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
> error: nothing to do
> $ git pull
> Already up to date.
> error: nothing to do
> $ git -c rebase.abbreviateCommands=0 pull
> Already up to date.
> Successfully rebased and updated refs/heads/master.
>
> Note: I also got "error: nothing to do" when manually running the commands in the last test of t/t5572-pull-submodule.sh ("branch has no merge base with remote-tracking counterpart') (and again using `git -c rebase.abbreviateCommands=0` succeeded).
>
> Cheers,
> Philippe.
What version of git are you running with? Does it include Alban's
fixed for the rebase.abbreviateCommands error?
(https://lore.kernel.org/git/20200330124236.6716-1-alban.gruin@gmail.com/)
Elijah
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: rebase backend change interaction with rebase.abbreviateCommands and autostash
2020-04-14 20:30 ` Elijah Newren
@ 2020-04-14 20:45 ` Philippe Blain
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Blain @ 2020-04-14 20:45 UTC (permalink / raw)
To: Elijah Newren; +Cc: git, Alban Gruin
> Le 14 avr. 2020 à 16:30, Elijah Newren <newren@gmail.com> a écrit :
>
> On Tue, Apr 14, 2020 at 1:27 PM Philippe Blain <philippe.blain@me.com> wrote:
>>
>> Hi,
>>
>> I just had a bizarre error related to the change in the merge backend. I don't have a full reproducer yet but the following sequence should hopefully give some hints.
>>
>> In my config for this repo I have `pull.rebase=true` and in my global config I have
>>
>> [rebase]
>> abbreviateCommands = true
>> autoSquash = true
>>
>> Also my local `master` branch tracks `origin/master`.
>>
>> If `master` on `origin` is at the same commit as my local master branch, and I have some uncommitted change so I must use `--autostash`:
>>
>> ```
>> $ git pull --autostash
>> Created autostash: 6a6c685
>> Applied autostash.
>> error: nothing to do
>>
>> $ git pull --autostash --apply
>> # or right that just works for `git rebase`
>> ```
>>
>> Now if `master` on `origin` is ahead of my local `master`:
>>
>> ```
>> $ git pull --autostash
>> remote: Counting objects: 6, done.
>> remote: Compressing objects: 100% (6/6), done.
>> remote: Total 6 (delta 4), reused 0 (delta 0)
>> Unpacking objects: 100% (6/6), 758 bytes | 6.00 KiB/s, done.
>> From <redacted>
>> 42033de..a3d6919 master -> origin/master
>> Created autostash: cdae23b
>> Applied autostash.
>> error: nothing to do
>>
>> Now if I stash manually and re-pull:
>>
>> $ git stash push -m "test rebase merge"
>> Saved working directory and index state On master: test rebase merge
>> $ git pull
>> Updating 42033de..a3d6919
>> Fast-forward
>> .gitconfig | 1 +
>> .tmux.conf | 2 +-
>> 2 files changed, 2 insertions(+), 1 deletion(-)
>> error: nothing to do
>> $ git pull
>> Already up to date.
>> error: nothing to do
>> $ git -c rebase.abbreviateCommands=0 pull
>> Already up to date.
>> Successfully rebased and updated refs/heads/master.
>>
>> Note: I also got "error: nothing to do" when manually running the commands in the last test of t/t5572-pull-submodule.sh ("branch has no merge base with remote-tracking counterpart') (and again using `git -c rebase.abbreviateCommands=0` succeeded).
>>
>> Cheers,
>> Philippe.
>
> What version of git are you running with? Does it include Alban's
> fixed for the rebase.abbreviateCommands error?
> (https://lore.kernel.org/git/20200330124236.6716-1-alban.gruin@gmail.com/)
I was not aware of this patch series - I'm at v2.26.0-106-g9fadedd637 (on `master`), so no it does not include it.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-14 20:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 20:27 rebase backend change interaction with rebase.abbreviateCommands and autostash Philippe Blain
2020-04-14 20:30 ` Elijah Newren
2020-04-14 20:45 ` Philippe Blain
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).