diff options
-rw-r--r-- | branch.c | 3 | ||||
-rwxr-xr-x | t/t3200-branch.sh | 2 |
2 files changed, 2 insertions, 3 deletions
@@ -203,8 +203,7 @@ static int check_tracking_branch(struct remote *remote, void *cb_data) struct refspec query; memset(&query, 0, sizeof(struct refspec)); query.dst = tracking_branch; - return !(remote_find_tracking(remote, &query) || - prefixcmp(query.src, "refs/heads/")); + return !remote_find_tracking(remote, &query); } static int validate_remote_tracking_branch(char *ref) diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 4031693e71..f010303270 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -871,7 +871,7 @@ test_expect_success '--merged catches invalid object names' ' test_must_fail git branch --merged 0000000000000000000000000000000000000000 ' -test_expect_failure 'tracking with unexpected .fetch refspec' ' +test_expect_success 'tracking with unexpected .fetch refspec' ' git init a && ( cd a && |