Thread (1 message) 1 message, 1 author, 2020-01-31

Re: [PATCH 2/6] commit-graph.h: store object directory in 'struct commit_graph'

flat view

From: Junio C Hamano <hidden>
Date: 2020-01-31 20:49:43

Martin Ågren [off-list ref] writes:
quoted
+               struct object_directory *odb;
+               if ((odb = find_odb(the_repository, opts.obj_dir)))
+                       graph = read_commit_graph_one(the_repository, odb);
+       }
I'm a tiny bit allergic to this assignment-within-if. It's wrapped by
another pair of parentheses, which both compilers and humans know to
interpret as "trust me, this is not a mistake", but I still find this
easier to read:

  odb = find_odb(...);
  if (odb)
          ....
Yup.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help