From: Ben Olive <sionide21@gmail.com>
To: git@vger.kernel.org
Subject: Super long branch names corrupt `.git/config`
Date: Thu, 4 Oct 2012 13:15:25 -0400 [thread overview]
Message-ID: <CAAmo=1BU5N8nbonEb1aZEx=-e8VexwsE74pjm_56dXmCDK+K6g@mail.gmail.com> (raw)
My `.git/config` can be corrupted if I try to get a local branch with
an extremely long name to track a remote branch.
Here is a (contrived) example to reproduce the issue:
$ cd /tmp
$ mkdir buggyrepo otherrepo
$ cd buggyrepo/ && git init && cd -
$ cd otherrepo/ && git init && cd -
$ cd buggyrepo/
$ echo foo > MYFILE
$ git add MYFILE && git commit -m "Initial"
$ git remote add otherrepo ../otherrepo/
$ git checkout -b `ruby -e "puts 'a'*200"`
$ git push -u otherrepo `ruby -e "puts 'a'*200"`
fatal: bad config file line 11 in .git/config
$ git status
fatal: bad config file line 11 in .git/config
Workaround available: Just delete the offending entry.
I tested this with 1.7.12.2
--Ben Olive
next reply other threads:[~2012-10-04 22:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-04 17:15 Ben Olive [this message]
2012-10-04 18:29 ` Super long branch names corrupt `.git/config` Jeff King
2012-10-04 19:28 ` Junio C Hamano
2012-10-05 0:29 ` Jeff King
2012-10-05 0:36 ` Andrew Ardill
2012-10-05 15:38 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAmo=1BU5N8nbonEb1aZEx=-e8VexwsE74pjm_56dXmCDK+K6g@mail.gmail.com' \
--to=sionide21@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).