Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread demerphq
On 13 September 2017 at 17:22, Jeff King wrote: > On Wed, Sep 13, 2017 at 05:18:56PM +0200, demerphq wrote: > >> > Hmph. That is very disturbing. But with that information I should be >> > able to track down the culprit. Thanks for digging. >> >> FWIW, I see that git_config_set_multivar_in_file_ge

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread Jeff King
On Wed, Sep 13, 2017 at 05:18:56PM +0200, demerphq wrote: > > Hmph. That is very disturbing. But with that information I should be > > able to track down the culprit. Thanks for digging. > > FWIW, I see that git_config_set_multivar_in_file_gently() uses > write_in_full() which in turn uses xwrite

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread demerphq
On 13 September 2017 at 16:51, Jeff King wrote: > On Wed, Sep 13, 2017 at 04:49:45PM +0200, demerphq wrote: > >> On 13 September 2017 at 16:17, Jeff King wrote: >> > You're welcome to read over the function to double-check, but I just >> > looked it over and couldn't find any unchecked writes. >>

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread Jeff King
On Wed, Sep 13, 2017 at 04:49:45PM +0200, demerphq wrote: > On 13 September 2017 at 16:17, Jeff King wrote: > > You're welcome to read over the function to double-check, but I just > > looked it over and couldn't find any unchecked writes. > > I can look, but I doubt I would notice something you

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread demerphq
On 13 September 2017 at 16:17, Jeff King wrote: > You're welcome to read over the function to double-check, but I just > looked it over and couldn't find any unchecked writes. I can look, but I doubt I would notice something you did not. On the other hand the strace output does show that this is

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread Jeff King
On Wed, Sep 13, 2017 at 03:38:52PM +0200, demerphq wrote: > I just double checked the terminal history and this is all i saw: > > $ 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

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread demerphq
On 13 September 2017 at 14:34, Jeff King wrote: > On Wed, Sep 13, 2017 at 01:59:17PM +0200, demerphq wrote: > >> 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 upstr

Re: Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread Jeff King
On Wed, Sep 13, 2017 at 01:59:17PM +0200, demerphq wrote: > 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 fi

Bug: git branch --unset-upstream command can nuke config when disk is full.

2017-09-13 Thread demerphq
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