Commit Graph

586 Commits

Author SHA1 Message Date
Kiril Videlov
168a218ebe move snapshot MoveCommitFile before the operation 2024-05-23 11:52:27 +02:00
Kiril Videlov
f514ec752c move snapshot AmendCommit before the operation 2024-05-23 11:51:18 +02:00
Kiril Videlov
7944fb4558 move snapshot DiscardFile before the operation 2024-05-23 11:50:34 +02:00
Kiril Videlov
6574a805a8 move snapshot DiscardHunk before the operation 2024-05-23 11:50:06 +02:00
Kiril Videlov
a418f22e23 move snapshot UpdateWorkspaceBase before the operation 2024-05-23 11:49:34 +02:00
Kiril Videlov
f94ff8fd41 move snapshot MergeUpstream to before the operation 2024-05-23 11:48:56 +02:00
Kiril Videlov
a65aec6054 move snapshot SetBaseBranch to before the operation 2024-05-23 11:48:00 +02:00
Kiril Videlov
4092464be4 move snapshot UndoCommit to before the operation 2024-05-23 11:46:52 +02:00
Kiril Videlov
77e01b5928 move snapshot CreateCommit to before the operation 2024-05-23 11:45:14 +02:00
Kiril Videlov
89fb842701 move snapshot UpdateBranch to before the operation 2024-05-23 11:39:23 +02:00
Kiril Videlov
753cc02a37 move snapshot UnapplyBranch to before the operation 2024-05-23 11:27:24 +02:00
Kiril Videlov
ea5f8e8dad move snapshot CreateBranch to before the operation 2024-05-23 11:23:37 +02:00
Sebastian Thiel
05118086dd
Use gitoxide in file-watcher
This allows for faster opening times, and more more efficient
exclude checks.
2024-05-23 11:13:56 +02:00
Kiril Videlov
7bd3548030 move snapshot DeleteBranch to before the operation 2024-05-23 11:12:33 +02:00
Kiril Videlov
4e234d6b5c move snapshot ApplyBranch before the operation 2024-05-23 11:07:30 +02:00
Mattias Granlund
2b33b79d48 Fix lint 2024-05-23 10:58:59 +02:00
Mattias Granlund
021180d8f1 Rename function 2024-05-23 10:58:59 +02:00
Mattias Granlund
af4833f091 Fix a few bugs 2024-05-23 10:58:59 +02:00
Mattias Granlund
cd419eca67 Refactor how we merge in commits from branch upstream
- send change_id to frontend for `RemoteCommit`
- split up massive function into three
- add a couple of checks to prevent unexpected state
- rebase if force push allowed (needs toggle)
2024-05-23 10:58:59 +02:00
Mattias Granlund
ed14ddf378 Simplify function with ? shorthand 2024-05-23 10:58:59 +02:00
Mattias Granlund
8b7e12e472 Remove explicit error type for merge_virtual_branch_upstream 2024-05-23 10:58:59 +02:00
Sebastian Thiel
a83e6809ab
Only open a repository when project-files are involved.
There are many filesystem events that are not touching files which
could be ignored.
Now we detect this case in advance and only open the project repository
if we know there are files to check for their ignore state.

