Browse Source

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
maint
Junio C Hamano 18 years ago
parent
commit
7854e526ff
  1. 5
      Documentation/git-pack-objects.txt
  2. 4
      sha1_file.c

5
Documentation/git-pack-objects.txt

@ -47,9 +47,8 @@ base-name:: @@ -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::

4
sha1_file.c

@ -1400,8 +1400,10 @@ static int link_temp_to_file(const char *tmpfile, const char *filename) @@ -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;

Loading…
Cancel
Save