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

[PATCH 2/4] object-file.c: rename from sha1-file.c

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Dec 29, 2020, 23:52 UTC
Message-ID
<4243886d8a3df2922fd56fed2a25b2911ec7128c.1609282997.git.martin.agren@gmail.com>
In-Reply-To
<cover.1609282997.git.martin.agren@gmail.com>

Drop the last remnant of "sha1" in this file and rename it to reflect that we're not just able to handle SHA-1 these days.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
---
 t/oid-info/README            | 2 +-
 builtin/index-pack.c         | 2 +-
 sha1-file.c => object-file.c | 2 +-
 Makefile                     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename sha1-file.c => object-file.c (99%)
diff --git a/t/oid-info/README b/t/oid-info/README
index 27f843fc00..ca56a74b1e 100644
--- a/t/oid-info/README
+++ b/t/oid-info/README
@@ -5,7 +5,7 @@ starting with `#` are ignored.  The key and value are separated by whitespace
 (specifically, those whitespace in the default `$IFS`).  The key consists only
 of shell identifier characters, and the value consists of a hash algorithm,
 colon, and value.  The hash algorithm also consists only of shell identifier
-characters; it should match the value in sha1-file.c.
+characters; it should match the value in object-file.c.
 
 For example, the following lines map the key "rawsz" to "20" if SHA-1 is in use
 and to "32" if SHA-256 is in use:
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 4b8d86e0ad..557bd2f348 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -1641,7 +1641,7 @@ static void read_idx_option(struct pack_idx_option *opts, const char *pack_name)
 	/*
 	 * Get rid of the idx file as we do not need it anymore.
 	 * NEEDSWORK: extract this bit from free_pack_by_name() in
-	 * sha1-file.c, perhaps?  It shouldn't matter very much as we
+	 * object-file.c, perhaps?  It shouldn't matter very much as we
 	 * know we haven't installed this pack (hence we never have
 	 * read anything from it).
 	 */
diff --git a/sha1-file.c b/object-file.c
similarity index 99%
rename from sha1-file.c
rename to object-file.c
index c3c49d2fa5..b0c47b02bd 100644
--- a/sha1-file.c
+++ b/object-file.c
@@ -3,7 +3,7 @@
  *
  * Copyright (C) Linus Torvalds, 2005
  *
- * This handles basic git sha1 object files - packing, unpacking,
+ * This handles basic git object files - packing, unpacking,
  * creation etc.
  */
 #include "cache.h"
diff --git a/Makefile b/Makefile
index 8bb1163f70..224a1c6940 100644
--- a/Makefile
+++ b/Makefile
@@ -937,6 +937,7 @@ LIB_OBJS += notes-cache.o
 LIB_OBJS += notes-merge.o
 LIB_OBJS += notes-utils.o
 LIB_OBJS += notes.o
+LIB_OBJS += object-file.o
 LIB_OBJS += object-name.o
 LIB_OBJS += object.o
 LIB_OBJS += oid-array.o
@@ -994,7 +995,6 @@ LIB_OBJS += sequencer.o
 LIB_OBJS += serve.o
 LIB_OBJS += server-info.o
 LIB_OBJS += setup.o
-LIB_OBJS += sha1-file.o
 LIB_OBJS += sha1-lookup.o
 LIB_OBJS += shallow.o
 LIB_OBJS += sideband.o
-- 
2.30.0
Previous: Derrick StoleeNext: Martin Ågren
Message 4 of 19 in “rename "sha1-foo" files”
  1. 0/4 rename "sha1-foo" filesMartin Ågren, Dec 29, 2020
  2. 1/4 object-name.c: rename from sha1-name.cMartin Ågren, Dec 29, 2020
  3. Derrick StoleeDec 30, 2020
  4. 2/4 object-file.c: rename from sha1-file.cMartin Ågren, Dec 29, 2020
  5. 3/4 sha1-lookup: rename `sha1_pos()` as `hash_pos()`Martin Ågren, Dec 29, 2020
  6. Derrick StoleeDec 30, 2020
  7. 4/4 hash-lookup: rename from sha1-lookupMartin Ågren, Dec 29, 2020
  8. Derrick StoleeDec 30, 2020
  9. Martin ÅgrenDec 30, 2020
  10. Derrick StoleeDec 30, 2020
  11. brian m. carlsonDec 30, 2020
  12. Martin ÅgrenDec 30, 2020
  13. 0/4 rename "sha1-foo" filesMartin Ågren, Dec 31, 2020
  14. 1/4 object-name.c: rename from sha1-name.cMartin Ågren, Dec 31, 2020
  15. 2/4 object-file.c: rename from sha1-file.cMartin Ågren, Dec 31, 2020
  16. 3/4 sha1-lookup: rename `sha1_pos()` as `hash_pos()`Martin Ågren, Dec 31, 2020
  17. 4/4 hash-lookup: rename from sha1-lookupMartin Ågren, Dec 31, 2020
  18. Derrick StoleeDec 31, 2020
  19. Martin ÅgrenDec 31, 2020

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.