From: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
To: git@vger.kernel.org
Cc: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>,
mhagger@alum.mit.edu, christian.couder@gmail.com
Subject: [PATCH] branch.c: delete size check of newly tracked branch names
Date: Fri, 28 Feb 2014 12:09:04 +0100 [thread overview]
Message-ID: <1393585744-2569-1-git-send-email-jacopo.notarstefano@gmail.com> (raw)
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.
This patch removes this unneeded check and thus allows for branch names
longer than 1019 characters.
Signed-off-by: Jacopo Notarstefano <jacopo.notarstefano@gmail.com>
---
Submitted as GSoC microproject #3.
branch.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/branch.c b/branch.c
index 723a36b..05feaff 100644
--- a/branch.c
+++ b/branch.c
@@ -114,10 +114,6 @@ static int setup_tracking(const char *new_ref, const char *orig_ref,
struct tracking tracking;
int config_flags = quiet ? 0 : BRANCH_CONFIG_VERBOSE;
- if (strlen(new_ref) > 1024 - 7 - 7 - 1)
- return error(_("Tracking not set up: name too long: %s"),
- new_ref);
-
memset(&tracking, 0, sizeof(tracking));
tracking.spec.dst = (char *)orig_ref;
if (for_each_remote(find_tracked_branch, &tracking))
--
1.9.0.1.g5abca64
next reply other threads:[~2014-02-28 11:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 11:09 Jacopo Notarstefano [this message]
2014-02-28 11:16 ` [PATCH] branch.c: delete size check of newly tracked branch names Jacopo Notarstefano
2014-02-28 11:41 ` Duy Nguyen
2014-02-28 12:14 ` Jacopo Notarstefano
2014-02-28 12:43 ` Duy Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393585744-2569-1-git-send-email-jacopo.notarstefano@gmail.com \
--to=jacopo.notarstefano@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=mhagger@alum.mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).