Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞 Ghost entries in the History Inspector view #1741

Closed
simonwhitaker opened this issue Jun 2, 2024 · 0 comments · Fixed by #1742
Closed

🐞 Ghost entries in the History Inspector view #1741

simonwhitaker opened this issue Jun 2, 2024 · 0 comments · Fixed by #1742
Labels
bug Something isn't working inspector triage needed

Comments

@simonwhitaker
Copy link
Contributor

simonwhitaker commented Jun 2, 2024

Description

If a git commit has a "body" (i.e. a commit message with more than one line), then the History Inspector renders one or more erroneous entries immediately after it.

It looks like this was introduced in #1676, which added %b ("body") to the format string passed to git log.

To Reproduce

  1. Clone https://github.com/simonwhitaker/codeedit-history-inspector-demo and open in CodeEdit (built from the current master; I'm on commit e17584e)
  2. Open hello.txt
  3. Open the History Inspector

Expected Behavior

I expect to see four entries, as follows:

$ git log --format=medium
commit 039b5fa2bbcbc053a6993f1b5baf612a1cc9c88b (HEAD -> main, origin/main)
Author: Simon Whitaker <sw@netcetera.org>
Date:   Sun Jun 2 22:10:18 2024 +0100

    Add the final line

    Yeah, writing line by line was definitely a bad idea.

    In fact, I should have just used ChatGPT and not had to write anything.

commit b07fceee727d1e4bb5ff40c5d3a2a515b62e9f38
Author: Simon Whitaker <sw@netcetera.org>
Date:   Sun Jun 2 22:09:44 2024 +0100

    Add the third line

    Thinking about it, I should have written the poem all in one go.

commit e538f267a1be545bbef06533468ad5b6cf2dcc0f
Author: Simon Whitaker <sw@netcetera.org>
Date:   Sun Jun 2 22:09:26 2024 +0100

    Add the second line

commit f0c20d706b89c54685c0cd3688103cdf4b9f317c
Author: Simon Whitaker <sw@netcetera.org>
Date:   Sun Jun 2 22:09:03 2024 +0100

    Add the first line

Version Information

CodeEdit: built from master (e17584e)
macOS: 14.5
Xcode: 15.4

Additional Context

No response

Screenshots

CleanShot 2024-06-02 at 10  12 50@2x
CleanShot 2024-06-02 at 10  12 52@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working inspector triage needed
Projects
Status: 🏁 Complete
Development

Successfully merging a pull request may close this issue.

1 participant