Skip to content

Fix gitx --version reporting a stale version - #771

Merged
hannesa2 merged 1 commit into
masterfrom
report-the-real-version-from-the-gitx-tool
Oct 24, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
report-the-real-version-from-the-gitx-tool

Conversation

@goneng

@goneng goneng commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Read the version from the app bundle that contains the tool, so gitx --version matches the version shown by the app.

Details

gitx --version printed GitX version 0.12, whatever the release.
The tool reads the plist embedded in its own binary, which uses the
stale CURRENT_PROJECT_VERSION build setting.
scripts/set-git-version-info.sh only writes the git-derived version into the app's Info.plist.

  • Report CFBundleVersion of the enclosing GitX.app, the build number the app reports (e.g. 1.7.1.3511 [arm])
  • Fall back to the tool's own plist outside an app bundle
  • Share the app lookup with the scripting bridge (gitXApplication)

Screenshots

Before - Fixed at Stale Version '0.12'

GitX_#771-1a_fix-gitx-cli-version

After - Matches the Version of GitX Executable

GitX_#771-2a_fix-gitx-cli-version

Test plan

  • From a build: GitX.app/Contents/Resources/gitx --version prints the app's version, not 0.12
  • Through a symlink (as /usr/local/bin/gitx is installed): same output
  • make smoke-test still finds "GitX version"

Read the version from the app bundle that contains the tool, so `gitx --version` matches the version shown by the app.

- Report CFBundleVersion of the enclosing GitX.app
- Fall back to the tool's own plist outside an app bundle
- Share the app lookup with the scripting bridge
@goneng
goneng force-pushed the report-the-real-version-from-the-gitx-tool branch from 698c973 to eb6221e Compare October 23, 2026 18:13
@goneng
goneng marked this pull request as ready for review October 24, 2026 07:48
@goneng
goneng requested a review from hannesa2 October 24, 2026 07:48
@goneng goneng added the bugfix label Oct 24, 2026
@hannesa2
hannesa2 merged commit c604676 into master Oct 24, 2026
4 of 6 checks passed
@hannesa2
hannesa2 deleted the report-the-real-version-from-the-gitx-tool branch October 24, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants