pack-write/docs: update regarding pack naming

The index-pack documentation explicitly states that the pack
name is derived from the sorted list of object names, but
since commit 1190a1acf8 ("pack-objects: name pack files
after trailer hash") that isn't true anymore.

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.

Also update a comment on write_idx_file() since it no longer
modifies the sha1 variable (it's const now anyway), as noted
by Junio.

Fixes: 1190a1acf8 ("pack-objects: name pack files after trailer hash")
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Berg
2020-07-22 23:40:31 +02:00
committed by Junio C Hamano
parent 1190a1acf8
commit e2bfa50ac3
2 changed files with 4 additions and 5 deletions

View File

@@ -91,8 +91,8 @@ OPTIONS
Note
----
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
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'