{"thread":{"id":"61265","subject":"Git log --decorate show prefetch objects","startedAt":"2024-04-04T10:16:23Z","lastAt":"2024-04-04T21:37:57Z","messageCount":3,"participants":["Alexandre Badez","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"492231","messageId":"5a16d4e3-6fa4-45f3-ae79-576f3fa80d44@badez.eu","threadId":"61265","inReplyTo":null,"subject":"Git log --decorate show prefetch objects","fromName":"Alexandre Badez","fromEmail":"alexandre@badez.eu","sentAt":"2024-04-04T10:16:20Z","receivedAt":"2024-04-04T10:16:23Z","isPatch":false,"sender":{"key":"alexandre@badez.eu","avatar":null},"body":"# What did you do before the bug happened? (Steps to reproduce your issue)\n\n<on a git repository not fetch from a \"long\" time so you have missing \nbranches and/or objects>\n\ngit maintenance run --task=prefetch\n\ngit log --oneline --decorate --all --graph\n\nNOTE: here:\n     - xxxxxxx commits are local commits,\n     - yyyyyyy commits are remote commits fetch previously,\n     - zzzzzzz commits are remote commits prefetch.\n\n     * xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat\n     * xxxxxxx feat\n     | * yyyyyyy (origin/feature) feat\n     |/\n     * xxxxxxx feat\n     | * yyyyyyy (origin/a-fix) fix\n     |/\n     * xxxxxxx fix\n     | * zzzzzzz feat\n     | * zzzzzzz feat\n     | * zzzzzzz feat\n     |/\n     * xxxxxxx feat\n     | * zzzzzzz feat\n     |/\n     * xxxxxxx fix\n\n\nAccording to the git-log  documentation (cf: \nhttps://git-scm.com/docs/git-log#Documentation/git-log.txt---all ):\n\n     --all Pretend as if all the refs in refs/, along with HEAD, are \nlisted on the command line as <commit>.\n\nBut the --decorate (cf: \nhttps://git-scm.com/docs/git-log#Documentation/git-log.txt---decorateshortfullautono \n):\n\n     --decorate\n     Print out the ref names of any commits that are shown. If short is \nspecified,\n     the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/ \nwill not be printed.\n     [...]\n     The option --decorate is short-hand for --decorate=short.\n\nDocumentation of maintenant prefetch (cf: \nhttps://git-scm.com/docs/git-maintenance#Documentation/git-maintenance.txt-prefetch \n):\n\n     The prefetch task updates the object directory with the latest \nobjects from all registered remotes.\n     For each remote, a git fetch command is run.\n     The configured refspec is modified to place all requested refs \nwithin refs/prefetch/.\n     Also, tags are not updated.\n\n\n\n# What did you expect to happen? (Expected behavior)\n\nI would have prefer this output (prefetch not shown):\n\n     * xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat\n     * xxxxxxx feat\n     | * yyyyyyy (origin/feature) feat\n     |/\n     * xxxxxxx feat\n     | * yyyyyyy (origin/a-fix) fix\n     |/\n     * xxxxxxx fix\n     * xxxxxxx feat\n     * xxxxxxx fix\n\nOr this output (prefetch properly decorated):\n\n     * xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat\n     * xxxxxxx feat\n     | * yyyyyyy (origin/feature) feat\n     |/\n     * xxxxxxx feat\n     | * yyyyyyy (origin/a-fix) fix\n     |/\n     * xxxxxxx fix\n     | * zzzzzzz (refs/prefetch/remotes/origin/anotherfeat) feat\n     | * zzzzzzz feat\n     | * zzzzzzz feat\n     |/\n     * xxxxxxx feat\n     | * zzzzzzz (refs/prefetch/remotes/origin/anotherotherfeat) feat\n     |/\n     * xxxxxxx fix\n\n\n# What happened instead? (Actual behavior)\n\nPrefetch object are return and not properly decorated.\n\n\n\n# What's different between what you expected and what actually happened?\n\nI would have preferd prefetched objects not displayed\n\n\n# Information\n\n[System Info]\ngit version: git version 2.44.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/bash\nbash version: 5.2.26\nuname: Linux 6.8.1 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:19:29 UTC \n2024 x86_64\ncompiler info: gnuc: 13.2\nlibc info: glibc: 2.39\n$SHELL (typically, interactive shell): /bin/fish\n\n"},{"id":"492253","messageId":"xmqqh6gh12yp.fsf@gitster.g","threadId":"61265","inReplyTo":"5a16d4e3-6fa4-45f3-ae79-576f3fa80d44@badez.eu","subject":"Re: Git log --decorate show prefetch objects","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-04-04T16:56:30Z","receivedAt":"2024-04-04T16:56:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alexandre Badez <alexandre@badez.eu> writes:\n\n> # What did you do before the bug happened? (Steps to reproduce your issue)\n>\n> <on a git repository not fetch from a \"long\" time so you have missing\n> branches and/or objects>\n>\n> git maintenance run --task=prefetch\n>\n> git log --oneline --decorate --all --graph\n\nI do not use the prefetch stuff, but unfortunately the person who\nwas most familiar with \"maintenance\" are no longer active on this\nlist, so let me take a crack.\n\nI think your complaint is that \"--all\" really means \"all\", not just\n\"heads\" and \"tags\" but also includes \"prefetch\", while the prefetch\nhierarchy is not included in the \"--decorate\" sources.\n\nWhat does\n\n    $ git log --oneline --branches --tags --decorate --graph\n\nshow, and is it closer to what you expected (note: this is not a\ndirect suggestion of a workaround---trying to gauge what the\ndirection is to move forward)?\n\nThanks.\n"},{"id":"492272","messageId":"a8c030bb-b7ff-4628-a104-65e64a1feb93@badez.eu","threadId":"61265","inReplyTo":"xmqqh6gh12yp.fsf@gitster.g","subject":"Re: Git log --decorate show prefetch objects","fromName":"Alexandre Badez","fromEmail":"alexandre@badez.eu","sentAt":"2024-04-04T21:37:53Z","receivedAt":"2024-04-04T21:37:57Z","isPatch":false,"sender":{"key":"alexandre@badez.eu","avatar":null},"body":"On 04/04/2024 18:56, Junio C Hamano wrote:\n\n> Alexandre Badez <alexandre@badez.eu> writes:\n>\n>> # What did you do before the bug happened? (Steps to reproduce your issue)\n>>\n>> <on a git repository not fetch from a \"long\" time so you have missing\n>> branches and/or objects>\n>>\n>> git maintenance run --task=prefetch\n>>\n>> git log --oneline --decorate --all --graph\n> I do not use the prefetch stuff, but unfortunately the person who\n> was most familiar with \"maintenance\" are no longer active on this\n> list, so let me take a crack.\n>\n> I think your complaint is that \"--all\" really means \"all\", not just\n> \"heads\" and \"tags\" but also includes \"prefetch\", while the prefetch\n> hierarchy is not included in the \"--decorate\" sources.\n>\n> What does\n>\n>      $ git log --oneline --branches --tags --decorate --graph\n>\n> show, and is it closer to what you expected (note: this is not a\n> direct suggestion of a workaround---trying to gauge what the\n> direction is to move forward)?\n>\n> Thanks.\n\n\nIndeed, I missed the --branches (and --remotes) options; they do a \nbetter job in my case.\n\nMaybe --all have a \"legacy behaviour\" so it's on me to move to new and \nbetter options.\n\nThanks.\n\n\n"}]}