Bug: git branch --unset-upstream command can nuke config when disk is full.
- From
- demerphq <demerphq@gmail.com>
- Date
- Sep 13, 2017, 11:59 UTC
- Message-ID
- <CANgJU+Wj_sN8Px6rweHMw_iAX8UA3mW9x4NVCctpUCs8_3ytLw@mail.gmail.com>
After being away for a while I saw the following message in one of my git repos:
$ git status On branch yves/xxx Your branch is based on 'origin/yves/xxx', but the upstream is gone. (use "git branch --unset-upstream" to fixup)
nothing to commit, working tree clean $ git branch --unset-upstream fatal: could not unset 'branch.yves/simple_projection.merge'
At this point my .git/config file was empty, and all of my config was lost.
I assume that things that rewrite .git/config do not check for a successful write before deleting the old version of the file.
This was git version 2.14.1
Yves
-- perl -Mre=debug -e "/just|another|perl|hacker/"