git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* If the initial commit is empty, it is not shown in "git log --simplify-by-decoration"
@ 2021-04-16 23:58 Matthew Timothy Kennerly
  2021-04-18  8:59 ` Bagas Sanjaya
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Timothy Kennerly @ 2021-04-16 23:58 UTC (permalink / raw)
  To: git

Hello,

This seems like a bug to me, but maybe there's a good reason for it. I
reproduced it using Git 2.27.0 on Windows initially, and then I
upgraded to 2.31.1 to confirm that it was still present.

After committing with "--allow-empty", the initial commit is not shown
in "git log --simplify-by-decoration", although it is shown with "git
log". I would have expected it to be shown in both cases:

---
$ git init
Initialized empty Git repository in C:/tmp/repro/.git/

$ git commit --allow-empty -m init
[master (root-commit) bc54978] init

$ git log --simplify-by-decoration

$ git log
commit d7814029effeb7e824e480ca52e30f5a9d1e8058 (HEAD -> master)
Author: mtkennerly <mtkennerly@gmail.com>
Date:   Fri Apr 16 19:48:06 2021 -0400

    init
---

However, if the first commit is not empty, then it is shown with or
without "--simplify-by-decoration", as expected:

---
$ git init
Initialized empty Git repository in C:/tmp/repro2/.git/

$ echo hi > foo.txt

$ git add .

$ git commit -m init
[master (root-commit) 35b6427] init
 1 file changed, 1 insertion(+)
 create mode 100644 foo.txt

$ git log --simplify-by-decoration
commit 35b6427461fe48c0e918dfea2bc5ddab9dc8844d (HEAD -> master)
Author: mtkennerly <mtkennerly@gmail.com>
Date:   Fri Apr 16 19:51:06 2021 -0400

    init

$ git log
commit 35b6427461fe48c0e918dfea2bc5ddab9dc8844d (HEAD -> master)
Author: mtkennerly <mtkennerly@gmail.com>
Date:   Fri Apr 16 19:51:06 2021 -0400

    init
---

For context, this was reported to me on GitHub here:
https://github.com/mtkennerly/dunamai/issues/14

Regards,

MTK

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: If the initial commit is empty, it is not shown in "git log --simplify-by-decoration"
  2021-04-16 23:58 If the initial commit is empty, it is not shown in "git log --simplify-by-decoration" Matthew Timothy Kennerly
@ 2021-04-18  8:59 ` Bagas Sanjaya
  0 siblings, 0 replies; 2+ messages in thread
From: Bagas Sanjaya @ 2021-04-18  8:59 UTC (permalink / raw)
  To: Matthew Timothy Kennerly; +Cc: Git Users, Junio C Hamano

On 17/04/21 06.58, Matthew Timothy Kennerly wrote:
> Hello,
> 
> This seems like a bug to me, but maybe there's a good reason for it. I
> reproduced it using Git 2.27.0 on Windows initially, and then I
> upgraded to 2.31.1 to confirm that it was still present.
> 
> After committing with "--allow-empty", the initial commit is not shown
> in "git log --simplify-by-decoration", although it is shown with "git
> log". I would have expected it to be shown in both cases:
> 
> However, if the first commit is not empty, then it is shown with or
> without "--simplify-by-decoration", as expected:
> 
> For context, this was reported to me on GitHub here:
> https://github.com/mtkennerly/dunamai/issues/14
> 
> Regards,
> 
> MTK
> 
[CC] Junio, what do you think about the issue?

-- 
An old man doll... just what I always wanted! - Clara

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-18  8:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-16 23:58 If the initial commit is empty, it is not shown in "git log --simplify-by-decoration" Matthew Timothy Kennerly
2021-04-18  8:59 ` Bagas Sanjaya

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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).