Skip to content

Conversation

@LeoBorai
Copy link
Member

@LeoBorai LeoBorai commented Mar 2, 2024

Description

Updates the git command used to get the current branch from:

git rev-parse --abbrev-ref HEAD

To be:

git branch --show-current

git branch --show-current is available since Git 2.22 which was released Mid 2019
(official release notes https://public-inbox.org/git/[email protected]/).

macOS Ventura uses git version 2.39.3 so this should be safe for users from Ventura and up.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

Screenshot 2024-03-02 at 1 12 55 PM

@LeoBorai LeoBorai linked an issue Mar 2, 2024 that may be closed by this pull request
Copy link
Member

@tom-ludwig tom-ludwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Just a quick heads-up, we should prioritise adding tests for Git to catch bugs earlier. But for now, let's stay focused on the editor

Copy link
Collaborator

@thecoolwinter thecoolwinter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thecoolwinter thecoolwinter merged commit 7c36e56 into CodeEditApp:main Mar 2, 2024
@LeoBorai LeoBorai deleted the 1594-git-ambiguous-argument-head branch March 2, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 Git: "ambiguous argument HEAD"

3 participants