Merge branch 'db/push-single-with-HEAD'
* db/push-single-with-HEAD: Resolve value supplied for no-colon push refspecs
This commit is contained in:
10
remote.c
10
remote.c
@ -730,9 +730,17 @@ static int match_explicit(struct ref *src, struct ref *dst,
|
||||
errs = 1;
|
||||
|
||||
if (!dst_value) {
|
||||
unsigned char sha1[20];
|
||||
int flag;
|
||||
|
||||
if (!matched_src)
|
||||
return errs;
|
||||
dst_value = matched_src->name;
|
||||
dst_value = resolve_ref(matched_src->name, sha1, 1, &flag);
|
||||
if (!dst_value ||
|
||||
((flag & REF_ISSYMREF) &&
|
||||
prefixcmp(dst_value, "refs/heads/")))
|
||||
die("%s cannot be resolved to branch.",
|
||||
matched_src->name);
|
||||
}
|
||||
|
||||
switch (count_refspec_match(dst_value, dst, &matched_dst)) {
|
||||
|
Reference in New Issue
Block a user