git/list[1] front-page[2] threads[3] people[4] search[5] about
 

rebase backend change interaction with rebase.abbreviateCommands and autostash

From
PBPhilippe Blain <philippe.blain@me.com>
Date
Apr 14, 2020, 20:27 UTC
Message-ID
<34B51521-42CD-445B-AE91-4A659A7FE661@me.com>
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.

Next: Elijah Newren
Message 1 of 3 in “rebase backend change interaction with rebase.abbreviateCommands and autostash”
  1. Philippe BlainApr 14, 2020
  2. Elijah NewrenApr 14, 2020
  3. Philippe BlainApr 14, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.