Merge branch 'master' of git://github.com/git-l10n/git-po
authorJunio C Hamano <gitster@pobox.com>
Fri, 7 Dec 2012 18:32:22 +0000 (10:32 -0800)
committerJunio C Hamano <gitster@pobox.com>
Fri, 7 Dec 2012 18:32:22 +0000 (10:32 -0800)
* 'master' of git://github.com/git-l10n/git-po:
l10n: de.po: translate 22 new messages
l10n: de.po: translate 825 new messages
l10n: Update Swedish translation (1979t0f0u)
l10n: vi.po: update to git-v1.8.0.1-347-gf94c3
l10n: Update git.pot (5 new, 1 removed messages)

Documentation/RelNotes/1.8.1.txt
Documentation/config.txt
GIT-VERSION-GEN
remote.c
t/t4041-diff-submodule-option.sh
index 8f53af340340ce2297ace3ecee43539e80b9400a..c507b129bb753a3c916ef6c899c66421206fe032 100644 (file)
@@ -19,7 +19,7 @@ variable in this release.
 
 "git branch --set-upstream" is deprecated and may be removed in a
 relatively distant future.  "git branch [-u|--set-upstream-to]" has
-been introduced with a saner order of arguments.
+been introduced with a saner order of arguments to replace it.
 
 
 Updates since v1.8.0
@@ -50,7 +50,8 @@ UI, Workflows & Features
  * When "git checkout" checks out a branch, it tells the user how far
    behind (or ahead) the new branch is relative to the remote tracking
    branch it builds upon.  The message now also advises how to sync
-   them up by pushing or pulling.
+   them up by pushing or pulling.  This can be disabled with the
+   advice.statusHints configuration variable.
 
  * "git config --get" used to diagnose presence of multiple
    definitions of the same variable in the same configuration file as
@@ -69,17 +70,18 @@ UI, Workflows & Features
  * "git log --grep=<pcre>" learned to honor the "grep.patterntype"
    configuration set to "perl".
 
- * "git replace -d <object>" now interprets <object>, instead of only
-   accepting full hex object name.
+ * "git replace -d <object>" now interprets <object> as an extended
+   SHA-1 (e.g. HEAD~4 is allowed), instead of only accepting full hex
+   object name.
 
  * "git rm $submodule" used to punt on removing a submodule working
    tree to avoid losing the repository embedded in it.  Because
    recent git uses a mechanism to separate the submodule repository
    from the submodule working tree, "git rm" learned to detect this
-   case and removes the submodule working tree when it is safe.
+   case and removes the submodule working tree when it is safe to do so.
 
  * "git send-email" used to prompt for the sender address, even when
-   the committer identify is well specified (e.g. via user.name and
+   the committer identity is well specified (e.g. via user.name and
    user.email configuration variables).  The command no longer gives
    this prompt when not necessary.
 
@@ -103,7 +105,7 @@ UI, Workflows & Features
 
  * "git symbolic-ref" learned the "-d $symref" option to delete the
    named symbolic ref, which is more intuitive way to spell it than
-   "update-ref -d --no-deref".
+   "update-ref -d --no-deref $symref".
 
 
 Foreign Interface
@@ -119,10 +121,10 @@ Performance, Internal Implementation, etc.
 
  * Compilation on Cygwin with newer header files are supported now.
 
- * The logic to generate the initial advertisement from
-   "upload-pack" (what is invoked by "git fetch" on the other side
-   of the connection) to list what refs are available in the
-   repository has been optimized.
+ * The logic to generate the initial advertisement from "upload-pack"
+   (i.e. what is invoked by "git fetch" on the other side of the
+   connection) to list what refs are available in the repository has
+   been optimized.
 
  * The logic to find set of attributes that match a given path has
    been optimized.
index e70216dfe6c2deb35f5f90e2ca4d5b674ffb719a..bf8f911e1ffe7820a8e903ec669c690d39612150 100644 (file)
@@ -160,9 +160,10 @@ advice.*::
                it resulted in a non-fast-forward error.
        statusHints::
                Show directions on how to proceed from the current
-               state in the output of linkgit:git-status[1] and in
+               state in the output of linkgit:git-status[1], in
                the template shown when writing commit messages in
-               linkgit:git-commit[1].
+               linkgit:git-commit[1], and in the help message shown
+               by linkgit:git-checkout[1] when switching branch.
        commitBeforeMerge::
                Advice shown when linkgit:git-merge[1] refuses to
                merge to avoid overwriting local changes.
index d66e54f12d0ab564ed1944b2c6c264366045dfe5..76ffd4d4d6ad4f554fe1601e82f73865a4ced3d4 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.8.0.1
+DEF_VER=v1.8.1-rc0
 
 LF='
 '
index b6a768e2605038ff4c85a0a115b8571013cc7d05..6aa49c03df13245486b20b04315437811b260882 100644 (file)
--- a/remote.c
+++ b/remote.c
@@ -1633,8 +1633,9 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
                           "Your branch is ahead of '%s' by %d commits.\n",
                           num_ours),
                        base, num_ours);
