Merge branch 'maint'
authorJunio C Hamano <junkio@cox.net>
Wed, 1 Nov 2006 23:09:55 +0000 (15:09 -0800)
committerJunio C Hamano <junkio@cox.net>
Wed, 1 Nov 2006 23:09:55 +0000 (15:09 -0800)
* maint:
pack-objects doesn't create random pack names
link_temp_to_file: don't leave the path truncated on adjust_shared_perm failure

Documentation/git-pack-objects.txt
sha1_file.c
index a1e55054bd544848605eec8bfaa2cc29ac94f3d0..9bd1e39feb0b34ef01c0bc0df7a9be0ded0e34cb 100644 (file)
@@ -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::
index e89d24c01595aa8ea6c6306928639b40f3313a50..570706919aeae6ba6d5c12df3babf110be6d76a9 100644 (file)
@@ -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;