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

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.

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


Reply to: