Super long branch names corrupt `.git/config`

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]