git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[Bug] --simplify-by-decoration prints undecorated commit

From
Aleksander Korzyński <ak@akorzy.net>
Date
Dec 16, 2024, 15:09 UTC
Message-ID
<CAEtHj8AXKrQfyAW9FSv6yC-8GF1AkPixMFjSye+B51pJ4fOtWA@mail.gmail.com>
Hello,

In the following scenario, --simplify-by-decoration prints an undecorated commit, which seems to be a bug.

> What did you do before the bug happened? (Steps to reproduce your issue)

# Clone this repo $ git clone https://github.com/bitnami/charts.git

# Test --simplify-by-decoration with -1, which should display the first decorated commit $ git log -1 --simplify-by-decoration --oneline f137d2178d f137d2178d (HEAD -> main, tag: gitea/3.1.2, origin/main, origin/HEAD) [bitnami/gitea] Release 3.1.2 (#31031) # The above output makes sense: the commit is decorated.

# Now, let's try --simplify-by-decoration on another commit $ git log -1 --simplify-by-decoration --oneline 1e3ef455cc 025a87d9db Merge branch 'master' into master # The above output seems incorrect, because the commit isn't decorated

# Let's confirm if the above commit is decorated $ git show-ref --tags --heads | grep 025a87d9db $ # No output, so the commit isn't decorated. That seems to confirm the bug.

> What did you expect to happen? (Expected behavior)
I expected --simplify-by-decoration to display decorated commits.
> What happened instead? (Actual behavior)
Git printed commit 025a87d9db, which isn't decorated.
> What's different between what you expected and what actually happened?

Commit 025a87d9db isn't decorated, but the --simplify-by-decoration command prints it.

> Anything else you want to add:
No

[System Info] git version: git version 2.47.0 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon libcurl: 8.4.0 zlib: 1.2.12 uname: Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64 compiler info: clang: 15.0.0 (clang-1500.3.9.4) libc info: no libc information available $SHELL (typically, interactive shell): /usr/local/bin/bash

[Enabled Hooks]

-- Best regards, Aleksander Korzynski

Next: Jeff King
Message 1 of 3 in “[Bug] --simplify-by-decoration prints undecorated commit”
  1. Aleksander KorzyńskiDec 16, 2024
  2. Jeff KingDec 18, 2024
  3. Aleksander KorzyńskiDec 20, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.