Re: [PATCH v2 2/2] whatchanged: require --i-still-use-this

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

 



Patrick Steinhardt <ps@xxxxxx> writes:

> I was briefly wondering why this variable wasn't just declared in
> `cmd_whatchanged()`, but that's because parsing is of course done by
> `cmd_log_init_finish()`. Nothing worth thinking about too much.

Yeah, it is between "cfg that is conveniently passed around the code
paths, even though it is not a configuration item" vs "a file-scope
static variable that will live until we decide to remove (or keep)
the command".

>> @@ -656,6 +665,10 @@ int cmd_whatchanged(int argc,
>>  	opt.def = "HEAD";
>>  	opt.revarg_opt = REVARG_COMMITTISH;
>>  	cmd_log_init(argc, argv, prefix, &rev, &opt, &cfg);
>> +
>> +	if (!cfg.i_still_use_this)
>> +		you_still_use_that("git whatchanged");
>> +
>>  	if (!rev.diffopt.output_format)
>>  		rev.diffopt.output_format = DIFF_FORMAT_RAW;
>>  
>
> I think it would help potential users of this command quite a bit if we
> explicitly told them what the replacement is. So maybe we can extend
> `you_still_use_that()` to accept an explanation?

I doubt it.  The reason why we remove something is not "because a
better alternative exists"; it is "because everybody *HAS* switched
to the better alternative".  If we need to educate folks in this
message, the plan to remove that command is still premature.




[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