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

2 messages from 2006-04-19 to 2006-04-19. Participants: Junio C Hamano, Linus Torvalds.
Thread: https://gitlist.dev/t/3922

## Junio C Hamano, 2006-04-19 20:01

Subject: [PATCH] sha1_name.c: no need to include diff.h; tree-walk.h will do.
Message-ID: <7v1wvt8hdb.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7v1wvt8hdb.fsf%40assigned-by-dhcp.cox.net

```

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(-)

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, 2006-04-19 20:50

Subject: Re: [PATCH] sha1_name.c: no need to include diff.h; tree-walk.h will do.
Message-ID: <Pine.LNX.4.64.0604191348230.3701@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.64.0604191348230.3701%40g5.osdl.org
In-Reply-To: <7v1wvt8hdb.fsf@assigned-by-dhcp.cox.net>

```


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

```
