Re: [PATCH v2 resend] git.c: make autocorrected aliases work

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

 



Alexander Potashev <aspotashev@xxxxxxxxx> writes:

>> @@ -479,31 +501,22 @@ int main(int argc, const char **argv)
>> ...
>> +		was_alias = run_argv(&argc, &argv);
>> +		if (errno != ENOENT)
>>  			break;
>> +		if (was_alias) {
>>  			fprintf(stderr, "Expansion of alias '%s' failed; "
>>  				"'%s' is not a git-command\n",
>>  				cmd, argv[0]);
>>  			exit(1);
>
> Why not using 'die' here?

The code is in the context, and I do not think it is a good idea to
conflate such a change to a patch that wants to add aliases auto
correction.

While I do not think it matters too much in practice (unless existing
scripts that runs git depends on the exact error status value), there are
two differences: the message will say "fatal: " in front, and the command
exits with 128 not with 1.
--
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]

  Powered by Linux