Thread (1 message) 1 message, 1 author, 2017-06-02

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

From: Junio C Hamano <hidden>
Date: 2017-06-02 01:26:40

Brandon Williams [off-list ref] writes:
quoted hunk
@@ -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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help