summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-12-02 23:34:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-12-02 23:34:44 (GMT)
commitbe38bee862d628e29043b3f680580ceb24a6ba1e (patch)
treed848f433968754e5e9d1e6231614ab8db7cf31dc
parentd2446dfd7f3b3f8948142cfb07a0270e2497d93f (diff)
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
downloadgit-be38bee862d628e29043b3f680580ceb24a6ba1e.zip
git-be38bee862d628e29043b3f680580ceb24a6ba1e.tar.gz
git-be38bee862d628e29043b3f680580ceb24a6ba1e.tar.bz2
Sync with 1.8.4.5
-rw-r--r--Documentation/RelNotes/1.8.4.5.txt13
-rw-r--r--Documentation/git.txt3
-rwxr-xr-xgit-submodule.sh20
-rwxr-xr-xt/t7406-submodule-update.sh15
4 files changed, 45 insertions, 6 deletions
diff --git a/Documentation/RelNotes/1.8.4.5.txt b/Documentation/RelNotes/1.8.4.5.txt
new file mode 100644
index 0000000..215bd1a
--- /dev/null
+++ b/Documentation/RelNotes/1.8.4.5.txt
@@ -0,0 +1,13 @@
+Git v1.8.4.5 Release Notes
+==========================
+
+Fixes since v1.8.4.4
+--------------------
+
+ * Recent update to remote-hg that attempted to make it work better
+ with non ASCII pathnames fed Unicode strings to the underlying Hg
+ API, which was wrong.
+
+ * "git submodule init" copied "submodule.$name.update" settings from
+ .gitmodules to .git/config without making sure if the suggested
+ value was sensible.
diff --git a/Documentation/git.txt b/Documentation/git.txt
index b73a24a..4545afb 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -48,9 +48,10 @@ Documentation for older releases are available here:
* release notes for
link:RelNotes/1.8.5.txt[1.8.5].
-* link:v1.8.4.4/git.html[documentation for release 1.8.4.4]
+* link:v1.8.4.5/git.html[documentation for release 1.8.4.5]
* release notes for
+ link:RelNotes/1.8.4.5.txt[1.8.4.5],
link:RelNotes/1.8.4.4.txt[1.8.4.4],
link:RelNotes/1.8.4.3.txt[1.8.4.3],
link:RelNotes/1.8.4.2.txt[1.8.4.2],
diff --git a/git-submodule.sh b/git-submodule.sh
index 896f1c9..66f5f75 100755
--- a/git-submodule.sh
+++ b/git-submodule.sh
@@ -612,11 +612,21 @@ cmd_init()
fi
# Copy "update" setting when it is not set yet
- upd="$(git config -f .gitmodules submodule."$name".update)"
- test -z "$upd" ||
- test -n "$(git config submodule."$name".update)" ||
- git config submodule."$name".update "$upd" ||
- die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")"
+ if upd="$(git config -f .gitmodules submodule."$name".update)" &&
+ test -n "$upd" &&
+ test -z "$(git config submodule."$name".update)"
+ then
+ case "$upd" in
+ rebase | merge | none)
+ ;; # known modes of updating
+ *)
+ echo >&2 "warning: unknown update mode '$upd' suggested for submodule '$name'"
+ upd=none
+ ;;
+ esac
+ git config submodule."$name".update "$upd" ||
+ die "$(eval_gettext "Failed to register update mode for submodule path '\$displaypath'")"
+ fi
done
}
diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
index f0b3305..0825a92 100755
--- a/t/t7406-submodule-update.sh
+++ b/t/t7406-submodule-update.sh
@@ -323,6 +323,21 @@ test_expect_success 'submodule update - command in .git/config catches failure'
)
'
+test_expect_success 'submodule init does not copy command into .git/config' '
+ (cd super &&
+ H=$(git ls-files -s submodule | cut -d" " -f2) &&
+ mkdir submodule1 &&
+ git update-index --add --cacheinfo 160000 $H submodule1 &&
+ git config -f .gitmodules submodule.submodule1.path submodule1 &&
+ git config -f .gitmodules submodule.submodule1.url ../submodule &&
+ git config -f .gitmodules submodule.submodule1.update !false &&
+ git submodule init submodule1 &&
+ echo "none" >expect &&
+ git config submodule.submodule1.update >actual &&
+ test_cmp expect actual
+ )
+'
+
test_expect_success 'submodule init picks up rebase' '
(cd super &&
git config -f .gitmodules submodule.rebasing.update rebase &&