Skip to content
This repository was archived by the owner on Jul 2, 2019. It is now read-only.

Commit 7854e52

Browse files
author
Junio C Hamano
committed
Merge branch 'maint'
* maint: pack-objects doesn't create random pack names link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
2 parents 1da1b3a + e23ed9a commit 7854e52

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Documentation/git-pack-objects.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ base-name::
4747
<base-name> to determine the name of the created file.
4848
When this option is used, the two files are written in
4949
<base-name>-<SHA1>.{pack,idx} files. <SHA1> is a hash
50-
of object names (currently in random order so it does
51-
not have any useful meaning) to make the resulting
52-
filename reasonably unique, and written to the standard
50+
of the sorted object names to make the resulting filename
51+
based on the pack content, and written to the standard
5352
output of the command.
5453

5554
--stdout::

sha1_file.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,8 +1400,10 @@ static int link_temp_to_file(const char *tmpfile, const char *filename)
14001400
if (dir) {
14011401
*dir = 0;
14021402
mkdir(filename, 0777);
1403-
if (adjust_shared_perm(filename))
1403+
if (adjust_shared_perm(filename)) {
1404+
*dir = '/';
14041405
return -2;
1406+
}
14051407
*dir = '/';
14061408
if (!link(tmpfile, filename))
14071409
return 0;

0 commit comments

Comments
 (0)