git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] Drop unnecessary #includes from test-hashmap

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 14, 2013, 02:06 UTC
Message-ID
<20131214020640.GD2311@google.com>
In-Reply-To
<20131214020413.GB2311@google.com>

Per Documentation/CodingGuidelines most C files in git start with a #include of git-compat-util.h or another header file that includes it, such as cache.h or builtin.h. This file doesn't need anything beyond "git-compat-util.h", so use that.

Remove a #include of the system header <stdio.h> since it is already included by "git-compat-util.h".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 test-hashmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/test-hashmap.c b/test-hashmap.c
index 7e86f88..f5183fb 100644
--- a/test-hashmap.c
+++ b/test-hashmap.c
@@ -1,6 +1,5 @@
-#include "cache.h"
+#include "git-compat-util.h"
 #include "hashmap.h"
-#include <stdio.h>
 
 struct test_entry
 {
-- 
1.8.5.1
Previous: Jonathan NiederNext: Karsten Blees
Message 6 of 20 in “New hash table implementation”
  1. 00/14 New hash table implementationKarsten Blees, Nov 14, 2013
  2. 01/14 submodule: don't access the .gitmodules cache entry after removing itKarsten Blees, Nov 14, 2013
  3. 02/14 add a hashtable implementation that supports O(1) removalKarsten Blees, Nov 14, 2013
  4. Jonathan NiederDec 14, 2013
  5. 1/2 Add test-hashmap to .gitignoreJonathan Nieder, Dec 14, 2013
  6. 2/2 Drop unnecessary #includes from test-hashmapJonathan Nieder, Dec 14, 2013
  7. Karsten BleesDec 18, 2013
  8. 03/14 buitin/describe.c: use new hash map implementationKarsten Blees, Nov 14, 2013
  9. 04/14 diffcore-rename.c: move code around to prepare for the next patchKarsten Blees, Nov 14, 2013
  10. 05/14 diffcore-rename.c: simplify finding exact renamesKarsten Blees, Nov 14, 2013
  11. 06/14 diffcore-rename.c: use new hash map implementationKarsten Blees, Nov 14, 2013
  12. 07/14 name-hash.c: use new hash map implementation for directoriesKarsten Blees, Nov 14, 2013
  13. 08/14 name-hash.c: remove unreferenced directory entriesKarsten Blees, Nov 14, 2013
  14. 09/14 name-hash.c: use new hash map implementation for cache entriesKarsten Blees, Nov 14, 2013
  15. 10/14 name-hash.c: remove cache entries instead of marking them CE_UNHASHEDKarsten Blees, Nov 14, 2013
  16. 11/14 remove old hash.[ch] implementationKarsten Blees, Nov 14, 2013
  17. 12/14 fix 'git update-index --verbose --again' outputKarsten Blees, Nov 14, 2013
  18. 13/14 builtin/update-index.c: cleanup update_oneKarsten Blees, Nov 14, 2013
  19. 14/14 read-cache.c: fix memory leaks caused by removed cache entriesKarsten Blees, Nov 14, 2013
  20. Karsten BleesNov 14, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.