Giter Site home page Giter Site logo

Comments (3)

mtkennerly avatar mtkennerly commented on May 23, 2024 1

No progress on the mailing list report yet, but I've updated the documentation, so I'll go ahead and close this for now.

from dunamai.

mtkennerly avatar mtkennerly commented on May 23, 2024

That's an interesting find! I was able to reproduce it on Windows using both Git 2.27.0 and 2.31.1 (the latest). I can reproduce it with --allow-empty like in your screenshot on Twitter:

$ 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 <[email protected]>
Date:   Fri Apr 16 19:48:06 2021 -0400

    init

However, the issue does not occur if the first commit is non-empty:

$ 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 <[email protected]>
Date:   Fri Apr 16 19:51:06 2021 -0400

    init

$ git log
commit 35b6427461fe48c0e918dfea2bc5ddab9dc8844d (HEAD -> master)
Author: mtkennerly <[email protected]>
Date:   Fri Apr 16 19:51:06 2021 -0400

    init

I've reported this on the Git mailing list here: https://lore.kernel.org/git/CAKqNo6TFudrXnuPzQcOaVQrRpq_0K_fxyyMA5god-WQL7y=RcQ@mail.gmail.com/ . If you ever want to report something to them in the future, you just have to send a plain-text email to the address listed on this page: https://git.wiki.kernel.org/index.php/GitCommunity

If they confirm that it's a bug, and given the limited scope of where it can occur, I would probably just add a note to the README in the meantime.

from dunamai.

ewjoachim avatar ewjoachim commented on May 23, 2024

Thanks :)
Indeed, I had not realized that empty commit was also a requirement to hit this bug.

Thanks for posting to the git ML!

from dunamai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.