git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Elijah Newren <newren@gmail.com>
Cc: git <git@vger.kernel.org>, Alban Gruin <alban.gruin@gmail.com>
Subject: Re: rebase backend change interaction with rebase.abbreviateCommands and autostash
Date: Tue, 14 Apr 2020 16:45:12 -0400	[thread overview]
Message-ID: <09D4E5D9-9F7C-447B-9E46-C7B98EF1BD38@gmail.com> (raw)
In-Reply-To: <CABPp-BGSQ-FLv-9PS8EJGCivd2pMwYi57mgqKP_7U6HoRuxgAQ@mail.gmail.com>


> 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!


      reply	other threads:[~2020-04-14 20:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09D4E5D9-9F7C-447B-9E46-C7B98EF1BD38@gmail.com \
    --to=levraiphilippeblain@gmail.com \
    --cc=alban.gruin@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).