109 Commits

Author SHA1 Message Date
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
Marek Roszko
d74caace0a Initial jobset creation and running within the CLI and GUI.
Incomplete, just pushing this before feature freeze, much fixing left
2024-09-30 20:04:53 -04:00
Mark Roszko
d783e0d4c0 unbind/disconnect in PROJECT_TREE_PANE destructor 2024-08-16 01:44:45 +00:00
Alex Shvartzkop
10b8580657 Reduce freezing every 2 seconds due to git status updates.
With pathspec specified, only the project dir is queried now.

Still bad if you're in the root of a big repository.
2024-06-30 19:44:31 +03:00
Wayne Stambaugh
795a9eea60 Coding policy fixes.
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped.  The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
2024-05-23 07:59:45 -04:00
Seth Hillbrand
7aa3892ba3 Move log into UNIX ifdef 2024-05-09 19:29:01 -07:00
Seth Hillbrand
42ebf0eca5 Limit FSWatcher
Library watches only need a single directory or immediate children.  The
project watcher should have a sensible limit to the total number of
files it tries to track.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15717
2024-05-09 15:42:25 -07:00
jean-pierre charras
59e34dcbec Fix a compil issue on Windows (missing closing brace) 2024-05-07 12:48:41 +02:00
Seth Hillbrand
b9b19cb5fb Quiet the warnings when overloaded on file watches 2024-05-06 17:36:50 -07:00
Seth Hillbrand
8a306eecb6 Cleanup libgit init calls 2024-05-06 10:18:38 -07:00
aris-kimi
66bb49e2da Silence some GCC warnings 2024-04-16 11:11:50 +00:00
Marek Roszko
0ce227fa92 Can't use forward declare with std::vector
Not allowed per C++ standard

See https://github.com/llvm/llvm-project/issues/57700
2024-04-13 08:22:20 -04:00
Huang Rui
1cbf6a1872 libgit2-1.8.0 compatibility: adjusted parent pointer type
- Adjusted parent pointer type in git_commit_create call for compatibility
  with libgit2 1.8.0 and above.
- Included preprocessor checks to maintain support for versions older than
  1.8.0.
- Ensures consistent function behavior across different libgit2 versions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17536
Signed-off-by: Huang Rui <vowstar@gmail.com>
2024-04-07 15:43:52 +00:00
Ian McInerney
9456f35491 Properly cleanup git repos and memory on project/frame deletion
* Ensure the git backend is deleted when the project tree is deleted.
* Unload the git repo for a project when the project is unloaded from
  the tree.
2024-04-01 21:59:50 +01:00
Jan Wichmann
5cdf9fe8a0 Don't show hidden directories and files in the project tree browser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16207
2024-03-03 16:43:43 +00:00
aris-kimi
24529e5242 ADDED: library tree context menu option to open sym/fp library files from the defined text editor.
Short description:

Works for Symbol and Footprint Editor behind an advanced config option.
For Symbol Editor it is shown for a single item selection (library or symbol).
For Footprint Editor it is shown for a footprint selection.
(fp editor allows a single tree item selection only).
Option stays hidden if current frame has been modified.

Also small fix(?) for similar action to the project manager.
(Call for the Execution has moved inside the file loop.)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15736
2024-02-29 19:01:59 +00:00
Seth Hillbrand
3ad0abae3f Move git fully behind advanced config 2024-02-19 17:19:44 -08:00
Wayne Stambaugh
92c2ddf77a Do not parent dialogs to non top level windows in panels or widgets. 2024-02-03 10:40:28 -05:00
Seth Hillbrand
9077c9fb80 Avoid assertion when changing projects
If the regex does not compile, we should not be checking for matches
2024-01-16 15:24:32 -08:00
jean-pierre charras
3f70387a17 KISTATUSBAR: code refinement and add comments 2024-01-07 09:47:40 +01:00
Marek Roszko
9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
jean-pierre charras
98dca3b774 Another workaround libgit2 API change for supporting older platforms 2023-12-11 10:06:09 +01:00