EmptyTreePrj() sets the KIGIT_COMMON cancel flag to true during
project close to stop in-flight git operations. However, when
ReCreateTreePrj() opens a new git repository for the next project,
the cancel flag was never reset to false. Since the KIGIT_COMMON
object persists across project switches (owned by PROJECT_TREE),
all git operations (status icons, sync, fetch) were permanently
disabled after the first project close.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23344
Break the most expensive header include chains that contaminate the
largest number of translation units
New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
CSV files now display with a dedicated icon in the project tree
instead of the generic unknown file icon. The icon shows a file
shape with a grid pattern representing tabular data.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21250
When we save, we update the .history backup system. Each of these
changes will trigger the fswatcher even if we don't explicitly remove
the .history and descendants from the watch
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
There's no good way to catch initialization errors in the wx fswatcher
and we can't check to see if it has been properly initialized. So,
instead, we need to catch the assert error thrown on resource
exhaustion and use that as a proxy
Local history combines project backup and autosave into a single place
where arbitrary history can be stored efficiently and restored to any
point in time. Git commits are made on a debouce timer to hold
modifications, allowing the user to step backwards in time to arbitrary
points. Restoring backups does not remove the existing files and
choosing to restore an autosave point does not remove the state of the
files prior to the restore, providing additional safety.
Keeps the maximum storage size limit but removes the additional
limitations of number of backups/backups per day, etc as these are not
relevant to a CoW-based backup as unchanged files do not take up
additional space.
Rather than updating the tree with all elements in the map (some of
which may have changed), we iterate over the tree and set those elements
that we find in the map. This ensures that all elements updated in the
tree exist there
(cherry picked from commit 579c08155f)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20464
- Utilize scoped deletion for individual git_*_free() calls
- Protect against multiple usage when updating icons
- Reduce frequency of git update calls
Move most of the update firing to the file system watcher (except for
windows network shares that still need timed updated). Gate the repo
status for sync
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20133
Push the git checks from the main thread into child threads to prevent
resource contention in some cases where Windows machines might have many
files in git that are _also_ being managed by Google Drive
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20078