{"thread":{"id":"62644","subject":"[Bug] --simplify-by-decoration prints undecorated commit","startedAt":"2024-12-16T15:09:20Z","lastAt":"2024-12-20T11:13:15Z","messageCount":3,"participants":["Aleksander Korzyński","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"509164","messageId":"CAEtHj8AXKrQfyAW9FSv6yC-8GF1AkPixMFjSye+B51pJ4fOtWA@mail.gmail.com","threadId":"62644","inReplyTo":null,"subject":"[Bug] --simplify-by-decoration prints undecorated commit","fromName":"Aleksander Korzyński","fromEmail":"ak@akorzy.net","sentAt":"2024-12-16T15:09:07Z","receivedAt":"2024-12-16T15:09:20Z","isPatch":false,"sender":{"key":"ak@akorzy.net","avatar":"https://gravatar.com/avatar/e6e5228420ba48122e2fec385efde4bf553448300290cdfd01577c7a39c23a6f?d=mp&s=160"},"body":"Hello,\n\nIn the following scenario, --simplify-by-decoration prints an\nundecorated commit, which seems to be a bug.\n\n> What did you do before the bug happened? (Steps to reproduce your issue)\n\n# Clone this repo\n$ git clone https://github.com/bitnami/charts.git\n\n# Test --simplify-by-decoration with -1, which should display the\nfirst decorated commit\n$ git log -1 --simplify-by-decoration --oneline f137d2178d\nf137d2178d (HEAD -> main, tag: gitea/3.1.2, origin/main, origin/HEAD)\n[bitnami/gitea] Release 3.1.2 (#31031)\n# The above output makes sense: the commit is decorated.\n\n# Now, let's try --simplify-by-decoration on another commit\n$ git log -1 --simplify-by-decoration --oneline 1e3ef455cc\n025a87d9db Merge branch 'master' into master\n# The above output seems incorrect, because the commit isn't decorated\n\n# Let's confirm if the above commit is decorated\n$ git show-ref --tags --heads | grep 025a87d9db\n$\n# No output, so the commit isn't decorated. That seems to confirm the bug.\n\n> What did you expect to happen? (Expected behavior)\n\nI expected --simplify-by-decoration to display decorated commits.\n\n> What happened instead? (Actual behavior)\n\nGit printed commit 025a87d9db, which isn't decorated.\n\n> What's different between what you expected and what actually happened?\n\nCommit 025a87d9db isn't decorated, but the --simplify-by-decoration\ncommand prints it.\n\n> Anything else you want to add:\n\nNo\n\n\n[System Info]\ngit version:\ngit version 2.47.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nfeature: fsmonitor--daemon\nlibcurl: 8.4.0\nzlib: 1.2.12\nuname: Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00\nPDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64 x86_64\ncompiler info: clang: 15.0.0 (clang-1500.3.9.4)\nlibc info: no libc information available\n$SHELL (typically, interactive shell): /usr/local/bin/bash\n\n\n[Enabled Hooks]\n\n--\nBest regards,\nAleksander Korzynski\n"},{"id":"509286","messageId":"20241218120831.GA695807@coredump.intra.peff.net","threadId":"62644","inReplyTo":"CAEtHj8AXKrQfyAW9FSv6yC-8GF1AkPixMFjSye+B51pJ4fOtWA@mail.gmail.com","subject":"Re: [Bug] --simplify-by-decoration prints undecorated commit","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2024-12-18T12:08:31Z","receivedAt":"2024-12-18T12:08:33Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Dec 16, 2024 at 04:09:07PM +0100, Aleksander Korzyński wrote:\n\n> # Now, let's try --simplify-by-decoration on another commit\n> $ git log -1 --simplify-by-decoration --oneline 1e3ef455cc\n> 025a87d9db Merge branch 'master' into master\n> # The above output seems incorrect, because the commit isn't decorated\n\nYes, but it's a merge commit. From \"git help log\":\n\n  Note that extra commits can be shown to give a meaningful history.\n\nTry:\n\n  git log --simplify-by-decoration --oneline --graph 1e3ef455cc\n\nand you'll see that there are commits along both parent branches, and\nthus we show the merge.\n\nThere are some other options listed after that for changing which\ncommits are shown (\"The following options affect the way the\nsimplification is performed\"). But I don't think there is one that will\nshow only the decorated commits (however, I could be wrong; I've only\never used these options to show _more_ commits, not fewer).\n\n-Peff\n"},{"id":"509377","messageId":"CAEtHj8DUaDm7Hr+Dzc+K=F1MONj8u=GmuB1ju5kMU-swPa6Whw@mail.gmail.com","threadId":"62644","inReplyTo":"20241218120831.GA695807@coredump.intra.peff.net","subject":"Re: [Bug] --simplify-by-decoration prints undecorated commit","fromName":"Aleksander Korzyński","fromEmail":"ak@akorzy.net","sentAt":"2024-12-20T11:13:03Z","receivedAt":"2024-12-20T11:13:15Z","isPatch":false,"sender":{"key":"ak@akorzy.net","avatar":"https://gravatar.com/avatar/e6e5228420ba48122e2fec385efde4bf553448300290cdfd01577c7a39c23a6f?d=mp&s=160"},"body":"Hello Peff,\n\nThanks for the response.\n\n--\nBest regards,\nAleksander Korzyński\n\n\nOn Wed, 18 Dec 2024 at 13:08, Jeff King <peff@peff.net> wrote:\n>\n> On Mon, Dec 16, 2024 at 04:09:07PM +0100, Aleksander Korzyński wrote:\n>\n> > # Now, let's try --simplify-by-decoration on another commit\n> > $ git log -1 --simplify-by-decoration --oneline 1e3ef455cc\n> > 025a87d9db Merge branch 'master' into master\n> > # The above output seems incorrect, because the commit isn't decorated\n>\n> Yes, but it's a merge commit. From \"git help log\":\n>\n>   Note that extra commits can be shown to give a meaningful history.\n>\n> Try:\n>\n>   git log --simplify-by-decoration --oneline --graph 1e3ef455cc\n>\n> and you'll see that there are commits along both parent branches, and\n> thus we show the merge.\n>\n> There are some other options listed after that for changing which\n> commits are shown (\"The following options affect the way the\n> simplification is performed\"). But I don't think there is one that will\n> show only the decorated commits (however, I could be wrong; I've only\n> ever used these options to show _more_ commits, not fewer).\n>\n> -Peff\n"}]}