History

more push-spec restrictions (#450)

Sebastian Thiel committed 4 years ago

Commit bb992ac1 parent 57a6e694 files · +43 −3Browse files

Showing the changes to git-refspec/src/parse.rs (1 of 4 files). Show all

Unified · Split

git-refspec/src/parse.rs+1−1
@@ -113,7 +113,7 @@ pub(crate) mod function { · 112 unmodified lines
113 *spec = "HEAD".into();113 *spec = "HEAD".into();
114 }114 }
115 }115 }
116 let (src, src_had_pattern) = validated(src, operation == Operation::Push)?;116 let (src, src_had_pattern) = validated(src, operation == Operation::Push && dst.is_some())?;
117 let (dst, dst_had_pattern) = validated(dst, false)?;117 let (dst, dst_had_pattern) = validated(dst, false)?;
118 if !dst_had_pattern && looks_like_object_hash(dst.unwrap_or_default()) {118 if !dst_had_pattern && looks_like_object_hash(dst.unwrap_or_default()) {
119 return Err(Error::InvalidFetchDestination);119 return Err(Error::InvalidFetchDestination);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t