branch.c: delete size check of newly tracked branch names

Since commit 6f084a56 the length of a newly tracked branch name was limited to 1019 = 1024 - 7 - 7 - 1 characters, a bound derived by having to store this name in a char[1024] called key with two strings of length at most 7 and a '\0' character. This was no longer necessary as of commit a9f2c136, which uses a strbuf (documented in Documentation/technical/api-strbuf.txt) to store this value. Remove this unneeded check to allow branch names longer than 1019 characters. Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jacopo Notarstefano committed Feb 28, 2014 at 12:09 UTC 9ef5e2a7223fbabf6a29946c1c120bc2c3c6cf86
1 file changed -4
branch.c
-4
@@ -114,10 +114,6 @@ static int setup_tracking(const char *new_ref, const char *orig_ref,
114 struct tracking tracking;
115 int config_flags = quiet ? 0 : BRANCH_CONFIG_VERBOSE;
116
117 - if (strlen(new_ref) > 1024 - 7 - 7 - 1)
118 - return error(_("Tracking not set up: name too long: %s"),
119 - new_ref);
120 -
117 memset(&tracking, 0, sizeof(tracking));
118 tracking.spec.dst = (char *)orig_ref;
119 if (for_each_remote(find_tracked_branch, &tracking))