From: Felipe Contreras Date: Sun, 08 Sep 2013 22:55:24 GMT Subject: Re: [PATCH 1/3] reset: add --stage and --work options Message-ID: In-Reply-To: On Sun, Sep 8, 2013 at 5:05 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> >> @@ -290,6 +294,22 @@ int cmd_reset(int argc, const char **argv, const char >> *prefix) >> hashcpy(sha1, tree->object.sha1); >> } >> >> + if (stage >= 0 || working_tree >= 0) { >> + if (reset_type != NONE) >> + die(_("--{stage,work} are incompatible with >> --{hard,mixed,soft,merge}")); >> + >> + if (working_tree == 1) { >> + if (stage == 0) >> + die(_("--no-stage doesn't make sense with >> --work")); >> + reset_type = HARD; >> + } else { >> + if (stage == 1) >> + reset_type = NONE; >> + else >> + reset_type = SOFT; >> + } >> + } >> + > > > Not making sense at this point. Why does --stage set a reset_type? Yeah, we would need another patch to cleanup the variable names, but for now it's better to minimize the changes. Either way it doesn't matter because Junio is determined to stand alone versus the rest of the world in this issue. -- Felipe Contreras