Thread (17 messages) flat view 17 messages, 2 authors, 2016-06-15

Re: [PATCH 1/5] sequencer: factor code out of revert builtin

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:52:28

Hi,

Small note.

Jonathan Nieder writes:
quoted
--- a/sequencer.c
+++ b/sequencer.c
@@ -1,7 +1,27 @@
 #include "cache.h"
+#include "object.h"
+#include "commit.h"
+#include "tag.h"
+#include "run-command.h"
+#include "exec_cmd.h"
+#include "utf8.h"
+#include "cache-tree.h"
+#include "diff.h"
+#include "revision.h"
+#include "rerere.h"
+#include "merge-recursive.h"
+#include "refs.h"
-#include "sequencer.h"
-#include "strbuf.h"
 #include "dir.h"
+#include "sequencer.h"
Why did sequencer.h move to after dir.h?
1. I like the convention of including the "foo.h" as the last header
in "foo.c".  I suppose it has to do with the way I include standard
headers in my own code (for pet projects).
2. I didn't want to include many of these headers in sequencer.h again
-- it uses a lot of these data types.  I've noticed that ordering of
header inclusion is important in many parts of Git, so the convention
just stuck.

Thanks.

-- Ram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help