Merge branch 'fc/atmark-in-refspec'
"@" sometimes worked (e.g. "git push origin @:there") as a part of a refspec element, but "git push origin @" did not work, which has been corrected. * fc/atmark-in-refspec: refspec: make @ a synonym of HEAD tests: push: trivial cleanup tests: push: improve cleanup of HEAD tests
This commit is contained in:
@ -71,7 +71,10 @@ static int parse_refspec(struct refspec_item *item, const char *refspec, int fet
|
||||
}
|
||||
|
||||
item->pattern = is_glob;
|
||||
item->src = xstrndup(lhs, llen);
|
||||
if (llen == 1 && *lhs == '@')
|
||||
item->src = xstrdup("HEAD");
|
||||
else
|
||||
item->src = xstrndup(lhs, llen);
|
||||
flags = REFNAME_ALLOW_ONELEVEL | (is_glob ? REFNAME_REFSPEC_PATTERN : 0);
|
||||
|
||||
if (item->negative) {
|
||||
|
Reference in New Issue
Block a user