-               strbuf_addf(sb,
-                       _("  (use \"git push\" to publish your local commits)\n"));
+               if (advice_status_hints)
+                       strbuf_addf(sb,
+                               _("  (use \"git push\" to publish your local commits)\n"));
        } else if (!num_ours) {
                strbuf_addf(sb,
                        Q_("Your branch is behind '%s' by %d commit, "
@@ -1643,8 +1644,9 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
                               "and can be fast-forwarded.\n",
                           num_theirs),
                        base, num_theirs);
-               strbuf_addf(sb,
-                       _("  (use \"git pull\" to update your local branch)\n"));
+               if (advice_status_hints)
+                       strbuf_addf(sb,
+                               _("  (use \"git pull\" to update your local branch)\n"));
        } else {
                strbuf_addf(sb,
                        Q_("Your branch and '%s' have diverged,\n"
@@ -1655,8 +1657,9 @@ int format_tracking_info(struct branch *branch, struct strbuf *sb)
                               "respectively.\n",
                           num_theirs),
                        base, num_ours, num_theirs);
-               strbuf_addf(sb,
-                       _("  (use \"git pull\" to merge the remote branch into yours)\n"));
+               if (advice_status_hints)
+                       strbuf_addf(sb,
+                               _("  (use \"git pull\" to merge the remote branch into yours)\n"));
        }
        return 1;
 }
