Commit Graph

7 Commits

Author SHA1 Message Date
Wayne Stambaugh c19341dfe7 Coding policy fixes. 2026-02-04 11:38:42 -05:00
Seth Hillbrand 23765b6ebe Fix git status icons not showing when project opened via symlink
When a project is opened through a symlinked path, libgit2's
git_repository_workdir() returns the canonical path with symlinks
resolved. This caused a path mismatch between the tree cache
(which uses the user-provided symlinked path) and git status
results (which used canonical paths), preventing status icons
from being displayed.

The fix introduces SetProjectDir()/GetProjectDir() methods to
KIGIT_COMMON to store and use the user-provided project path.
A helper function computeSymlinkPreservingWorkDir() computes
the git working directory path while preserving symlinks from
the original user path.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21092
2026-01-11 20:04:12 -08:00
Seth Hillbrand accbee3c6e Move git stuff to kicommon to fix build
And do other cool stuff
2025-09-12 07:17:42 -07:00
Seth Hillbrand c64f99c57a ADDED: VCSHASH and VCSSHORTHASH
Right now, git hashes only resolved by the variables ${VCSHASH} or
${VCSSHORTHASH}
2025-09-12 06:00:27 -07:00
Seth Hillbrand f2b6ac5d18 Refactor git calls into their own namespace 2025-07-31 08:32:07 -07:00
Seth Hillbrand 7af404af43 Fix improper boolean check
This was assigning a boolean 1 or 0 to the error instead of the git
error code
2025-07-31 08:32:06 -07:00
Seth Hillbrand 2aad11e3e7 Refactor some git routines into utility class 2025-07-30 16:59:41 -07:00