All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stepan Kasal <kasal@ucw.cz>
To: git@vger.kernel.org
Subject: Bug with git merge-base and a packed ref
Date: Wed, 12 Oct 2016 12:37:16 +0200	[thread overview]
Message-ID: <20161012103716.GA31533@ucw.cz> (raw)

Hello,

first, I observed a bug with git pull --rebase:
if the remote branch got rebased and the loval branch was updated,
pull tried to rebase the whole branch, not the local increment.

A reproducer would look like that

# in repo1:
git checkout tmp
cd ..
git clone repo1 repo2
cd repo1
git rebase elsewhere tmp
cd ../repo2
# edit
git commit -a -m 'Another commit'
git pull -r

The last command performs something like
   git rebase new-origin/tmp
instead of
   git rebase --onto new-origin/tmp old-origin/tmp

I'm using git version 2.10.1.windows.1


I tried to debug the issue:
I found that the bug happens only at the very first pull after clone.
I was able to reproduce it with git-pull.sh

The problem seems to be that command
  git merge-base --fork-point refs/remotes/origin/tmp refs/heads/tmp
returns nothing, because the refs are packed.

Could you please fix merge-base so that it understands packed refs?

Thanks,
  Stepan

             reply	other threads:[~2016-10-12 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12 10:37 Stepan Kasal [this message]
2016-10-12 16:32 ` Bug with git merge-base and a packed ref Jeff King
2016-10-12 19:33   ` Stepan Kasal
2016-10-12 20:10   ` [PATCH] merge-base: handle --fork-point without reflog Jeff King
2016-10-12 21:29     ` Junio C Hamano
2016-10-13  6:34     ` Stepan Kasal

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=20161012103716.GA31533@ucw.cz \
    --to=kasal@ucw.cz \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.