git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Martin Ågren" <martin.agren@gmail.com>
To: git@vger.kernel.org
Cc: "brian m . carlson" <sandals@crustytoothpaste.net>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH v2 2/4] object-file.c: rename from sha1-file.c
Date: Thu, 31 Dec 2020 12:56:21 +0100	[thread overview]
Message-ID: <7ab29b868f3980d1bf20fe21db5213b43e06c00b.1609415114.git.martin.agren@gmail.com> (raw)
In-Reply-To: <cover.1609415114.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 | 8 ++++----
 Makefile                     | 2 +-
 4 files changed, 7 insertions(+), 7 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..3508598d97 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"
@@ -508,9 +508,9 @@ static int alt_odb_usable(struct raw_object_store *o,
  * LF separated.  Its base points at a statically allocated buffer that
  * contains "/the/directory/corresponding/to/.git/objects/...", while
  * its name points just after the slash at the end of ".git/objects/"
- * in the example above, and has enough space to hold 40-byte hex
- * SHA1, an extra slash for the first level indirection, and the
- * terminating NUL.
+ * in the example above, and has enough space to hold all hex characters
+ * of the object ID, an extra slash for the first level indirection, and
+ * the terminating NUL.
  */
 static void read_info_alternates(struct repository *r,
 				 const char *relative_base,
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


  parent reply	other threads:[~2020-12-31 11:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 23:52 [PATCH 0/4] rename "sha1-foo" files Martin Ågren
2020-12-29 23:52 ` [PATCH 1/4] object-name.c: rename from sha1-name.c Martin Ågren
2020-12-30  1:19   ` Derrick Stolee
2020-12-29 23:52 ` [PATCH 2/4] object-file.c: rename from sha1-file.c Martin Ågren
2020-12-29 23:52 ` [PATCH 3/4] sha1-lookup: rename `sha1_pos()` as `hash_pos()` Martin Ågren
2020-12-30  1:21   ` Derrick Stolee
2020-12-29 23:53 ` [PATCH 4/4] hash-lookup: rename from sha1-lookup Martin Ågren
2020-12-30  1:29 ` [PATCH 0/4] rename "sha1-foo" files Derrick Stolee
2020-12-30  8:01   ` Martin Ågren
2020-12-30 13:35     ` Derrick Stolee
2020-12-30  4:22 ` brian m. carlson
2020-12-30  8:04   ` Martin Ågren
2020-12-31 11:56 ` [PATCH v2 " Martin Ågren
2020-12-31 11:56   ` [PATCH v2 1/4] object-name.c: rename from sha1-name.c Martin Ågren
2020-12-31 11:56   ` Martin Ågren [this message]
2020-12-31 11:56   ` [PATCH v2 3/4] sha1-lookup: rename `sha1_pos()` as `hash_pos()` Martin Ågren
2020-12-31 11:56   ` [PATCH v2 4/4] hash-lookup: rename from sha1-lookup Martin Ågren
2020-12-31 12:47   ` [PATCH v2 0/4] rename "sha1-foo" files Derrick Stolee
2020-12-31 13:36     ` Martin Ågren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ab29b868f3980d1bf20fe21db5213b43e06c00b.1609415114.git.martin.agren@gmail.com \
    --to=martin.agren@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).