Re: [PATCH 28/33] builtin/diff-tree: cleanup references to sha1

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

 



Brandon Williams <bmwill@xxxxxxxxxx> writes:

> @@ -132,15 +131,14 @@ int cmd_diff_tree(int argc, const char **argv, const char *prefix)
>  	 * reverse the order of the objects if the second one
>  	 * is marked UNINTERESTING.
>  	 */
> -	nr_sha1 = opt->pending.nr;
> -	switch (nr_sha1) {
> +	switch (opt->pending.nr) {

Unrelated to the topic of this patch, but I notice that the comment
whose tail shows in the pre-context of this hunk is incorrect.

  We expect "a..b" to expand to "^a b" but it is perfectly possible
  for revision range parser to produce "b ^a", which means the same
  thing.  We we get the latter, i.e. the second one is marked
  UNINTERESTING, we recover the original "a..b" by swapping the
  order.

is probably what we wanted to say.  These days, I suspect that we
may be able to do a lot better by using rev_cmdline_info thing,
which did not exist when this code was written.




[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]