summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-07-30 21:34:32 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-07-30 21:34:32 -0700
commitd61aed07bd0c61420879f42b4b961785ed1f742a (patch)
tree15db78208cd3165188688b8eb82609fa168adffd
parentMerge branch 'sg/ci-git-path-fix-with-pyenv' into master (diff)
parentpack-write/docs: update regarding pack naming (diff)
downloadtgif-d61aed07bd0c61420879f42b4b961785ed1f742a.tar.xz
Merge branch 'jb/doc-packfile-name' into master
Doc update. * jb/doc-packfile-name: pack-write/docs: update regarding pack naming
-rw-r--r--Documentation/git-index-pack.txt4
-rw-r--r--pack-write.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/Documentation/git-index-pack.txt b/Documentation/git-index-pack.txt
index 9316d9a80b..ac74d058e0 100644
--- a/Documentation/git-index-pack.txt
+++ b/Documentation/git-index-pack.txt
@@ -104,8 +104,8 @@ 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
+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'
diff --git a/pack-write.c b/pack-write.c
index f0017beb9d..685d327d80 100644
--- a/pack-write.c
+++ b/pack-write.c
@@ -38,9 +38,8 @@ static int need_large_offset(off_t offset, const struct pack_idx_option *opts)
}
/*
- * On entry *sha1 contains the pack content SHA1 hash, on exit it is
- * the SHA1 hash of sorted object names. The objects array passed in
- * will be sorted by SHA1 on exit.
+ * The *sha1 contains the pack content SHA1 hash.
+ * The objects array passed in will be sorted by SHA1 on exit.
*/
const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects,
int nr_objects, const struct pack_idx_option *opts,