Re: [PATCH] rename_ref(): only print a warning when config-file update fails

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] rename_ref(): only print a warning when config-file update fails

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

Lars Hjemli [off-list ref] writes:
If git_config_rename_section() fails, rename_ref() used to return 1, which
left HEAD pointing to an absent refs/heads file (since the actual renaming
had already occurred).
I wonder if rolling back the rename that was asked is an
option.  We would want to keep these low-level things atomic
whenever possible.

Re: [PATCH] rename_ref(): only print a warning when config-file update fails

From: Lars Hjemli <hidden>
Date: 2016-06-15 22:43:03

On 4/6/07, Junio C Hamano [off-list ref] wrote:
Lars Hjemli [off-list ref] writes:
quoted
If git_config_rename_section() fails, rename_ref() used to return 1, which
left HEAD pointing to an absent refs/heads file (since the actual renaming
had already occurred).
I wonder if rolling back the rename that was asked is an
option.  We would want to keep these low-level things atomic
whenever possible.
I was wondering the same thing, i.e. "goto rollback" as an option for
"error()". But I ended up thinking that rename_ref() shouldn't bother
with the config file at all (thus my other patch).

-- 
larsh

Re: [PATCH] rename_ref(): only print a warning when config-file update fails

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:03

"Lars Hjemli" [off-list ref] writes:
quoted
I wonder if rolling back the rename that was asked is an
option.  We would want to keep these low-level things atomic
whenever possible.
I was wondering the same thing, i.e. "goto rollback" as an option for
"error()". But I ended up thinking that rename_ref() shouldn't bother
with the config file at all (thus my other patch).
I agree that "other patch" is sensible regardless.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help