Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

on-demand branchname validity (while typing) #559

Closed
extrawurst opened this issue Mar 1, 2021 · 10 comments · Fixed by #842
Closed

on-demand branchname validity (while typing) #559

extrawurst opened this issue Mar 1, 2021 · 10 comments · Fixed by #842
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@extrawurst
Copy link
Owner

extrawurst commented Mar 1, 2021

libgit2 exposes a helper function to check a branch name validity: https://libgit2.org/libgit2/#HEAD/group/branch/git_branch_name_is_valid

lets run this against the input before it gets confirmed.
this way we can give live feedback to the user whether the name is valid.

@extrawurst extrawurst added enhancement New feature or request good first issue Good for newcomers labels Mar 1, 2021
@extrawurst
Copy link
Owner Author

@franciscod
Copy link

hello there! rust newcomer here. will take a shot at this :)

@extrawurst
Copy link
Owner Author

hello there! rust newcomer here. will take a shot at this :)

Very cool, welcome! Let me know when you need any help

@extrawurst
Copy link
Owner Author

requires upstream change first: rust-lang/git2-rs#714

@franciscod
Copy link

wip: rust-lang/git2-rs#715

@extrawurst extrawurst changed the title on-demand branchname validity on-demand branchname validity (while typing) May 29, 2021
@franciscod
Copy link

also wip: master...franciscod:wip_check_branch_name

(won't create PR until the one in git2-rs lands)

@extrawurst
Copy link
Owner Author

@franciscod congrats for the merge in git2-rs but it did not contain the same function for tags which we also wanted to cover in here :(

@franciscod
Copy link

Thanks! git_branch_name_is_valid is the only one that I implemented. Internally it also checks that it's a valid name for a reference. Do we need anything else?

@franciscod
Copy link

ah, for tags, missed that one! Well #759 is my work in progress for branches, I guess we could do branches first and then tags?

@extrawurst
Copy link
Owner Author

after rust-lang/git2-rs#734 we can at least go ahead with the branch validity check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants