130 Commits

Author SHA1 Message Date
Seth Hillbrand
9ea088f83f Add git shutdown command
Will allow interrupting long commands during the update message
2025-08-02 20:31:40 -07:00
Seth Hillbrand
c9e9a4e073 Allow git init to succeed without remote 2025-08-02 16:39:11 -07:00
Jeff Young
6c6c02a329 Don't assume a tree root.
Fixes KICAD-Y72.
2025-08-01 16:46:50 +01:00
Seth Hillbrand
f2b6ac5d18 Refactor git calls into their own namespace 2025-07-31 08:32:07 -07:00
Seth Hillbrand
2aad11e3e7 Refactor some git routines into utility class 2025-07-30 16:59:41 -07:00
Seth Hillbrand
da19b87cb1 Be sure to clean up remote pointer 2025-07-30 16:18:57 -07:00
Seth Hillbrand
949021dc35 Fix potential crash if git_repository_init fails
Don't wrap smart pointer before init
2025-07-30 16:15:55 -07:00
Jeff Young
dc4f639c61 Make sure selected item is still valid before activating (KICAD-18S). 2025-07-14 23:46:03 +01:00
jean-pierre charras
f6fd54498d Re-add missing include 2025-07-11 15:07:31 +02:00
Jeff Young
5b91a24380 Retire WINDOW_FREEZER in favour of wxWindowUpdateLocker.
Also pulls out previous fix to a Sentry issue I can
no longer find, at least until I figure out what
went wrong.
2025-07-11 13:21:04 +01:00
Jeff Young
53c90b0469 Upgrade ShowPlayer re-entrancy guard (KICAD-XAC). 2025-07-10 17:54:42 +01:00
Jeff Young
9a3c9d780f Formatting. 2025-07-02 23:10:10 -06:00
Jeff Young
06dcb64ad8 Harden progress reporter API against misuse.
Also, titles are nouns, not verbs.  (Messages
*inside* reporters are verbs.)

