Commit Graph

576 Commits

Author SHA1 Message Date
Kiril Videlov
428566492b remove shell type git::Branch 2024-06-01 21:25:27 +02:00
Kiril Videlov
a4afd0d0df notify of branch being unapplied only for these that we indeed applied before 2024-06-01 19:26:03 +02:00
Sebastian Thiel
83893a9db3
review error docs to fit the latest changes 2024-06-01 15:24:59 +02:00
Sebastian Thiel
567a077582
simplify core::errors and remove all the cruft 2024-06-01 14:37:41 +02:00
Sebastian Thiel
0ef944ed25
Switch thiserror with anyhow based errors in application code
This should simplify most code.
2024-06-01 14:36:08 +02:00
Sebastian Thiel
a10b19ed2c
reomve all thiserror based errors from controllers 2024-06-01 14:36:08 +02:00
Sebastian Thiel
939624f725
Remove all custom errors from virtual branches module.
In order to do that, errors from other modules have to go as well.
2024-06-01 14:36:05 +02:00
Sebastian Thiel
f82d25741e
use Marker in place of Code::ProjectInvalid
That way, the frontend doesn't see internals.
2024-06-01 14:34:16 +02:00
Sebastian Thiel
e7c1d6033a
Remove all errors that don't trigger a custom code or context 2024-06-01 14:34:16 +02:00
Sebastian Thiel
c0fc0cfde5
Remove BranchNotFound struct 2024-06-01 14:34:16 +02:00
Sebastian Thiel
a95c48a6cf
remove DefaultTargetNotSet in favor of a utility function 2024-06-01 14:34:16 +02:00
Sebastian Thiel
61a53c6346
Another pass at removing ProjectConflict
As this causes quite a lot of changes, there is this commit to capture them.
2024-06-01 14:34:13 +02:00
Sebastian Thiel
1dc52a44c0
restore detection of project conflicts
Previously that variant was removed even though we need it now to
easily detect this case.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
20d84247e9
Prune Code to only what's used by the UI
Also adjust the `Code` documentation to clarify this - otherwise
we will have more and more variants and nobody actually cares.

The frontend code is adjusted as well, as its `Code` counterpart
contained unsused variants which are now removed.
2024-06-01 14:32:27 +02:00
Sebastian Thiel
d689f36e7f
various refactors
Also

- add tests for ref-log file to assure it's not zero (but something more sensible)
- remove generic for convenience on most callsites
2024-06-01 14:32:19 +02:00
Kiril Videlov
d164457299 update_base_branch returns unapplied branches list
If merge conflicts caused branches to become unapplied, return them as a list
2024-06-01 13:11:53 +02:00
Ani Betts
035736a245
Fix the test paths 2024-05-31 15:27:16 +02:00
Ani Betts
4363f0fcc4
Leave these exports here in case we need them later 2024-05-31 15:27:16 +02:00
Ani Betts
73ab4bdd90
First hack at readding the tests 2024-05-31 15:27:16 +02:00
Ani Betts
3e34a92634
Chill out some of these logs 2024-05-31 15:27:16 +02:00
Ani Betts
bc31c65fc3
Let's just get it working 2024-05-31 15:27:16 +02:00
Ani Betts
2b3690308c
Roll back to v0.3.1 + flush changes 2024-05-31 15:27:15 +02:00
Mattias Granlund
97dfa93bda Remove error logging related to blame
- blame range can include commits not in vbranch
- lookup returning none expected behavior
2024-05-31 02:37:47 +02:00
Mattias Granlund
b47a947398 Fix blame merge base
- use the merge base of the first commits on active branches
2024-05-31 01:57:59 +02:00
Kiril Videlov
4b8d97a500 save error on undo commit snapshot 2024-05-30 23:59:30 +02:00
Kiril Videlov
0f482934c8 save error on unapply branch snapshot 2024-05-30 23:44:58 +02:00
Kiril Videlov
618c7adedc save error on apply branch snapshot 2024-05-30 22:31:16 +02:00
Kiril Videlov
d7ae4d85f1 first stab at saving errors in snapshots 2024-05-30 22:07:02 +02:00
Kiril Videlov
2e788de86f
Revert "fix: performance issue " 2024-05-30 20:10:23 +02:00
Kiril Videlov
e908828b3a
Merge pull request #3910 from gitbutlerapp/check-mergeable-state-of-virtual-branch
feat: Show merge base of virtual branch in commit list
2024-05-30 20:03:18 +02:00
Kiril Videlov
e6f75dae0f fix: performance issue
this is an undo of cdf508e04c
2024-05-30 19:35:10 +02:00
Mattias Granlund
10df1621a7 Keep change id when amending a commit 2024-05-30 19:09:18 +02:00
Kiril Videlov
088eb23f8e feat: Show merge base of virtual branch in commit list 2024-05-30 18:41:40 +02:00
Kiril Videlov
909894149f fix a small thing 2024-05-30 17:51:27 +02:00
Kiril Videlov
8550965d14 oopsie 2024-05-30 16:33:28 +02:00
Kiril Videlov
3af46b3cae handle merge commits 2024-05-30 16:23:40 +02:00
Kiril Videlov
7c06114ab2 list_remote_commit_files: on merge commit dont show wrong diffs
Right now it's not possible to show the correct diff because libgit2 doesn't have a `git diff-tree --cc` equivalent
2024-05-30 15:29:27 +02:00
Mattias Granlund
ed0663ce10 Fix invalid commit range in blame operation
- fixes commit_to_branch related errors
- fixes big performance problem when force push disallowed
2024-05-30 16:15:12 +02:00
Caleb Owens
251424d567 Fix origin/master showing in sidebar 2024-05-30 13:56:39 +02:00
Kiril Videlov
93d019afce
Merge pull request #3901 from gitbutlerapp/update-reflog-time
fixes reflog timestamps
2024-05-30 12:14:21 +02:00
Mattias Granlund
eeb99090ad Fix incorrect workspace_head during merge conflicts
- without this we get an incorrect diff
2024-05-30 12:09:27 +02:00
Kiril Videlov
06ea63ee7c fixes reflog timestamps
Time stapms are super imporatant for this (thanks @schacon) - without a correct time stamp, the trees will be GC'd
2024-05-30 12:02:30 +02:00
Kiril Videlov
62a3d02303 remove git::signature shell type 2024-05-29 23:51:26 +02:00
Kiril Videlov
ff9e36fb21 simplify git signature use 2024-05-29 23:37:32 +02:00
Kiril Videlov
8496dbf044 remove git::treebuilder in favor of plain git2 builder 2024-05-29 23:03:25 +02:00
Kiril Videlov
c3f374af72 remove git::FileMode shell type 2024-05-29 22:42:27 +02:00
Sebastian Thiel
7f9462a857
refactor CommitExt
- remove conflicting `*_gb()` methods as the native ones are easy enough to use
- some minor refactor
2024-05-29 21:47:03 +02:00
Sebastian Thiel
d5708b38bb
assure reflog is recreated if not present even if ref is present 2024-05-29 21:16:52 +02:00
Kiril Videlov
fb069e5d39 feat(git): remove unused Blob type 2024-05-29 18:14:50 +02:00
Sebastian Thiel
96dc9d2887
fix oplog-worktree merging 2024-05-29 17:58:54 +02:00