threads / patch / 3922

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

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

## tl;dr

2 messages between Apr 19, 2006 and Apr 19, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Junio C Hamano· Apr 19, 2006, 20:01 UTC · lore
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 * 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(-)
Show changes to sha1_name.c +1 −1
diff --git a/sha1_name.c b/sha1_name.c
index 35e8dfb..7ad20b5 100644
--- a/sha1_name.c
+++ b/sha1_name.c
@@ -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)
 {
-- 
1.3.0.g2c4a
Linus Torvalds· Apr 19, 2006, 20:50 UTC · re: Junio C Hamano · lore

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

On Wed, 19 Apr 2006, Junio C Hamano wrote:
>
>  * 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

← back to recent threads