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

[PATCH v2] doc: remove misleading documentation on pack names

From
Johannes Berg <johannes@sipsolutions.net>
Date
Jul 22, 2020, 20:26 UTC
Message-ID
<20200722202629.109277-1-johannes@sipsolutions.net>

The index-pack documentation explicitly states that the pack name is derived from the sorted list of object names, but that clearly isn't true. I can't seem to be able to figure out if this was ever changed though.

Be less explicit in the docs as to what the exact output is, and just say that it's whatever goes into the pack name.

Really it seems to be the sha1 of the entire file, without the checksum footer.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
It was reported that bup writes pack files that have a name
different from what git does, and I think it's quite possibly
because of this documentation ... it doesn't actually really
*matter* though, as long as the file is internally consistent
nothing checks that the name also matches the footer.

You can also take this as a bug report and fix the language in some other, perhaps more precise way, if you prefer :-)

v2: correct bup list address, oops
---
 Documentation/git-index-pack.txt | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt
index 9316d9a80b0d..ace40fa9f363 100644
--- a/Documentation/git-index-pack.txt
+++ b/Documentation/git-index-pack.txt
@@ -104,12 +104,11 @@ This option cannot be used with --stdin.
 NOTES
 -----
 
-Once the index has been created, the list of object names is sorted
-and the SHA-1 hash of that list is printed to stdout. If --stdin was
-also used then this is prefixed by either "pack\t", or "keep\t" if a
-new .keep file was successfully created. This is useful to remove a
-.keep file used as a lock to prevent the race with 'git repack'
-mentioned above.
+Once the index has been created, the hash that goes into the name of
+the pack/idx file is printed to stdout. If --stdin was also used then
+this is prefixed by either "pack\t", or "keep\t" if a new .keep file
+was successfully created. This is useful to remove a .keep file used
+as a lock to prevent the race with 'git repack' mentioned above.
 
 GIT
 ---
-- 
2.26.2
Next: Junio C Hamano
Message 1 of 4 in “doc: remove misleading documentation on pack names”
  1. doc: remove misleading documentation on pack namesJohannes Berg, Jul 22, 2020
  2. Junio C HamanoJul 22, 2020
  3. Johannes BergJul 22, 2020
  4. Junio C HamanoJul 22, 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.