Commit Graph

8826 Commits

Author SHA1 Message Date
Sebastian Thiel
4ae354392b
Improve performance of list-local using git2. 2024-08-30 07:15:47 +02:00
Sebastian Thiel
36f23d529f
CLI with branch list-remotes to list remote branches 2024-08-30 07:15:46 +02:00
Sebastian Thiel
6a4849d090
refactor: avoid borrowed git2::Oid as it's a copy type.
Usually this makes the affected code simpler.
2024-08-30 07:15:46 +02:00
Sebastian Thiel
c81b140790
Assure the most-recent workspace head is used when emitting changed files.
The reason for this is that now the outcome of this can be re-used in `list_virtual_branches`,
which is sensitive to seeing the latest vbranch state which is not a given.

Calculating it makes sure there is no mismatch, and probably "can't be wrong".

Also note that `head_commit()` is still kept around as it's the idea to eventually
use it more.
2024-08-30 07:15:40 +02:00
Filipe Louro
92349391f3 Refactor RepoInfo type to use domain instead of source and resource 2024-08-29 18:24:45 +03:00
Filipe Louro
90bf797ad0 Add resource to tests to make checks happy 2024-08-29 18:24:45 +03:00
Filipe Louro
43264e28f2 Run prettier 2024-08-29 18:24:45 +03:00
Filipe Louro
bec6ddcefa Make if statement more strict 2024-08-29 18:24:45 +03:00
Filipe Louro
3cc2edda7a Set gitHostFactory for gitlab self hosted instances 2024-08-29 18:24:45 +03:00
Nico Domino
0f48b53108
feat: add <form /> to Modal implementation (#4780) 2024-08-29 11:34:47 +02:00
Sebastian Thiel
b03ba56288
Merge pull request #4784 from Byron/fix-features
Remove unnecessary `gix` features from `watcher` and add them to `tauri`
2024-08-29 09:50:53 +02:00
Sebastian Thiel
47b6d41a26
Merge pull request #4771 from Byron/git2-to-gix
list virtual branches performance
2024-08-29 09:50:35 +02:00
Sebastian Thiel
a7b01bd641
Keep using get_workspace_head() when no cached result is used.
That way, the application will not run into unexpected cases.
2024-08-29 09:34:54 +02:00
Sebastian Thiel
79798c7407
Exclude big files when performing a worktree diff.
This was lost previously when switching it over to a read-only
implementation.
Implementing it with an ignore list will take time, 400ms in the GitLab
repository, but it's not slower than it was before and it is always
preferred to not dump objects into the ODB unnecessarily.
2024-08-29 09:31:59 +02:00
Sebastian Thiel
8c7159d906
Remove unnecessary gix features from watcher and add them to tauri 2024-08-29 07:26:29 +02:00
Sebastian Thiel
a0e236110a
refactor
- move `gix` repository extension to where it belongs more naturally.
- make sure that `get_wd_tree()` is named more closely to what it really
  does, and use it in more places.
2024-08-28 22:05:25 +02:00
Sebastian Thiel
751e091f6f
Reuse the worktree-diff during 'recalulate-everything'
It's used for emission of changed files, but also for listing
branch information.

Make sure we only run the worktree-status once to save time.

This also unifies the acquisition of the `HEAD^{commit}`,
which one day will be a natural feature once `gix::Repository`
is used.
2024-08-28 21:42:29 +02:00
Sebastian Thiel
13deabdebd
find large files more quickly thanks to gix based dirwalk
Also make sure that important `gix` crates are always compiled
with optimization for proper performance.

This is particularly useful when optimizing performance as not
everything has to be done in release mode.

However, it also causes CI to be slower as it compiles some
dependencies longer.

The problem realy is that `tauri dev` doesn't support custom profiles,
so there is only `dev` and `release`.
2024-08-28 21:19:47 +02:00
Sebastian Thiel
7ce143954f
Do not dynamically calculate the head commit when listing virtual branches.
That way, the head is static which allows to re-use the worktree status across
multiple related calls.

Also, add a way to quickly get the `head_commit()` from a `git2::Repository`.

Note that this may cause breakage in the app, as now it will see the actual
head, not a computed one, but that should also help us to find places that
didn't properly update their state.
2024-08-28 21:16:43 +02:00
Kiril Videlov
b2cdc37d41
Merge pull request #4779 from Byron/fix-clone
Assure HTTPS support is compiled into `gix` using `curl`.
2024-08-28 13:24:18 +02:00
Sebastian Thiel
41c053474a
Assure HTTPS support is compiled into gix using curl. 2024-08-28 12:55:44 +02:00
Sebastian Thiel
fc63929da3
Add a flag to allow performance logging: GITBUTLER_PERFORMANCE_LOG
````
GITBUTLER_PERFORMANCE_LOG=1 LOG_LEVEL=debug pnpm tauri dev
````

Additionally, some noise was removed by turning a warning into
a trace.
2024-08-28 11:41:29 +02:00
Pavel Laptev
95d11a2965
Fix files selection (#4764)
* allow select multiple if the lane is applied

* missing commit Id added

* fix selection with `shift`

* disable draggable icon for unapplied commits

* replace `isPreview` with existing `isUnapplied`

* do not allow mutliple selection for remote commits

* refactor(utils): small update

* revert previous commit

* review changes
2024-08-28 11:27:48 +02:00
Sebastian Thiel
7e0878a14f
Use read-only worktree diff
The worktree diff is essentially a 'git status' with a given tree,
and that can be expressed with a diff of the workdir, the index and a tree.

This comes at the expense of not being able to control which file sizes are diffed.
2024-08-28 11:10:04 +02:00
Sebastian Thiel
bd2c19db0b
Allow the bench profile to compile faster
There we don't necessarily need every last bit of optimization like
one would want in release profiles, but build performance is of the essence
for developer productivity.
2024-08-28 11:10:04 +02:00
Sebastian Thiel
30cc6a4838
Add branch status to CLI
It calls `list_virtual_branches()` which kind of has the effect of a status call.
2024-08-28 11:10:02 +02:00
Sebastian Thiel
dd724f310d
Also debug-trace information on list_virtual_branches calls.
This can be useful for those who seek extra information, and while it's
dominating refresh times.
2024-08-28 11:09:33 +02:00
Caleb Owens
5a69cd8412
Merge pull request #4776 from gitbutlerapp/have-sidebar-in-edit-mode
Have sidebar in edit mode
2024-08-28 10:52:08 +02:00
Caleb Owens
47358dd7a8
Have sidebar in edit mode 2024-08-28 10:41:47 +02:00
Caleb Owens
25409fd6f9
Merge pull request #4777 from gitbutlerapp/UI-updates-Edit-mode
UI updates: Edit mode
2024-08-28 10:19:40 +02:00
Kiril Videlov
b6c57eedf9
Merge pull request #4745 from Comnir/4472-fix-conflicting-branches-list-message
Fix conflicting-branches list message
2024-08-28 10:09:55 +02:00
Pavel Laptev
cb52363774 Sokitview updates 2024-08-27 23:37:05 +02:00
Kiril Videlov
12d48df0f7
Merge pull request #4774 from gitbutlerapp/remove-unused-feature-flag
remove unused feature flag
2024-08-27 20:57:26 +02:00
Nico Domino
30231c2f46
fix: dont hide "discard file" contextMenu option from binary files (#4770) 2024-08-27 20:50:47 +02:00
Kiril Videlov
74e7b1eeb5
remove unused feature flag 2024-08-27 20:46:22 +02:00
Kiril Videlov
551d78fc36
Merge pull request #4773 from gitbutlerapp/update-vercelignore-include-all
build: add a .vercelignore to ignore all files in crates
2024-08-27 20:42:10 +02:00
Kiril Videlov
e9d6d647d0
build: add a .vercelignore to ignore all files in crates 2024-08-27 19:59:18 +02:00
Caleb Owens
8e3b1bb351
Merge pull request #4769 from gitbutlerapp/Resolve-to-"our"-side
resolve to our side
2024-08-27 18:40:19 +02:00
Nico Domino
a1650b464a
fix: reenable tipsy hover on branch empty-state (#4772) 2024-08-27 15:28:04 +00:00
Mattias Granlund
864994514f
Update app updater button copy (#4762)
* Update app updater button copy

* copy update

---------

Co-authored-by: Pavel Laptev <pawellaptew@gmail.com>
2024-08-27 16:36:28 +02:00
Pavel Laptev
f4594dcfb4 disable hovers for file list items 2024-08-27 14:55:48 +02:00
Kiril Videlov
75805d35d8
Merge pull request #4718 from gitbutlerapp/branch-stacking-first-stab
branch stacking first stab
2024-08-27 14:33:19 +02:00
Kiril Videlov
06f50b4531 Merge branch 'master' into branch-stacking-first-stab 2024-08-27 14:13:08 +02:00
Nico Domino
a9b12f44b0
fix: use ubuntu-22.04 to build app for release (#4767) 2024-08-27 12:11:42 +00:00
Kiril Videlov
b943c35293
code review fixes 2024-08-27 14:05:27 +02:00
Caleb Owens
d386790930
resolve to our side 2024-08-27 14:00:56 +02:00
Caleb Owens
a7399ab083
Merge pull request #4760 from gitbutlerapp/Show-files-in-edit-mode
Show files in edit mode
2024-08-27 13:51:48 +02:00
Caleb Owens
0b397d2368
Jiggle some code about 2024-08-27 13:05:28 +02:00
Caleb Owens
3fb5077c4a
Somethign somethign matchy matchy design 2024-08-27 13:05:27 +02:00
Caleb Owens
d2d3afbf2b
Added unstaged changes event 2024-08-27 13:05:07 +02:00