Also implements progress reporter for Altium
schematic import.
2025-06-01 19:38:24 +01:00
Jeff Young
4bb54b3439 Move more stuff to ACTIONs framework. 2025-05-23 15:19:49 +01:00
Seth Hillbrand
ca7fbbe176 Add wait dialog when switching projects
If we are in the middle of a git operation when switching projects, wait
and show the user a dialog explaining what is going on
2025-05-09 13:31:46 -07:00
Seth Hillbrand
3d29fae7a9 Remove TreeControl call from thread
On Windows, this may use SendMessageW, forcing a wait for UI in the
thread

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20572
2025-04-07 17:05:54 -07:00
Seth Hillbrand
937f225df0 Update tree based on elements not map
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 579c08155ff964f93f99c8c877315cdd134ea3fa)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20464
2025-03-26 13:11:58 -07:00
Seth Hillbrand
f83e607e6e Enable/disable git tracking in user prefs
Don't require advanced config for people who want to disable
2025-03-24 11:52:50 -07:00
Seth Hillbrand
b8225ba2d6 Fix some regressions in git handling
Set default to rebase for pull
Update error string on auth failure
Improve trace logging
2025-03-21 11:55:44 -07:00
Seth Hillbrand
676dd4ceec Fix inheritance for git_common
Avoids repo type pointer issues when casting from void
2025-03-15 13:05:45 -07:00
Seth Hillbrand
26c331a837 Adjust git handling
- Utilize scoped deletion for individual git_*_free() calls
- Protect against multiple usage when updating icons
- Reduce frequency of git update calls
2025-03-14 17:01:03 -07:00
Seth Hillbrand
18ac99d838 Prevent fetch without repo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20152
2025-02-28 08:34:24 -08:00
Seth Hillbrand
9211136953 Fix windows build 2025-02-26 18:15:17 -08:00
Seth Hillbrand
5027a562e4 Adjust git timing parameters
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
2025-02-26 15:56:38 -08:00
Seth Hillbrand
aa1baec062 Fix git flicker on Windows 2025-02-25 19:38:01 -08:00
Seth Hillbrand
2c54ab277b Thread git checks
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
2025-02-25 16:07:19 -08:00
Graham Keeth
68869f6439 capitalize Git in display strings 2025-02-21 15:18:16 +00:00
Seth Hillbrand
f6c507bff9 Fix git issue with file separators
In some cases, GetPath will not return the trailing `/` leading to
inability to commit any files in git
2025-02-18 10:00:54 -08:00
Seth Hillbrand
ba208fd5c9 Suppress git remove if not at head
Don't offer to remove the .git directory if we are not looking at the
base of the git repository for safety

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19889
2025-02-12 14:43:08 -08:00
Seth Hillbrand
088a90cf68 Prevent committing bad files
Avoid backup, lock, autosave files
Avoid files that are not visible to KiCad (outside of the project
directory/sub-directories)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19891
2025-02-12 13:44:08 -08:00
Jon Evans
8af6defafe Git: allow making the first commit in a branch 2025-02-08 17:30:55 -05:00
Jon Evans
c6b9ab174d Git: suppress error message when loading brand new repo 2025-02-08 17:09:48 -05:00
Jon Evans
f59c5a9a26 Git: handle new-but-already-staged files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19893
2025-02-08 17:03:42 -05:00
Jon Evans
172b77039f Git: fix error message formatting 2025-02-08 16:49:56 -05:00
Jon Evans
df70ce72b4 Git: do not try to get branch info if there isn't a repo 2025-02-08 16:34:08 -05:00
Ian McInerney
4cf8274b2b Silence errors from file watchers when adding files
The file watcher can throw errors on Linux that are very cryptic and
actually not very useful to users, so let's hide them since there isn't
really any problem that comes from this.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
2025-01-29 19:34:00 +00:00
Seth Hillbrand
3f90cfb0ca Fix up git warning 2025-01-28 12:22:39 -08:00
Seth Hillbrand
f34f962455 Fix switch branch for rapid change
Was missing a handler for the rapid switch IDs
2025-01-28 12:22:39 -08:00
Seth Hillbrand
1641878af7 Don't create a repository before the dialog
The user might cancel a dialog, leaving a broken repo.  We use a temp
repo to test the connection

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16263
2025-01-28 12:22:39 -08:00
Seth Hillbrand
5a57e5cfd4 Handle SSH keys better
OpenSSH will iterate through a series of keys.  Additionally, there may
be a key specified in the ssh/config file that we need to account for.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18864
2025-01-21 15:59:07 -08:00
Seth Hillbrand
427d7d2dad Move git password management to local password control
Don't keep passwords in plain text config files that may be checked into
version control.  Passwords stored in system-specific password managers

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18053
2025-01-20 17:33:55 -08:00
Jeff Young
af38f76f01 Don't double-create new folders in project tree. 2025-01-16 16:47:58 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Marek Roszko
0396719308 PDF also isn't really text editable 2024-12-20 23:52:19 -05:00
Marek Roszko
8854ba6fcf Remove the edit file option for zip archives in the project tree 2024-12-20 23:46:02 -05:00
John Beard
9f579f787b Libgit2: the const git_commit* saga continues
The change wasn't re-reverted in 1.8.3, it was just not
included. It was than _also_ reverted in 1.8.4, as it was for
1.8.2 (those two tags are on different branches - main and maint/v1.8).

Hopefully, this means that we're done here, and v1.8.5 will also be
const-y, whether it is based on main or maint/v1.8.

The current state of play:

* 1.7.0 and older: const
* 1.8.0, 1.8.1:    no const
* 1.8.2:           const
* 1.8.3:           no const
* 1.8.4:           const
Future:
* 1.8.5/1.9.0:     presumably/hopefully, const

This is currently breaking at least Arch and Fedora Rawhide

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19062
2024-11-05 20:56:16 +08:00
JamesJCode
75c2f17b42 Fix libgit integration for version >= 1.8.3
The API continues to change...
2024-10-28 20:25:32 +00:00
Jon Evans
a802ba1199 Make Git push/pull errors visible 2024-10-19 12:34:06 -04:00
Alex Shvartzkop
4c196e1486 Improve libgit2 check formatting. 2024-10-07 17:22:28 +03:00
Alex Shvartzkop
74e15a3fc2 Support libgit 1.8.2+
In v1.8.2-rc1, the type change introduced in v1.8.0 was reverted.

See 49d3fadfca
2024-10-07 17:11:41 +03:00