We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4e18de commit e77754eCopy full SHA for e77754e
src/wrap/partialrefname.rs
@@ -101,7 +101,9 @@ pub(crate) fn partial_ref_name(input: &mut &str) -> ModalResult<PartialRefName>
101
102
let name = input.next_slice(split_offset);
103
104
- if name.is_empty() || name == "-" || name.ends_with(".lock") {
+ if name.is_empty() || name == "-" {
105
+ Err(ErrMode::Backtrack(ContextError::from_input(input)))
106
+ } else if name.ends_with(".lock") {
107
// Names ending with ".lock" are invalid and there is no recovery.
108
Err(ErrMode::Cut(ContextError::from_input(input)))
109
} else {
0 commit comments