[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fixed steps to reproduce [stretch-backports] git fetch fails to fetch new tags from upstream remote



Hi Ryan,

Sorry for the long delay (swamped with work and failing PSU).  CCing
you only because it's been so long and I wanted my thanks to reach
you.

To anyone else reading this: sorry for my ignorance.

On Mon, Oct 22, 2018 at 08:57:21PM -0700, Ryan Tandy wrote:
> Hi Nicholas,
> 
> On Mon, Oct 22, 2018 at 11:28:37PM -0400, Nicholas D Steeves wrote:
> > This example implicates salsa, but is actually reproducible:
> > 
> > git clone git@salsa.debian.org:emacsen-team/find-file-in-project.git
> > cd find-file-in-project
> > git remote add upstream-vcs https://github.com/technomancy/find-file-in-project.git
> > git fetch upstream-vcs
> > 
> > Result:
> > 
> > Fails to fetch the upstream 5.6.8 and 5.7.0 tags.  Fetches up to
> > 5.6.7.  As shown in the previous single github remote example 5.6.8
> > and 5.7.0 are fetchable.
> 
> I tried this with git from stretch, stretch-backports, and unstable and the
> results were the same in all three cases.
> 
> First of all, the initial clone from salsa did get the 5.6.8 tag. However,
> fetching upstream-vcs did not get 5.7.0, as you noted.
> 
> I believe this is because the upstream history diverged after 5.6.8. To see
> that, run:
> 
> git fetch --all --tags
> git log --oneline --graph upstream-vcs/master 5.7.0

Thanks for the tips :-)  I didn't know git had a nice graph without
using magit.

> After a3d89bc ("documentation"), the history forks. The next commits on
> master and the 5.7.0 branch have the same commit message, but different
> hashes. The diffs are also different, so this looks like a mistake on
> upstream's part; perhaps they amended the commit after making the tag, or
> updated the tag but forgot to force-push it?
> 
> 83c9384 (upstream-vcs/master) could ignore directory and file separately
> 0c48407 (tag: 5.7.0) could ignore directory and file separately
> 
> More simply: "git branch --contains 5.7.0" returns no results.

This makes sense, and that's why "fetch --all --tags" was necessary.
Thank you for very much for taking the time to check this, and for
teaching me how to check for it.  Sorry for my ignorance ^^

> The git documentation does specify that by default, only tags pointing into
> the history being fetched are retrieved. As no branch in the upstream-vcs
> contains the 5.7.0 tag, it's not included.
> 
> Hope this helps,
> Ryan

Yes, it definitely helps!  Also, I find it strange that there is a
delta between 83c9384 on master and the detached 5.7.0 (0c48407) tag
so I seems I'll have to contact upstream about which commit is
intended as the authoritative 5.7.0.


Thank you,
Nicholas

Attachment: signature.asc
Description: PGP signature


Reply to: