Re: [PATCH 1/3] reset: add --stage and --work options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 8, 2013 at 5:05 PM, Ramkumar Ramachandra <artagnon@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]