git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Super long branch names corrupt `.git/config`
@ 2012-10-04 17:15 Ben Olive
  2012-10-04 18:29 ` Jeff King
  2012-10-04 19:28 ` Junio C Hamano
  0 siblings, 2 replies; 6+ messages in thread
From: Ben Olive @ 2012-10-04 17:15 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-05 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 17:15 Super long branch names corrupt `.git/config` Ben Olive
2012-10-04 18:29 ` 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

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).