Re: Git 2.48. Changed behavior of the git fetch

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

 



On Thu Jan 09, 2025 at 12:49, Danila Manturov <danila.manturov@xxxxxxxxxxxxx> wrote:
> Hello. I work in TeamCity and we have tests of our git integration
> running with the latest master of the git repository. Some tests
> started to fail since
> https://github.com/git/git/commit/5f212684abb66c9604e745a2296af8c4bb99961c
> I noticed that tags are not fetched with shallow clones. I published
> the test repository to GitHub and reproduced it with commands, the
> result is different for 2.47.1 and 2.48.rc0
>
> git init
> git remote add origin git@xxxxxxxxxx:manturovDan/repo_for_shallow_fetch.git
> git fetch --progress --depth=1 --recurse-submodules=no origin
> +fd1eb9776b5fad5cc433586f7933811c6853917d:refs/remotes/origin/main
> git tag | cat
>
> RESULT:
> tag1 (git version 2.47.1)
> <empty> (git version 2.48.0.rc0.38.gff795a5c5e)
>
> the repository log:
> * commit fd1eb9776b5fad5cc433586f7933811c6853917d (tag: tag1, main)
> | Author: Victory Petrenko <vbedrosova@xxxxxxxxx>
> | Date:   Wed Feb 3 13:05:03 2021 +0100
> |
> |     recent commit
> |
> * commit 64195c330d99c467a142f682bc23d4de3a68551d
> | Author: Victory Petrenko <vbedrosova@xxxxxxxxx>
> | Date:   Wed Feb 3 13:04:44 2021 +0100
> |
> |     change
> |
> * commit a1d6299597f8d6f6d8316577c46cc8fffd657d5e (tag: tag2)
>   Author: Victory Petrenko <vbedrosova@xxxxxxxxx>
>   Date:   Wed Feb 3 13:04:17 2021 +0100
>
>       initial commit

This should already be fixed by

6c915c3f85 (fetch: do not ask for HEAD unnecessarily, 2024-12-06)

	[snip]
    Incidentally, because the unconditional request to list "HEAD"
    affected the number of ref-prefixes requested in the ls-remote
    request, this affected how the requests for tags are added to the
    same ls-remote request, breaking "git fetch --tags $URL" performed
    against a URL that is not configured as a remote.

so using 2.48 should be ok.

Best,
Bence






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux