summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-02-26 16:42:35 -0800
committerJunio C Hamano <gitster@pobox.com>2012-02-26 16:42:35 -0800
commit4d06691eeca5712319a7e8cf2085d081dca9ea47 (patch)
tree961407cb13c26eeeea6aff0af9146e33eea3d75c
parent09ccbd34f4fe37a682a10b23d86f915b2a8a9c28 (diff)
parentc524ceb12f65e2ad4fc68c9d5b39f6e4b6b5c17b (diff)
downloadgit-4d06691eeca5712319a7e8cf2085d081dca9ea47.tar.gz
Sync with 1.7.8.5
-rw-r--r--Documentation/RelNotes/1.7.8.5.txt19
-rw-r--r--Makefile1
-rwxr-xr-xgit-am.sh2
-rw-r--r--git-rebase--merge.sh11
-rw-r--r--grep.c2
-rwxr-xr-xt/t4150-am.sh10
6 files changed, 39 insertions, 6 deletions
diff --git a/Documentation/RelNotes/1.7.8.5.txt b/Documentation/RelNotes/1.7.8.5.txt
new file mode 100644
index 0000000000..011fd2a428
--- /dev/null
+++ b/Documentation/RelNotes/1.7.8.5.txt
@@ -0,0 +1,19 @@
+Git v1.7.8.5 Release Notes
+==========================
+
+Fixes since v1.7.8.4
+--------------------
+
+ * Dependency on our thread-utils.h header file was missing for
+ objects that depend on it in the Makefile.
+
+ * "git am" when fed an empty file did not correctly finish reading it
+ when it attempts to guess the input format.
+
+ * "git grep -P" (when PCRE is enabled in the build) did not match the
+ beginning and the end of the line correctly with ^ and $.
+
+ * "git rebase -m" tried to run "git notes copy" needlessly when
+ nothing was rewritten.
+
+Also contains minor fixes and documentation updates.
diff --git a/Makefile b/Makefile
index 99a7a2b972..e4f8e0ef08 100644
--- a/Makefile
+++ b/Makefile
@@ -615,6 +615,7 @@ LIB_H += streaming.h
LIB_H += string-list.h
LIB_H += submodule.h
LIB_H += tag.h
+LIB_H += thread-utils.h
LIB_H += transport.h
LIB_H += tree.h
LIB_H += tree-walk.h
diff --git a/git-am.sh b/git-am.sh
index 1c13b13991..f43a75b04b 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -201,7 +201,7 @@ check_patch_format () {
l1=
while test -z "$l1"
do
- read l1
+ read l1 || break
done
read l2
read l3
diff --git a/git-rebase--merge.sh b/git-rebase--merge.sh
index 26afc75cc7..dc599077f0 100644
--- a/git-rebase--merge.sh
+++ b/git-rebase--merge.sh
@@ -90,10 +90,13 @@ call_merge () {
finish_rb_merge () {
move_to_original_branch
- git notes copy --for-rewrite=rebase < "$state_dir"/rewritten
- if test -x "$GIT_DIR"/hooks/post-rewrite &&
- test -s "$state_dir"/rewritten; then
- "$GIT_DIR"/hooks/post-rewrite rebase < "$state_dir"/rewritten
+ if test -s "$state_dir"/rewritten
+ then
+ git notes copy --for-rewrite=rebase <"$state_dir"/rewritten
+ if test -x "$GIT_DIR"/hooks/post-rewrite
+ then
+ "$GIT_DIR"/hooks/post-rewrite rebase <"$state_dir"/rewritten
+ fi
fi
rm -r "$state_dir"
say All done.
diff --git a/grep.c b/grep.c
index 3821400966..f492d267cc 100644
--- a/grep.c
+++ b/grep.c
@@ -79,7 +79,7 @@ static void compile_pcre_regexp(struct grep_pat *p, const struct grep_opt *opt)
{
const char *error;
int erroffset;
- int options = 0;
+ int options = PCRE_MULTILINE;
if (opt->ignore_case)
options |= PCRE_CASELESS;
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 7e6e59aefe..00d669a3c9 100755
--- a/t/t4150-am.sh
+++ b/t/t4150-am.sh
@@ -495,4 +495,14 @@ test_expect_success 'am -q is quiet' '
! test -s output.out
'
+test_expect_success 'am empty-file does not infloop' '
+ rm -fr .git/rebase-apply &&
+ git reset --hard &&
+ touch empty-file &&
+ test_tick &&
+ { git am empty-file > actual 2>&1 && false || :; } &&
+ echo Patch format detection failed. >expected &&
+ test_cmp expected actual
+'
+
test_done