Re: [PATCH 08/19] reset.c: share call to die_if_unmerged_cache()

2013-01-10 Thread Martin von Zweigbergk
On Wed, Jan 9, 2013 at 11:48 AM, Junio C Hamano wrote: > Martin von Zweigbergk writes: > >> Use a single condition to guard the call to die_if_unmerged_cache for >> both --soft and --keep. This avoids the small distraction of the >> precondition check from the logic following it. >> >> Also chang

Re: [PATCH 08/19] reset.c: share call to die_if_unmerged_cache()

2013-01-09 Thread Junio C Hamano
Martin von Zweigbergk writes: > Use a single condition to guard the call to die_if_unmerged_cache for > both --soft and --keep. This avoids the small distraction of the > precondition check from the logic following it. > > Also change an instance of > > if (e) > err = err || f(); > > to the

[PATCH 08/19] reset.c: share call to die_if_unmerged_cache()

2013-01-09 Thread Martin von Zweigbergk
Use a single condition to guard the call to die_if_unmerged_cache for both --soft and --keep. This avoids the small distraction of the precondition check from the logic following it. Also change an instance of if (e) err = err || f(); to the almost as short, but clearer if (e && !err)