Code

Merge branch 'maint' to sync with 1.5.6.3
authorJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2008 22:45:38 +0000 (15:45 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 Jul 2008 22:45:38 +0000 (15:45 -0700)
* maint:
  GIT 1.5.6.3
  git-am: Do not exit silently if committer is unset
  t0004: fix timing bug
  git-mailinfo: document the -n option
  Fix backwards-incompatible handling of core.sharedRepository

Documentation/RelNotes-1.5.6.3.txt
Documentation/git-mailinfo.txt
Documentation/git.txt
builtin-mailinfo.c
git-am.sh
path.c
t/t0004-unwritable.sh
t/t1301-shared-repo.sh

index dd0559b64a07e6ba010374d49bb19cf3b1169142..942611299d59abd4bdd820e1258662067a304d62 100644 (file)
@@ -4,8 +4,16 @@ GIT v1.5.6.3 Release Notes
 Fixes since v1.5.6.2
 --------------------
 
+* Setting core.sharerepository to traditional "true" value was supposed to make
+  the repository group writable but should not affect permission for others.
+  However, since 1.5.6, it was broken to drop permission for others when umask is
+  022, making the repository unreadable by others.
+
 * Setting GIT_TRACE will report spawning of external process via run_command().
 
+* Using an object with very deep delta chain pinned memory needed for extracting
+  intermediate base objects unnecessarily long, leading to excess memory usage.
+
 * Bash completion script did not notice '--' marker on the command
   line and tried the relatively slow "ref completion" even when
   completing arguments after one.
@@ -14,6 +22,12 @@ Fixes since v1.5.6.2
   tree file for it confused "racy-git avoidance" logic into thinking
   that the path is now unchanged.
 
+* The section that describes attributes related to git-archive were placed
+  in a wrong place in the gitattributes(5) manual page.
+
+* "git am" was not helpful to the users when it detected that the committer
+  information is not set up properly yet.
+
 * "git clone" had a leftover debugging fprintf().
 
 * "git clone -q" was not quiet enough as it used to and gave object count
@@ -23,8 +37,10 @@ Fixes since v1.5.6.2
   good thing if the remote side is well packed but otherwise not,
   especially for a project that is not really big.
 
-* The section that describes attributes related to git-archive were placed
-  in a wrong place in the gitattributes(5) manual page.
+* "git daemon" used to call syslog() from a signal handler, which
+  could raise signals of its own but generally is not reentrant.  This
+  was fixed by restructuring the code to report syslog() after the handler
+  returns.
 
 * When "git push" tries to remove a remote ref, and corresponding
   tracking ref is missing, we used to report error (i.e. failure to
@@ -34,9 +50,3 @@ Fixes since v1.5.6.2
   MIME multipart mail correctly.
 
 Contains other various documentation fixes.
-
---
-exec >/var/tmp/1
-O=v1.5.6.2-23-ge965647
-echo O=$(git describe maint)
-git shortlog --no-merges $O..maint
index cc52db3befda556a92b225539de0a9b95a1bf96c..316bcc679628c47c9734e0906665ce5f6e8e68fb 100644 (file)
@@ -8,7 +8,7 @@ git-mailinfo - Extracts patch and authorship from a single e-mail message
 
 SYNOPSIS
 --------
-'git mailinfo' [-k] [-u | --encoding=<encoding>] <msg> <patch>
+'git mailinfo' [-k] [-u | --encoding=<encoding> | -n] <msg> <patch>
 
 
 DESCRIPTION
@@ -46,6 +46,9 @@ conversion, even with this flag.
        from what is specified by i18n.commitencoding, this flag
        can be used to override it.
 
+-n::
+       Disable all charset re-coding of the metadata.
+
 <msg>::
        The commit log message extracted from e-mail, usually
        except the title line which comes from e-mail Subject.
index 4ecdc9f876143bc23197ef7361576f995cd998fb..27b9d31f7e274b4be45891a97a984ec566927ccc 100644 (file)
@@ -43,9 +43,10 @@ unreleased) version of git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v1.5.6.2/git.html[documentation for release 1.5.6.2]
+* link:v1.5.6.3/git.html[documentation for release 1.5.6.3]
 
 * release notes for
+  link:RelNotes-1.5.6.3.txt[1.5.6.3].
   link:RelNotes-1.5.6.2.txt[1.5.6.2].
   link:RelNotes-1.5.6.1.txt[1.5.6.1].
   link:RelNotes-1.5.6.txt[1.5.6].
index fa6e8f90a4d54eb07f2af80620e35e617c94d605..962aa34c8ea3f603abcbf7f8f94cf6914105cbef 100644 (file)
@@ -960,7 +960,7 @@ static int mailinfo(FILE *in, FILE *out, int ks, const char *encoding,
 }
 
 static const char mailinfo_usage[] =
-       "git-mailinfo [-k] [-u | --encoding=<encoding>] msg patch <mail >info";
+       "git-mailinfo [-k] [-u | --encoding=<encoding> | -n] msg patch <mail >info";
 
 int cmd_mailinfo(int argc, const char **argv, const char *prefix)
 {
index 2c517ede590c5c3274b03d1c980f9a847cc7d643..83b277acfdeafa1f745c3c96bc10eef320a2d6ec 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
@@ -30,7 +30,8 @@ set_reflog_action am
 require_work_tree
 cd_to_toplevel
 
-git var GIT_COMMITTER_IDENT >/dev/null || exit
+git var GIT_COMMITTER_IDENT >/dev/null ||
+       die "You need to set your committer info first"
 
 stop_here () {
     echo "$1" >"$dotest/next"
diff --git a/path.c b/path.c
index 598325598bba8685d18d24c6331562cdf63fc05f..504eae061fe27e846f67f3e1c25d51e886420b62 100644 (file)
--- a/path.c
+++ b/path.c
@@ -272,7 +272,7 @@ int adjust_shared_perm(const char *path)
                int tweak = shared_repository;
                if (!(mode & S_IWUSR))
                        tweak &= ~0222;
-               mode = (mode & ~0777) | tweak;
+               mode |= tweak;
        } else {
                /* Preserve old PERM_UMASK behaviour */
                if (mode & S_IWUSR)
index 9255c63c08f06399525ca098d0374ad7d197e0b7..63e1217e7162435c3da8ec7984b5f6a53b3a10e2 100755 (executable)
@@ -8,6 +8,7 @@ test_expect_success setup '
 
        >file &&
        git add file &&
+       test_tick &&
        git commit -m initial &&
        echo >file &&
        git add file
@@ -17,11 +18,11 @@ test_expect_success setup '
 test_expect_success 'write-tree should notice unwritable repository' '
 
        (
-               chmod a-w .git/objects
+               chmod a-w .git/objects .git/objects/?? &&
                test_must_fail git write-tree
        )
        status=$?
-       chmod 775 .git/objects
+       chmod 775 .git/objects .git/objects/??
        (exit $status)
 
 '
@@ -29,11 +30,11 @@ test_expect_success 'write-tree should notice unwritable repository' '
 test_expect_success 'commit should notice unwritable repository' '
 
        (
-               chmod a-w .git/objects
+               chmod a-w .git/objects .git/objects/?? &&
                test_must_fail git commit -m second
        )
        status=$?
-       chmod 775 .git/objects
+       chmod 775 .git/objects .git/objects/??
        (exit $status)
 
 '
@@ -41,12 +42,12 @@ test_expect_success 'commit should notice unwritable repository' '
 test_expect_success 'update-index should notice unwritable repository' '
 
        (
-               echo a >file &&
-               chmod a-w .git/objects
+               echo 6O >file &&
+               chmod a-w .git/objects .git/objects/?? &&
                test_must_fail git update-index file
        )
        status=$?
-       chmod 775 .git/objects
+       chmod 775 .git/objects .git/objects/??
        (exit $status)
 
 '
@@ -55,11 +56,11 @@ test_expect_success 'add should notice unwritable repository' '
 
        (
                echo b >file &&
-               chmod a-w .git/objects
+               chmod a-w .git/objects .git/objects/?? &&
                test_must_fail git add file
        )
        status=$?
-       chmod 775 .git/objects
+       chmod 775 .git/objects .git/objects/??
        (exit $status)
 
 '
index 6c78c8bc9b76828c258f524e73b40d7daff7c305..dc85e8b60a5c10e57047d1692e383f177e2c478d 100755 (executable)
@@ -17,6 +17,29 @@ test_expect_success 'shared = 0400 (faulty permission u-w)' '
        test $ret != "0"
 '
 
+for u in 002 022
+do
+       test_expect_success "shared=1 does not clear bits preset by umask $u" '
+               mkdir sub && (
+                       cd sub &&
+                       umask $u &&
+                       git init --shared=1 &&
+                       test 1 = "$(git config core.sharedrepository)"
+               ) &&
+               actual=$(ls -l sub/.git/HEAD)
+               case "$actual" in
+               -rw-rw-r--*)
+                       : happy
+                       ;;
+               *)
+                       echo Oops, .git/HEAD is not 0664 but $actual
+                       false
+                       ;;
+               esac
+       '
+       rm -rf sub
+done
+
 test_expect_success 'shared=all' '
        mkdir sub &&
        cd sub &&