Skip to contentSkip to conversation

sha1_name.c: no need to include diff.h; tree-walk.h will do.

PATCH In review Junio C Hamano 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sha1_name.c: no need to include diff.h; tree-walk.h will do.

---
* Just a clean-up, comes on top of the one that returns mode from get_tree_entry().

 sha1_name.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sha1_name.c +1 -1
index 35e8dfb..7ad20b5 100644
@@ -3,7 +3,7 @@ #include "tag.h"
 #include "commit.h"
 #include "tree.h"
 #include "blob.h"
-#include "diff.h"
+#include "tree-walk.h"
 
 static int find_short_object_filename(int len, const char *name, unsigned char *sha1)
 {
Signature · 1 line
1.3.0.g2c4a
#1 lore raw
Quoted 3 lines · Junio C Hamano

* Just a clean-up, comes on top of the one that returns mode from get_tree_entry().

Ack (along with the mode addition).

However, since the function is now no longer private to the SHA1 name lookup, I wonder if it might not be more logically put into "tree-walk.c" instead of "sha1_name.c".

Just a thought.

Linus