From: Alexandre Badez <alexandre@badez.eu>
To: git@vger.kernel.org
Subject: Git log --decorate show prefetch objects
Date: Thu, 4 Apr 2024 12:16:20 +0200 [thread overview]
Message-ID: <5a16d4e3-6fa4-45f3-ae79-576f3fa80d44@badez.eu> (raw)
# What did you do before the bug happened? (Steps to reproduce your issue)
<on a git repository not fetch from a "long" time so you have missing
branches and/or objects>
git maintenance run --task=prefetch
git log --oneline --decorate --all --graph
NOTE: here:
- xxxxxxx commits are local commits,
- yyyyyyy commits are remote commits fetch previously,
- zzzzzzz commits are remote commits prefetch.
* xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat
* xxxxxxx feat
| * yyyyyyy (origin/feature) feat
|/
* xxxxxxx feat
| * yyyyyyy (origin/a-fix) fix
|/
* xxxxxxx fix
| * zzzzzzz feat
| * zzzzzzz feat
| * zzzzzzz feat
|/
* xxxxxxx feat
| * zzzzzzz feat
|/
* xxxxxxx fix
According to the git-log documentation (cf:
https://git-scm.com/docs/git-log#Documentation/git-log.txt---all ):
--all Pretend as if all the refs in refs/, along with HEAD, are
listed on the command line as <commit>.
But the --decorate (cf:
https://git-scm.com/docs/git-log#Documentation/git-log.txt---decorateshortfullautono
):
--decorate
Print out the ref names of any commits that are shown. If short is
specified,
the ref name prefixes refs/heads/, refs/tags/ and refs/remotes/
will not be printed.
[...]
The option --decorate is short-hand for --decorate=short.
Documentation of maintenant prefetch (cf:
https://git-scm.com/docs/git-maintenance#Documentation/git-maintenance.txt-prefetch
):
The prefetch task updates the object directory with the latest
objects from all registered remotes.
For each remote, a git fetch command is run.
The configured refspec is modified to place all requested refs
within refs/prefetch/.
Also, tags are not updated.
# What did you expect to happen? (Expected behavior)
I would have prefer this output (prefetch not shown):
* xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat
* xxxxxxx feat
| * yyyyyyy (origin/feature) feat
|/
* xxxxxxx feat
| * yyyyyyy (origin/a-fix) fix
|/
* xxxxxxx fix
* xxxxxxx feat
* xxxxxxx fix
Or this output (prefetch properly decorated):
* xxxxxxx (HEAD -> current-dev, origin/master, origin/HEAD) feat
* xxxxxxx feat
| * yyyyyyy (origin/feature) feat
|/
* xxxxxxx feat
| * yyyyyyy (origin/a-fix) fix
|/
* xxxxxxx fix
| * zzzzzzz (refs/prefetch/remotes/origin/anotherfeat) feat
| * zzzzzzz feat
| * zzzzzzz feat
|/
* xxxxxxx feat
| * zzzzzzz (refs/prefetch/remotes/origin/anotherotherfeat) feat
|/
* xxxxxxx fix
# What happened instead? (Actual behavior)
Prefetch object are return and not properly decorated.
# What's different between what you expected and what actually happened?
I would have preferd prefetched objects not displayed
# Information
[System Info]
git version: git version 2.44.0
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/bash
bash version: 5.2.26
uname: Linux 6.8.1 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:19:29 UTC
2024 x86_64
compiler info: gnuc: 13.2
libc info: glibc: 2.39
$SHELL (typically, interactive shell): /bin/fish
next reply other threads:[~2024-04-04 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-04 10:16 Alexandre Badez [this message]
2024-04-04 16:56 ` Git log --decorate show prefetch objects Junio C Hamano
2024-04-04 21:37 ` Alexandre Badez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a16d4e3-6fa4-45f3-ae79-576f3fa80d44@badez.eu \
--to=alexandre@badez.eu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).