Sebastian Thiel
107eea6743
Use gix
for branch normalization
2024-08-09 21:53:38 +02:00
Sebastian Thiel
4c76e2a6ee
Revert "Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix""
...
This reverts commit 88496e6219
.
2024-08-09 10:30:52 +02:00
Kiril Videlov
88496e6219
Revert "Merge pull request #4652 from gitbutlerapp/git2-to-gix"
...
This reverts commit ae8b05ae70
, reversing
changes made to 4d9b6a4a93
.
2024-08-09 10:18:51 +02:00
Sebastian Thiel
712ce582cb
Use BranchIdentity
type instead of given_name()
.
...
This is a change in perception, as `given_name()` was the name of a virtual-branch,
which is also used to correlate other similarly named branches.
Thus, it's now more than just that, and for lack of a better word it's called
the 'identity' of a branch.
It's something very specific and shouldn't accidentally be used wrongly, hence
the strong typing.
2024-08-08 20:53:15 +02:00
Kiril Videlov
7d629c52b5
derive some useful traits for tagged string and reference name
2024-08-08 14:48:06 +02:00
Sebastian Thiel
7fea6b8130
fix: don't allow trailing .
( #4570 )
...
This is a quick-fix for a specific case, even though the actual fix
should be offering branch normalization as part of the validation.
2024-08-02 09:15:39 +02:00
Sebastian Thiel
37c81b991b
show that revert
branch name now fails to validate ( #4570 )
2024-08-01 22:17:42 +02:00
Sebastian Thiel
2d82b6e038
more tests specific to how branches are discovered
2024-07-31 19:44:00 +02:00
Sebastian Thiel
182381dd79
assure normalization will always provide valid ref-names, or fail.
...
Otherwise, it's possible to run into `git2` errors, which are
more 'indirect'.
2024-07-31 18:52:01 +02:00
Pavel Laptev
efb5c13725
refactor: Normalize branch name by replacing invalid characters with hyphens.
2024-07-18 14:32:30 +02:00
Pavel Laptev
b888fbc834
normilize-branch-name-update ( #4392 )
...
* refactor: Normalized branch name handling
* Refactor: use only one normalize function (rust)
* Deletion: unused `normalizeBranchName` function
* Update lib.rs
* Changed test to reflect new functionality
---------
Co-authored-by: Caleb Owens <caleb@gitbutler.com>
2024-07-16 11:23:09 +02:00
Kiril Videlov
87f956d871
move ReferenceName tagged string to gitbutler-reference crate
...
gitbutler-reference is where ReferenceName belongs. There are other thing in this crate that are not nice, but let's clean those up!
2024-07-10 16:48:59 +02:00
Caleb Owens
9b59764db3
Split branch creation and deletion into their own home
2024-07-09 16:47:24 +02:00
Kiril Videlov
cdec47154d
remove references to gitbutler-core
2024-07-09 15:56:57 +02:00
Kiril Videlov
01f3e0f0c4
extract tagged string to its own crate
2024-07-09 14:57:43 +02:00
Kiril Videlov
00354771b7
move ReferenceName type to the reference crate
2024-07-09 14:53:36 +02:00
Kiril Videlov
de200c8e20
move reference module from core to its own crate
2024-07-09 01:14:28 +02:00