git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Bug with git merge-base and a packed ref
@ 2016-10-12 10:37 Stepan Kasal
  2016-10-12 16:32 ` Jeff King
  0 siblings, 1 reply; 6+ messages in thread
From: Stepan Kasal @ 2016-10-12 10:37 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-10-13  6:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12 10:37 Bug with git merge-base and a packed ref Stepan Kasal
2016-10-12 16:32 ` 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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).