That way, there should overall be less IO, which is good for performance
particularly on Windows.
2024-05-23 10:50:38 +02:00
Sebastian Thiel
e3b8e2a5e5
fix: assure commit.gpgsign is detected correctly
Avoid stringly comparison for what is definitely a boolean
[as per the configuration](https://git-scm.com/docs/git-config#Documentation/git-config.txt-commitgpgSign).
2024-05-23 10:18:35 +02:00
Sebastian Thiel
93508d7e7c
fix: assure tests aren't affected by local configuration
Otherwise, tests will pickup global configuration, which can affect them.
For instance, if `core.gpgsign` is true, it will cause commits to be signed
which can be slow, or hang entirely if gpg-agent requests a password.

Note that now there is possibly no tests that validates signing,
and doing so is difficult as it requires gpg and keys to be setup.
2024-05-23 10:12:40 +02:00
Kiril Videlov
b8dfcf7a82
Merge pull request #3822 from gitbutlerapp/revert-3820-oplog-diff-optimization
Revert "fixes incorrect snapshot diff"
2024-05-23 03:31:00 +02:00
Kiril Videlov
651a55d3fb
Revert "fixes incorrect snapshot diff" 2024-05-23 03:17:34 +02:00
Kiril Videlov
c3a18ef2b0 feat(oplog): Improve lines_since_snapshot by using tree-to-tree comparison
This fixes an issue where snapshots are auto-created too often erroneously
2024-05-23 02:46:40 +02:00
Kiril Videlov
3517419090 fixes incorrect snapshot diff 2024-05-23 01:10:28 +02:00
Kiril Videlov
9dbebba5df refactor: Improve error handling in branch_to_remote_branch() and list_remote_branches() functions 2024-05-22 14:20:41 +02:00
Kiril Videlov
660d296745
Merge pull request #3814 from gitbutlerapp/update-change-selected-for-changes-branch
fix: Use old branch name instead of selected_for_changes in Snapshot creation
2024-05-22 12:32:46 +02:00
Kiril Videlov
f68ce21962 fix: Use old branch name instead of selected_for_changes in Snapshot creation 2024-05-22 12:20:59 +02:00
Caleb Owens
f2471734b4 Fix timestamp compensation 2024-05-22 12:17:04 +02:00
Scott Chacon
8b7fe790e5 return all local branches as well as remote ones
also deduplicate them in the branch listing
2024-05-22 10:45:29 +02:00
Pavel Laptev
ec8b171fc7
Project menu items update + new "Open in VS code" (#3804) 2024-05-21 23:57:38 +02:00
Kiril Videlov
eda9651bf9
Merge pull request #3800 from anaisbetts/no-dosbox-on-sign
Don't show command prompt when commit signing is enabled
2024-05-21 23:33:22 +02:00
Kiril Videlov
9f318626f8
Merge pull request #3737 from anaisbetts/flushable-debounce
Avoid file locks by being smarter about when we try to rebuild our information
2024-05-21 13:47:54 +02:00
Ani Betts
a47ebbc22d
Don't show command prompt when commit signing is enabled 2024-05-21 12:04:41 +02:00
Mattias Granlund
21e98fd9f2 Simplify getting default target
- remove try function in favor of returning error
- drop unused function
2024-05-21 12:02:38 +02:00
Ani Betts
f54c12fd55
Halve the dead air time 2024-05-21 11:03:18 +02:00
Anaïs Betts
d23ca10028
Bring back tempfile moves 2024-05-21 10:36:22 +02:00
Ani Betts
12143b0a54
Embrace your Chill, cargo 2024-05-21 10:39:00 +02:00
Ani Betts
b4b0de6a3c
Merge remote-tracking branch 'upstream/master' into flushable-debounce
* upstream/master: (85 commits)
  History and minor UI fixes (#3797)
  History fixes (#3796)
  make GitGuardian happy
  bump playwright version
  add vitest exclude for node_modules
  Remove unused exports from ipc
  Update auth.ts to use absolute import
  Use correct invoke function
  setup for async tasks on oplog update
  formatting
  save and restore the gitbutler/integration branch
  remove unneccessary CSPs
  Fix ollama request security
  fix: forgot the port
  feat: Set default snapshot lines threshold to 20 when undefined
  fix: Updated connect-src to allow local connections for ollama
  Minor tweaks to CSS and use real branch name
  Unmount history component when hidden
  Fix bug leaving PR button visible
  Small refactor of history component
  ...
2024-05-21 10:29:42 +02:00
Pavel Laptev
6e6272983b
History and minor UI fixes (#3797)
* Convert Capital case to Uper case "History menu"

* UI updates: target branch styles

* Remove console.log

* CSS: space between "Trunk" and the timer

* UI: reversed chevron arrows fix

* remove commented console.log

* UX: toggle file preview in History

* UI: target branch set animation fix
2024-05-21 01:07:22 +02:00
Kiril Videlov
662a62c2f2 setup for async tasks on oplog update
As we start building out code collaboration we wanna have the ability to push gitbutler state to, when enabled
2024-05-19 15:53:27 +02:00
Scott Chacon
18de60740b formatting 2024-05-19 07:24:15 +02:00
Scott Chacon
2a89fa6b93 save and restore the gitbutler/integration branch
when we save the snapshots, save and restore the integration branch commit properly so we don't get in a weird state after restore
2024-05-19 07:07:55 +02:00
Kiril Videlov
b3a1699cbf
Merge pull request #3786 from gitbutlerapp/Virtual-branch-1
remove unneccessary CSPs
2024-05-18 18:26:51 +02:00
Kiril Videlov
7e070ac0f5 remove unneccessary CSPs 2024-05-18 18:13:24 +02:00
Kiril Videlov
07b863731f
Merge pull request #3785 from gitbutlerapp/fix-ollama-request-security
Fix ollama request security
2024-05-18 18:08:39 +02:00
Caleb Owens
6ae9b7ff6e Fix ollama request security 2024-05-18 16:51:20 +01:00
Kiril Videlov
a9316492c9 fix: forgot the port 2024-05-18 17:49:05 +02:00
Kiril Videlov
8fa8cbfe6d fix: Updated connect-src to allow local connections for ollama 2024-05-18 16:28:19 +02:00
Scott Chacon
733780f302 reformat 2024-05-17 15:16:04 +02:00
Scott Chacon
dcc1b37331 rewrite our oplog tests 2024-05-17 15:11:19 +02:00
Scott Chacon
1cbcbb3478 change the oplog file name
this is both to be a little more clear, but mainly to reset users from the previous logic
2024-05-17 15:11:19 +02:00
Scott Chacon
62e9a80512 add logic for the first parentless snapshot 2024-05-17 15:11:19 +02:00
Scott Chacon
0f3005e467 first pass at new oplog tree builder
creates a work tree and properly restores
note
2024-05-17 15:11:19 +02:00
Kiril Videlov
74fe02f109 feat: Add support for setting snapshot_lines_threshold in UpdateRequest 2024-05-17 12:44:20 +02:00
Pavel Laptev
1be1218a71
History View UI (#3773)
* Separated History logic layout into components

* Layout update, components split and cover new data

* Added file preview

* handle event trigger

* empty states added

* Temp store for snapshot files + threshold section

* formatting

* added a gap between elements in footer

* CSS: padding fix
2024-05-17 01:21:19 +02:00
Ani Betts
2ff2b1f7ec
Format 2024-05-15 20:27:26 +02:00
Ani Betts
ddc2cfeb67
Flush on window focus 2024-05-15 20:27:26 +02:00
Ani Betts
e9cd5d3dca
Rewrite the timeouts
Change the strategy of how timeouts work, from a simple timer, to
something a bit more nuanced
2024-05-15 20:27:26 +02:00
Ani Betts
326e9fee02
Wire flushing into the Watcher
Give the main window a mechanism to flush pending changes via a Channel
2024-05-15 20:27:26 +02:00
Ani Betts
28de8135d2
Add a new mechanism to flush on "idle"
Optionally, if we detect that no change notifications have appeared for
a certain number of ticks, we will automatically flush pending
notifications
2024-05-15 20:27:26 +02:00
Ani Betts
1c3d8d3997
Allow events to be explicitly flushed
This adds a new method to allow us to explicitly flush pending change
notifications
2024-05-15 20:27:25 +02:00
Ani Betts
fe35b1f65f
Import notify_debounce_full
We need to make some changes to notify_debounce_full and it seems like
the project is unmaintained, let's copy-paste some code
2024-05-15 20:27:25 +02:00
Ani Betts
69cf9c8058
Don't use HOME env var
This environment variable doesn't exist on Windows
2024-05-15 17:39:23 +02:00
Ani Betts
1695ad5c53
Add dirs crate 2024-05-15 17:39:00 +02:00
Scott Chacon
5becf4e6a6
small fixes 2024-05-15 15:24:08 +02:00
Scott Chacon
b0c5c07a57
some change-id based tests 2024-05-15 15:21:19 +02:00
Scott Chacon
2ce4e5bfd0
remove a bunch of debugging 2024-05-15 14:48:26 +02:00
Scott Chacon
d267dbc77d
rust is not my favorite language 2024-05-15 13:40:27 +02:00
Scott Chacon
a23253e57d
who committed this? 2024-05-15 11:14:05 +02:00
Scott Chacon
9e817b4d04
Merged origin/master into add-commit-id 2024-05-15 10:43:34 +02:00
Scott
520d95aef2 merge upstream 2024-05-14 14:07:09 +00:00
Kiril Videlov
e93ddfac34
snapshot of restores keeps more metadata 2024-05-14 16:04:02 +02:00
Kiril Videlov
8bae084518
snapshots for move hunk include branch name 2024-05-14 14:55:27 +02:00
Kiril Videlov
631bc86031
snapshots of (un)appy branches contains name 2024-05-14 14:35:47 +02:00
Scott Chacon
4cde9ce71d
windows doesn't have permissions like this 2024-05-14 13:43:49 +02:00
Scott Chacon
202c551bc7
remove signing setting 2024-05-14 13:15:11 +02:00
Scott Chacon
b5c9f934d5
supporting gpg.ssh.program 2024-05-14 11:57:23 +02:00
Scott Chacon
d944cad533 merge upstream
temp
2024-05-14 10:25:29 +02:00
Scott Chacon
f106bfa246
basic ssh signing too 2024-05-14 10:08:22 +02:00
Kiril Videlov
80148f50fe
add sha to undo commit snapshot 2024-05-13 16:37:37 +02:00
Kiril Videlov
8849c9845e
add sha to commit snapshot 2024-05-13 16:24:40 +02:00
Scott Chacon
b17ab37a01
actually run gpg if specified 2024-05-13 16:19:45 +02:00
Kiril Videlov
62dadd96a8
remove unused index subscription 2024-05-13 14:18:56 +02:00
Kiril Videlov
06dfc95692
add message trailer for commit snapshots 2024-05-13 01:07:42 +02:00
Kiril Videlov
81e948774f
fix test 2024-05-12 23:42:04 +02:00
Kiril Videlov
336c7cb9bc
enable the new oplog snapshotting by default 2024-05-12 22:36:27 +02:00
Kiril Videlov
f8023ca735
refactor snapshotter trait
Implementing this on branch turned out ot be restrictive so implementing for Oplog
2024-05-12 19:57:42 +02:00
Kiril Videlov
262bbd8df7
on snapshot store branch name metadata 2024-05-12 19:49:51 +02:00
Kiril Videlov
d52a7f5e4f
fix an issue with incorrect snapshot metadata on branch update 2024-05-12 19:18:03 +02:00
Kiril Videlov
3e0914444f
remove unused crates in tauri 2024-05-12 04:19:19 +02:00
Kiril Videlov
0a12b3eac5
remove unused crates in core 2024-05-12 04:12:56 +02:00
Kiril Videlov
5b3273f542
remove unused sessions / deltas implementation
This is removed in favor of the new `ops` module
2024-05-12 03:39:04 +02:00
Kiril Videlov
d9c985db26
Merge pull request #3749 from gitbutlerapp/update-file-event-removal-of-session-id
remove sessions/deltas unused tauri events
2024-05-12 03:37:24 +02:00
Kiril Videlov
91e48c6730
remove sessions/deltas unused tauri events 2024-05-12 03:24:36 +02:00
Kiril Videlov
27f0802443 remove gb_reference from projects 2024-05-12 03:08:54 +02:00
Kiril Videlov
3eaaccc2e0
remove deltas calculation on file change
This is being replaced by the new `ops` module

Along with the respective tests. There were only session/deletas related assertions in the watcher tests
2024-05-12 02:54:19 +02:00
Kiril Videlov
d51761a654 remove unused flush event 2024-05-12 02:22:05 +02:00
Kiril Videlov
18cf10a143
remove unused fetch_gb_data 2024-05-12 02:13:02 +02:00
Kiril Videlov
bca8e13dfb
remove unused push_gb_data 2024-05-12 02:05:07 +02:00
Kiril Videlov
2bbe4fa569
remove unused list_deltas endpoint 2024-05-11 21:12:08 +02:00
Kiril Videlov
598fc0ae26
Merge pull request #3744 from gitbutlerapp/remove-sessions-command
remove unused list_sessions
2024-05-11 21:09:45 +02:00
Kiril Videlov
14a7e8b2a1
remove unused list_sessions 2024-05-11 20:58:14 +02:00
Kiril Videlov
217efbc932 remove unused project_flush_and_push 2024-05-11 20:52:05 +02:00
Scott Chacon
4d542330c5 merge stuff 2024-05-11 11:43:06 +02:00
Kiril Videlov
62b97f7f5a remove unused imports 2024-05-10 20:31:07 +02:00
Kiril Videlov
97c072cb7a remove unused endpoint list_session_files 2024-05-10 20:30:45 +02:00
Kiril Videlov
9e5094247b
fix rust clippy error 2024-05-09 11:33:32 -07:00
Kiril Videlov
58c124627a
add an enpoint for getting the snapshot diff 2024-05-09 11:24:42 -07:00
Josh Junon
2006511a80
Merge pull request #3724 from gitbutlerapp/fork-exec-sign
add gitbutler_git::sign_commit()
2024-05-08 12:28:22 +02:00
Mattias Granlund
e7f25e29c5 Check we are on the right branch in verify_branch
Ensures we don't accidentally run commands while HEAD is pointing to something other than the gitbutler/integration branch.
2024-05-08 12:20:00 +02:00
Josh Junon
738e47a377
fix sync sign utility 2024-05-08 12:16:06 +02:00
Kiril Videlov
e6633df481
feat: Optimize snapshot creation in Oplog.rs
Check for differences between the current tree and the parent tree
before creating a new snapshot to prevent creating noop snapshots.
2024-05-08 03:12:17 +02:00
Kiril Videlov
903991eea7
use default snapshot_lines_threshold 2024-05-08 02:58:30 +02:00
Kiril Videlov
7cddab8285
fix early return missing snaposhotting 🤦‍♂️ 2024-05-08 01:35:11 +02:00
Kiril Videlov
a942cb6f79
move snapshot creation on branch update to trait 2024-05-08 01:09:53 +02:00
Kiril Videlov
1ae1efeec0
rename tauri module for undo operations 2024-05-08 00:36:16 +02:00
Kiril Videlov
93d5e61530 rename module snapshots to ops 2024-05-08 00:29:38 +02:00
Kiril Videlov
289aafb496 rename snapshoter to snapshot 2024-05-08 00:29:38 +02:00
Kiril Videlov
2c065a602e rename module of oplog trait 2024-05-08 00:29:38 +02:00
Kiril Videlov
f6e19e6c12
compose traits for nicer snapshotting functions 2024-05-08 00:00:18 +02:00
Mattias Granlund
e0a2985f37 Fix background switching between target.sha and integration commit 2024-05-07 16:59:06 +02:00
Josh Junon
ca714084b1
add synchronous signed git commit utility function 2024-05-07 16:37:52 +02:00
Josh Junon
b9aae21b97
add v4 features to uuid crate for gitbutler-git 2024-05-07 16:26:41 +02:00
Josh Junon
c564ccc7f7
add gitbutler_git::sign_commit() 2024-05-07 16:26:38 +02:00
Josh Junon
1fd0b1ecfc
make askpass broker a global 2024-05-07 16:07:37 +02:00
Scott Chacon
51f9769024 sign commits with real git
in the strangest possible way
2024-05-07 15:15:25 +02:00
Scott Chacon
ff11fcdb90 Add change-id property to commit
Each commit has a change-id added to it's header field so we can more easily track patches by unique ids
2024-05-07 10:28:29 +02:00
Josh Junon
6afd680781
remove old changeset code 2024-05-07 07:03:34 +02:00
Kiril Videlov
1bc41a9146 snapshot list pagination 2024-05-07 00:46:22 +02:00
Kiril Videlov
80346af154 fixes a possible condition where if integration commit is not found a lot of integreated commits are added to a vbranch 2024-05-07 00:02:22 +02:00
Caleb Owens
f13e827e33 Don't reparse branch_id
This should make the situation where an error occurs even more absurd. It should also be saving some extra work which is always a bonus
2024-05-06 19:50:07 +01:00
Josh Junon
0b903bcaef
Merge pull request #3697 from anaisbetts/clean-up-win32-menus
Clean up win32 menus
2024-05-06 20:44:40 +02:00
Josh Junon
dce8ead62f
use simpler virtual branch handle fetch in tests (and fix strange uncaught compilation error) 2024-05-06 20:22:40 +02:00
Josh Junon
da62926a30
simplify retrieving of the vb_state handle 2024-05-06 20:08:28 +02:00
Josh Junon
85d045362a
remove useless AsRef impl 2024-05-06 20:07:47 +02:00
Josh Junon
dffca846c4
remove empty else branch 2024-05-06 20:07:42 +02:00
Josh Junon
58f866d588
simplify certain uses of as_ref() in virtual.rs 2024-05-06 20:07:39 +02:00
Josh Junon
d6baf7d8f0
simplify hunk hash diff calls 2024-05-06 20:07:34 +02:00
Josh Junon
21dd4800c3
fix typo: timestam_ms -> timestamp_ms 2024-05-06 20:04:29 +02:00
Kiril Videlov
98e511c459 fixes a bug where after updating the workspace the app shows infinite spinner 2024-05-06 18:20:09 +02:00
Ani Betts
1309481273
Fix lint 2024-05-06 17:42:34 +02:00
Kiril Videlov
0091bfa1eb
Merge pull request #3688 from gitbutlerapp/resolve-large-quantity-of-files-slow-start
Optimize list_virtual_branches
2024-05-06 16:43:30 +02:00
Scott Chacon
d79bf65e51
Merge pull request #3677 from gitbutlerapp/target-branch-selector-fix
initial implementation of different push target
2024-05-06 16:31:01 +02:00
Ani Betts
ec320376ff
Don't have a Window menu on Win32/Linux
Generally, we have a Window menu only in apps that can have multiple related windows or tabs. Since we don't have that at the moment, 🔪 the Window menu
2024-05-06 16:28:01 +02:00
Ani Betts
828a7e55b2
We don't need a separate "Close" item on non-macOS
Because Win32 and Linux apps generally close when their windows close, we don't need a separate "Close" vs "Quit" item on these platforms
2024-05-06 16:27:25 +02:00
Scott Chacon
4ea691a1cd fetch from push remote too 2024-05-06 16:01:06 +02:00
Kiril Videlov
c29440e472 remove files list trailer from snapshot
This info is extracted from the snapshot itself
2024-05-06 15:36:56 +02:00
Kiril Videlov
b1bb9bf51c
snapshot listing includes stats about the snapshot
inclue files touched as well as lines added and removed
2024-05-06 15:26:44 +02:00
Scott Chacon
46fe51eeda fix rust errors 2024-05-06 14:30:25 +02:00
Scott Chacon
ca634807b1
Merge branch 'master' into target-branch-selector-fix 2024-05-06 13:49:27 +02:00
Scott Chacon
344e3d3f38 small rust stuff 2024-05-06 13:44:08 +02:00
Josh Junon
add0a84165
add help menu handler for debug info sharing and remove panic 2024-05-06 12:58:50 +02:00
Josh Junon
cf74b12a3c
Merge pull request #3693 from gitbutlerapp/Help-window-menu
"Help" window menu
2024-05-06 12:37:14 +02:00
Pavel Laptev
53d6e58850
match statement update 2024-05-06 12:24:18 +02:00
Pavel Laptev
81ff230fb7
code review fixes 2024-05-06 12:12:39 +02:00
Pavel Laptev
c14fa2f864
version added 2024-05-06 12:05:50 +02:00
Josh Junon
574f0142f9
sort projects list alphabetically by title 2024-05-06 11:32:41 +02:00
Kiril Videlov
4f1c63ca77
dont error commands on snapshoting erros
If the snapshoting returns an error that should not interfere with the command that the user originally intended to run
2024-05-05 22:34:15 +02:00
Kiril Videlov
5f6ff257d1
refactor snapshotting as an Oplog trait
Implemented on Project
2024-05-05 22:28:12 +02:00
Pavel Laptev
e38e68477b
lint fixes 2024-05-05 21:57:45 +02:00
Pavel Laptev
043917ad45
Help window menu added 2024-05-05 21:40:06 +02:00
Kiril Videlov
c59767651d fix: auto snapshotting on changed lines of code
Compare against the last snapshot
2024-05-05 20:08:34 +02:00
Caleb Owens
442ff9dbac Push rather than inserting
This in theory is a faster way of adding items to the list, but at the very least, makes it consistent with the other branch which also uses `push`
2024-05-05 18:07:30 +01:00
Caleb Owens
fc8d8bcb43 Optimize virtual branch file sorting
The changes in this commit optimize the sorting of virtual branch files
by pre-computing the index positions of the ownership claims for each
file path. This improves the performance of the sorting operation by
avoiding the need to repeatedly search for the index positions during
the comparison step.

With 1900 hunks in a vbranch, I've found that this helps reduce the run time from 9 seconds down to just 5.

I considered not sorting at all if we didn't have any branches, but this didn't provide any substantial change in performance.
2024-05-05 18:07:30 +01:00
Kiril Videlov
9aa7b11311
fix a snapshot bug on windows
paths shouldn't be handcoding the separator
2024-05-05 17:55:10 +02:00
Kiril Videlov
a0a834b8bd
create and restore return the shas of the snapshots 2024-05-05 17:39:45 +02:00
Kiril Videlov
bd8b0bf246
improve docs 2024-05-05 17:32:00 +02:00
Kiril Videlov
c24da92b6f
test: snapshotting of conflict state 2024-05-05 17:31:52 +02:00
Kiril Videlov
0771efc52f
include conflict state in snapshots 2024-05-05 17:31:29 +02:00
Pavel Laptev
4d5f77b7f4
Merge branch 'master' into target-branch-selector-fix 2024-05-04 23:30:54 +02:00
Kiril Videlov
5e54e0ed01
make SNAPSHOT_LINES_THRESHOLD configurable 2024-05-04 19:34:54 +02:00
Kiril Videlov
ebae6bf8de
create a snapshot every 20 lines changed 2024-05-04 19:20:22 +02:00
Kiril Videlov
25b7acc59c
adds a new snapshot entry type FileChanges 2024-05-04 19:19:52 +02:00
Kiril Videlov
32e5b97495 create a GbRepo trait for building blocks gitbutler uses
As well as an implementation for git2::Repository
2024-05-04 19:19:09 +02:00
Kiril Videlov
105a355e5d
fix: only skip big files from snapshotting if they are untracked 2024-05-04 16:28:34 +02:00
Kiril Videlov
f8e05ec694 skip pager on windows 2024-05-04 12:14:24 +02:00
Kiril Videlov
9aee55c869
tiny cli for snapshots
this is a cli convinience tool for listing and restoring gitbutler snapshots even if the app can't start or if it's hung. of course this can be done with plain git, but this is more convinient

In the future we could add more functionality to it
2024-05-04 11:29:14 +02:00
Scott Chacon
aa9a775842 Merged origin/master into target-branch-selector-fix 2024-05-03 13:51:01 +02:00
Scott Chacon
ea08accec1 whoopsie 2024-05-03 11:39:54 +02:00
Scott Chacon
0442744c13
Merge branch 'master' into target-branch-selector-fix 2024-05-03 11:26:16 +02:00
Scott Chacon
5527d2b6e2 initial implementation of different push target 2024-05-03 11:20:47 +02:00
Kiril Videlov
8ef46ce42c
snapshots: use subtrees for virtual_branches.toml
Instead of copying the file to the working directory, simply create a top level tree with a subtree for the workdir and a blob for the toml file
2024-05-03 11:13:55 +02:00
Mattias Granlund
5bb8c25aca Fix bug in updating base branch
- drop "double lock across branches" test because it can't happen
- save correct tree when updating branch states
- use correct integration commit when updating base branch
2024-05-02 17:39:52 +02:00
Josh Junon
6747da6e50
simplify default target retrieval logic 2024-05-02 13:28:21 +02:00
Josh Junon
664aadcd1c
eliminate redundancy in unix timestamp retrieval 2024-05-02 12:43:35 +02:00
dependabot[bot]
a1a3abc868
Bump the rust-updates group with 10 updates
Bumps the rust-updates group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [serde](https://github.com/serde-rs/serde) | `1.0.197` | `1.0.199` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.58` | `1.0.59` |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.81` | `1.0.82` |
| [async-trait](https://github.com/dtolnay/async-trait) | `0.1.79` | `0.1.80` |
| [chrono](https://github.com/chronotope/chrono) | `0.4.37` | `0.4.38` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.2` | `0.12.4` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.115` | `1.0.116` |
| [ssh-key](https://github.com/RustCrypto/SSH) | `0.6.5` | `0.6.6` |
| [tauri](https://github.com/tauri-apps/tauri) | `1.6.1` | `1.6.2` |
| [sysinfo](https://github.com/GuillaumeGomez/sysinfo) | `0.30.8` | `0.30.11` |


Updates `serde` from 1.0.197 to 1.0.199
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.199)

Updates `thiserror` from 1.0.58 to 1.0.59
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.58...1.0.59)

Updates `anyhow` from 1.0.81 to 1.0.82
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82)

Updates `async-trait` from 0.1.79 to 0.1.80
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.79...0.1.80)

Updates `chrono` from 0.4.37 to 0.4.38
- [Release notes](https://github.com/chronotope/chrono/releases)
- [Changelog](https://github.com/chronotope/chrono/blob/main/CHANGELOG.md)
- [Commits](https://github.com/chronotope/chrono/compare/v0.4.37...v0.4.38)

Updates `reqwest` from 0.12.2 to 0.12.4
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.12.2...v0.12.4)

Updates `serde_json` from 1.0.115 to 1.0.116
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.115...v1.0.116)

Updates `ssh-key` from 0.6.5 to 0.6.6
- [Commits](https://github.com/RustCrypto/SSH/compare/ssh-key/v0.6.5...ssh-key/v0.6.6)

Updates `tauri` from 1.6.1 to 1.6.2
- [Release notes](https://github.com/tauri-apps/tauri/releases)
- [Commits](https://github.com/tauri-apps/tauri/compare/tauri-v1.6.1...tauri-v1.6.2)

Updates `sysinfo` from 0.30.8 to 0.30.11
- [Changelog](https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/GuillaumeGomez/sysinfo/compare/v0.30.8...v0.30.11)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: chrono
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: ssh-key
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: tauri
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
- dependency-name: sysinfo
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: rust-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-01 15:11:55 +00:00
GitButler
28ca280c0d fix: removing an update all projects operation on read
this is no longer needed and it is causing an issue on windows
2024-04-30 13:42:34 -07:00
Josh Junon
d71e4d3617
escape env vars and use raw args on windows in fork/exec git 2024-04-30 14:56:21 +02:00
Josh Junon
d0f1082c7f
Merge pull request #3637 from gitbutlerapp/fix-git-forkexec-ssh-command
also check GIT_SSH when looking for base ssh command
2024-04-30 12:21:54 +02:00
Josh Junon
8d942d6557
pull git ssh commands from surrounding environment as fallback 2024-04-30 12:09:05 +02:00
Josh Junon
de2622c2b6
also check GIT_SSH when looking for base ssh command (ref #3624) 2024-04-30 11:59:15 +02:00
Josh Junon
b350a85e5c
add google images CDN to img-src CSP (fixes #3516) 2024-04-30 11:48:00 +02:00
Kiril Videlov
0d8b97b36c
fix: undo snapshots will disregard files larger than 32MB
Ensuring that a snapshot "undo" does not remove those files
2024-04-29 20:28:27 +02:00
Kiril Videlov
27480c503e
Merge pull request #3629 from gitbutlerapp/remove-rust-posthog-integration
remove posthog from the rust code
2024-04-29 16:28:11 +02:00
Scott Chacon
786a834559
Merge pull request #3626 from gitbutlerapp/sc-history-manipulation
operation tonkotsu 2
2024-04-29 16:17:57 +02:00
Kiril Videlov
00706b402b
remove posthog from the rust code
similar to https://github.com/gitbutlerapp/gitbutler/pull/3628
2024-04-29 16:12:14 +02:00