Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  pack-objects doesn't create random pack names
  link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure
  • Loading branch information
Junio C Hamano committed Nov 1, 2006
2 parents 1da1b3a + e23ed9a commit 7854e52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Documentation/git-pack-objects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ base-name::
<base-name> to determine the name of the created file.
When this option is used, the two files are written in
<base-name>-<SHA1>.{pack,idx} files. <SHA1> is a hash
of object names (currently in random order so it does
not have any useful meaning) to make the resulting
filename reasonably unique, and written to the standard
of the sorted object names to make the resulting filename
based on the pack content, and written to the standard
output of the command.

--stdout::
Expand Down
4 changes: 3 additions & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,8 +1400,10 @@ static int link_temp_to_file(const char *tmpfile, const char *filename)
if (dir) {
*dir = 0;
mkdir(filename, 0777);
if (adjust_shared_perm(filename))
if (adjust_shared_perm(filename)) {
*dir = '/';
return -2;
}
*dir = '/';
if (!link(tmpfile, filename))
return 0;
Expand Down

0 comments on commit 7854e52

Please sign in to comment.