index 57e8a9dacb789b5718e3345d1af90991b9f012c5..32d4a604250d55e9221a416638c8c8c4fdd6ff87 100755 (executable)
@@ -11,18 +11,18 @@ This test tries to verify the sanity of the --submodule option of git diff.
 . ./test-lib.sh
 
 add_file () {
-       sm=$1
-       shift
-       owd=$(pwd)
-       cd "$sm"
-       for name; do
-               echo "$name" > "$name" &&
-               git add "$name" &&
-               test_tick &&
-               git commit -m "Add $name"
-       done >/dev/null
-       git rev-parse --verify HEAD | cut -c1-7
-       cd "$owd"
+       (
+               cd "$1" &&
+               shift &&
+               for name
+               do
+                       echo "$name" >"$name" &&
+                       git add "$name" &&
+                       test_tick &&
+                       git commit -m "Add $name" || exit
+               done >/dev/null &&
+               git rev-parse --short --verify HEAD
+       )
 }
 commit_file () {
        test_tick &&
@@ -33,43 +33,43 @@ test_create_repo sm1 &&
 add_file . foo >/dev/null
 
 head1=$(add_file sm1 foo1 foo2)
-fullhead1=$(cd sm1; git rev-list --max-count=1 $head1)
+fullhead1=$(cd sm1; git rev-parse --verify HEAD)
 
-test_expect_success 'added submodule' "
+test_expect_success 'added submodule' '
        git add sm1 &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 0000000...$head1 (new submodule)
-EOF
+       Submodule sm1 0000000...$head1 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'added submodule, set diff.submodule' "
+test_expect_success 'added submodule, set diff.submodule' '
        git config diff.submodule log &&
        git add sm1 &&
        git diff --cached >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 0000000...$head1 (new submodule)
-EOF
+       Submodule sm1 0000000...$head1 (new submodule)
+       EOF
        git config --unset diff.submodule &&
        test_cmp expected actual
-"
+'
 
-test_expect_success '--submodule=short overrides diff.submodule' "
+test_expect_success '--submodule=short overrides diff.submodule' '
        test_config diff.submodule log &&
        git add sm1 &&
        git diff --submodule=short --cached >actual &&
        cat >expected <<-EOF &&
-diff --git a/sm1 b/sm1
-new file mode 160000
-index 0000000..a2c4dab
---- /dev/null
-+++ b/sm1
-@@ -0,0 +1 @@
-+Subproject commit $fullhead1
-EOF
+       diff --git a/sm1 b/sm1
+       new file mode 160000
+       index 0000000..$head1
+       --- /dev/null
+       +++ b/sm1
+       @@ -0,0 +1 @@
+       +Subproject commit $fullhead1
+       EOF
        test_cmp expected actual
-"
+'
 
 test_expect_success 'diff.submodule does not affect plumbing' '
        test_config diff.submodule log &&
@@ -77,7 +77,7 @@ test_expect_success 'diff.submodule does not affect plumbing' '
        cat >expected <<-EOF &&
        diff --git a/sm1 b/sm1
        new file mode 160000
-       index 0000000..a2c4dab
+       index 0000000..$head1
        --- /dev/null
        +++ b/sm1
        @@ -0,0 +1 @@
@@ -89,78 +89,77 @@ test_expect_success 'diff.submodule does not affect plumbing' '
 commit_file sm1 &&
 head2=$(add_file sm1 foo3)
 
-test_expect_success 'modified submodule(forward)' "
+test_expect_success 'modified submodule(forward)' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head1..$head2:
-  > Add foo3
-EOF
+       Submodule sm1 $head1..$head2:
+         > Add foo3
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule(forward)' "
+test_expect_success 'modified submodule(forward)' '
        git diff --submodule=log >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head1..$head2:
-  > Add foo3
-EOF
+       Submodule sm1 $head1..$head2:
+         > Add foo3
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule(forward) --submodule' "
+test_expect_success 'modified submodule(forward) --submodule' '
        git diff --submodule >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head1..$head2:
-  > Add foo3
-EOF
+       Submodule sm1 $head1..$head2:
+         > Add foo3
+       EOF
        test_cmp expected actual
-"
+'
 
-fullhead2=$(cd sm1; git rev-list --max-count=1 $head2)
-test_expect_success 'modified submodule(forward) --submodule=short' "
+fullhead2=$(cd sm1; git rev-parse --verify HEAD)
+test_expect_success 'modified submodule(forward) --submodule=short' '
        git diff --submodule=short >actual &&
        cat >expected <<-EOF &&
-diff --git a/sm1 b/sm1
-index $head1..$head2 160000
---- a/sm1
-+++ b/sm1
-@@ -1 +1 @@
--Subproject commit $fullhead1
-+Subproject commit $fullhead2
-EOF
+       diff --git a/sm1 b/sm1
+       index $head1..$head2 160000
+       --- a/sm1
+       +++ b/sm1
+       @@ -1 +1 @@
+       -Subproject commit $fullhead1
+       +Subproject commit $fullhead2
+       EOF
        test_cmp expected actual
-"
+'
 
 commit_file sm1 &&
 head3=$(
        cd sm1 &&
        git reset --hard HEAD~2 >/dev/null &&
-       git rev-parse --verify HEAD | cut -c1-7
+       git rev-parse --short --verify HEAD
 )
 
-test_expect_success 'modified submodule(backward)' "
+test_expect_success 'modified submodule(backward)' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head2..$head3 (rewind):
-  < Add foo3
-  < Add foo2
-EOF
+       Submodule sm1 $head2..$head3 (rewind):
+         < Add foo3
+         < Add foo2
+       EOF
        test_cmp expected actual
-"
+'
 
-head4=$(add_file sm1 foo4 foo5) &&
-head4_full=$(GIT_DIR=sm1/.git git rev-parse --verify HEAD)
-test_expect_success 'modified submodule(backward and forward)' "
+head4=$(add_file sm1 foo4 foo5)
+test_expect_success 'modified submodule(backward and forward)' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head2...$head4:
-  > Add foo5
-  > Add foo4
-  < Add foo3
-  < Add foo2
-EOF
+       Submodule sm1 $head2...$head4:
+         > Add foo5
+         > Add foo4
+         < Add foo3
+         < Add foo2
+       EOF
        test_cmp expected actual
-"
+'
 
 commit_file sm1 &&
 mv sm1 sm1-bak &&
@@ -170,319 +169,319 @@ git add sm1 &&
 rm -f sm1 &&
 mv sm1-bak sm1
 
-test_expect_success 'typechanged submodule(submodule->blob), --cached' "
+test_expect_success 'typechanged submodule(submodule->blob), --cached' '
        git diff --submodule=log --cached >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 41fbea9...0000000 (submodule deleted)
-diff --git a/sm1 b/sm1
-new file mode 100644
-index 0000000..9da5fb8
---- /dev/null
-+++ b/sm1
-@@ -0,0 +1 @@
-+sm1
-EOF
+       Submodule sm1 $head4...0000000 (submodule deleted)
+       diff --git a/sm1 b/sm1
+       new file mode 100644
+       index 0000000..$head5
+       --- /dev/null
+       +++ b/sm1
+       @@ -0,0 +1 @@
+       +sm1
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'typechanged submodule(submodule->blob)' "
+test_expect_success 'typechanged submodule(submodule->blob)' '
        git diff --submodule=log >actual &&
        cat >expected <<-EOF &&
-diff --git a/sm1 b/sm1
-deleted file mode 100644
-index 9da5fb8..0000000
---- a/sm1
-+++ /dev/null
-@@ -1 +0,0 @@
--sm1
-Submodule sm1 0000000...$head4 (new submodule)
-EOF
+       diff --git a/sm1 b/sm1
+       deleted file mode 100644
+       index $head5..0000000
+       --- a/sm1
+       +++ /dev/null
+       @@ -1 +0,0 @@
+       -sm1
+       Submodule sm1 0000000...$head4 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
 rm -rf sm1 &&
 git checkout-index sm1
-test_expect_success 'typechanged submodule(submodule->blob)' "
+test_expect_success 'typechanged submodule(submodule->blob)' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head4...0000000 (submodule deleted)
-diff --git a/sm1 b/sm1
-new file mode 100644
-index 0000000..$head5
---- /dev/null
-+++ b/sm1
-@@ -0,0 +1 @@
-+sm1
-EOF
+       Submodule sm1 $head4...0000000 (submodule deleted)
+       diff --git a/sm1 b/sm1
+       new file mode 100644
+       index 0000000..$head5
+       --- /dev/null
+       +++ b/sm1
+       @@ -0,0 +1 @@
+       +sm1
+       EOF
        test_cmp expected actual
-"
+'
 
 rm -f sm1 &&
 test_create_repo sm1 &&
 head6=$(add_file sm1 foo6 foo7)
-fullhead6=$(cd sm1; git rev-list --max-count=1 $head6)
-test_expect_success 'nonexistent commit' "
+fullhead6=$(cd sm1; git rev-parse --verify HEAD)
+test_expect_success 'nonexistent commit' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head4...$head6 (commits not present)
-EOF
+       Submodule sm1 $head4...$head6 (commits not present)
+       EOF
        test_cmp expected actual
-"
+'
 
 commit_file
-test_expect_success 'typechanged submodule(blob->submodule)' "
+test_expect_success 'typechanged submodule(blob->submodule)' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-diff --git a/sm1 b/sm1
-deleted file mode 100644
-index $head5..0000000
---- a/sm1
-+++ /dev/null
-@@ -1 +0,0 @@
--sm1
-Submodule sm1 0000000...$head6 (new submodule)
-EOF
+       diff --git a/sm1 b/sm1
+       deleted file mode 100644
+       index $head5..0000000
+       --- a/sm1
+       +++ /dev/null
+       @@ -1 +0,0 @@
+       -sm1
+       Submodule sm1 0000000...$head6 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
 commit_file sm1 &&
-test_expect_success 'submodule is up to date' "
+test_expect_success 'submodule is up to date' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-EOF
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'submodule contains untracked content' "
+test_expect_success 'submodule contains untracked content' '
        echo new > sm1/new-file &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains untracked content
-EOF
+       Submodule sm1 contains untracked content
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'submodule contains untracked content (untracked ignored)' "
+test_expect_success 'submodule contains untracked content (untracked ignored)' '
        git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'submodule contains untracked content (dirty ignored)' "
+test_expect_success 'submodule contains untracked content (dirty ignored)' '
        git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'submodule contains untracked content (all ignored)' "
+test_expect_success 'submodule contains untracked content (all ignored)' '
        git diff-index -p --ignore-submodules=all --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'submodule contains untracked and modifed content' "
+test_expect_success 'submodule contains untracked and modifed content' '
        echo new > sm1/foo6 &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains untracked content
-Submodule sm1 contains modified content
-EOF
+       Submodule sm1 contains untracked content
+       Submodule sm1 contains modified content
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'submodule contains untracked and modifed content (untracked ignored)' "
+test_expect_success 'submodule contains untracked and modifed content (untracked ignored)' '
        echo new > sm1/foo6 &&
        git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains modified content
-EOF
+       Submodule sm1 contains modified content
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'submodule contains untracked and modifed content (dirty ignored)' "
+test_expect_success 'submodule contains untracked and modifed content (dirty ignored)' '
        echo new > sm1/foo6 &&
        git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'submodule contains untracked and modifed content (all ignored)' "
+test_expect_success 'submodule contains untracked and modifed content (all ignored)' '
        echo new > sm1/foo6 &&
        git diff-index -p --ignore-submodules --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'submodule contains modifed content' "
+test_expect_success 'submodule contains modifed content' '
        rm -f sm1/new-file &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains modified content
-EOF
+       Submodule sm1 contains modified content
+       EOF
        test_cmp expected actual
-"
+'
 
 (cd sm1; git commit -mchange foo6 >/dev/null) &&
-head8=$(cd sm1; git rev-parse --verify HEAD | cut -c1-7) &&
-test_expect_success 'submodule is modified' "
+head8=$(cd sm1; git rev-parse --short --verify HEAD) &&
+test_expect_success 'submodule is modified' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked content' "
+test_expect_success 'modified submodule contains untracked content' '
        echo new > sm1/new-file &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains untracked content
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 contains untracked content
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked content (untracked ignored)' "
+test_expect_success 'modified submodule contains untracked content (untracked ignored)' '
        git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked content (dirty ignored)' "
+test_expect_success 'modified submodule contains untracked content (dirty ignored)' '
        git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked content (all ignored)' "
+test_expect_success 'modified submodule contains untracked content (all ignored)' '
        git diff-index -p --ignore-submodules=all --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked and modifed content' "
+test_expect_success 'modified submodule contains untracked and modifed content' '
        echo modification >> sm1/foo6 &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains untracked content
-Submodule sm1 contains modified content
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 contains untracked content
+       Submodule sm1 contains modified content
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked and modifed content (untracked ignored)' "
+test_expect_success 'modified submodule contains untracked and modifed content (untracked ignored)' '
        echo modification >> sm1/foo6 &&
        git diff-index -p --ignore-submodules=untracked --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains modified content
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 contains modified content
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked and modifed content (dirty ignored)' "
+test_expect_success 'modified submodule contains untracked and modifed content (dirty ignored)' '
        echo modification >> sm1/foo6 &&
        git diff-index -p --ignore-submodules=dirty --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'modified submodule contains untracked and modifed content (all ignored)' "
+test_expect_success 'modified submodule contains untracked and modifed content (all ignored)' '
        echo modification >> sm1/foo6 &&
        git diff-index -p --ignore-submodules --submodule=log HEAD >actual &&
        ! test -s actual
-"
+'
 
-test_expect_success 'modified submodule contains modifed content' "
+test_expect_success 'modified submodule contains modifed content' '
        rm -f sm1/new-file &&
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 contains modified content
-Submodule sm1 $head6..$head8:
-  > change
-EOF
+       Submodule sm1 contains modified content
+       Submodule sm1 $head6..$head8:
+         > change
+       EOF
        test_cmp expected actual
-"
+'
 
 rm -rf sm1
-test_expect_success 'deleted submodule' "
+test_expect_success 'deleted submodule' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6...0000000 (submodule deleted)
-EOF
+       Submodule sm1 $head6...0000000 (submodule deleted)
+       EOF
        test_cmp expected actual
-"
+'
 
 test_create_repo sm2 &&
 head7=$(add_file sm2 foo8 foo9) &&
 git add sm2
 
-test_expect_success 'multiple submodules' "
+test_expect_success 'multiple submodules' '
        git diff-index -p --submodule=log HEAD >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6...0000000 (submodule deleted)
-Submodule sm2 0000000...$head7 (new submodule)
-EOF
+       Submodule sm1 $head6...0000000 (submodule deleted)
+       Submodule sm2 0000000...$head7 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'path filter' "
+test_expect_success 'path filter' '
        git diff-index -p --submodule=log HEAD sm2 >actual &&
        cat >expected <<-EOF &&
-Submodule sm2 0000000...$head7 (new submodule)
-EOF
+       Submodule sm2 0000000...$head7 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
 commit_file sm2
-test_expect_success 'given commit' "
+test_expect_success 'given commit' '
        git diff-index -p --submodule=log HEAD^ >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6...0000000 (submodule deleted)
-Submodule sm2 0000000...$head7 (new submodule)
-EOF
+       Submodule sm1 $head6...0000000 (submodule deleted)
+       Submodule sm2 0000000...$head7 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
-test_expect_success 'given commit --submodule' "
+test_expect_success 'given commit --submodule' '
        git diff-index -p --submodule HEAD^ >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6...0000000 (submodule deleted)
-Submodule sm2 0000000...$head7 (new submodule)
-EOF
+       Submodule sm1 $head6...0000000 (submodule deleted)
+       Submodule sm2 0000000...$head7 (new submodule)
+       EOF
        test_cmp expected actual
-"
+'
 
-fullhead7=$(cd sm2; git rev-list --max-count=1 $head7)
+fullhead7=$(cd sm2; git rev-parse --verify HEAD)
 
-test_expect_success 'given commit --submodule=short' "
+test_expect_success 'given commit --submodule=short' '
        git diff-index -p --submodule=short HEAD^ >actual &&
        cat >expected <<-EOF &&
-diff --git a/sm1 b/sm1
-deleted file mode 160000
-index $head6..0000000
---- a/sm1
-+++ /dev/null
-@@ -1 +0,0 @@
--Subproject commit $fullhead6
-diff --git a/sm2 b/sm2
-new file mode 160000
-index 0000000..$head7
---- /dev/null
-+++ b/sm2
-@@ -0,0 +1 @@
-+Subproject commit $fullhead7
-EOF
-       test_cmp expected actual
-"
+       diff --git a/sm1 b/sm1
+       deleted file mode 160000
+       index $head6..0000000
+       --- a/sm1
+       +++ /dev/null
+       @@ -1 +0,0 @@
+       -Subproject commit $fullhead6
+       diff --git a/sm2 b/sm2
+       new file mode 160000
+       index 0000000..$head7
+       --- /dev/null
+       +++ b/sm2
+       @@ -0,0 +1 @@
+       +Subproject commit $fullhead7
+       EOF
+       test_cmp expected actual
+'
 
 test_expect_success 'setup .git file for sm2' '
        (cd sm2 &&
@@ -494,9 +493,9 @@ test_expect_success 'setup .git file for sm2' '
 test_expect_success 'diff --submodule with .git file' '
        git diff --submodule HEAD^ >actual &&
        cat >expected <<-EOF &&
-Submodule sm1 $head6...0000000 (submodule deleted)
-Submodule sm2 0000000...$head7 (new submodule)
-EOF
+       Submodule sm1 $head6...0000000 (submodule deleted)
+       Submodule sm2 0000000...$head7 (new submodule)
+       EOF
        test_cmp expected actual
 '