Subject: ./t3310-notes-merge-manual-resolve.sh broken on pu under Mac OS ?

From: Torsten Bögershausen <[email-masked]>
Date: Wed, 30 Dec 2015 14:20:04 +0100

I got 2 failures on pu under Mac OS, (Linux is OK)
I did some very basic debugging, it seems as if grep doesn't find
a needed string.
Does anybody have an idea here ?

--------------------
Failure 1:
Add some debug code:
git diff

-       grep -q refs/notes/z merge_commit_msg &&
+       echo >&2 before grep &&
+       echo >&2 before cat &&
+       cat >&2 merge_commit_msg &&
+       echo >&2 after cat &&
+       grep  refs/notes/z merge_commit_msg >&2 &&
        # Merge commit mentions conflicting notes
+       echo >&2 after grep &&

------ run the test:
debug=t verbose=t   ./t3310-notes-merge-manual-resolve.sh 2>&1 | less
-------- get this output:
before grep
before cat
Merged notes from z into refs/notes/m

Conflicts:
        04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
        0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
        7a4ca6ee52a974a66cbaa78e33214535dff1d691
        d07d62e5208f22eb5695e7eb47667dc8b9860290

after cat
not ok 13 - finalize conflicting merge (z => m)

-----------------------
Failure 2:
index d557212..92fabf0 100755
--- a/t/t3310-notes-merge-manual-resolve.sh
+++ b/t/t3310-notes-merge-manual-resolve.sh
@@ -472,6 +472,9 @@ EOF
        test "$(git rev-parse refs/notes/m^2)" = "$(cat pre_merge_z)" &&
        # Merge commit mentions the notes refs merged
        git log -1 --format=%B refs/notes/m > merge_commit_msg &&
+       echo >&2 before cat &&
+       cat merge_commit_msg >&2 &&
+       echo >&2 after cat &&

not ok 17 - add + remove notes in finalized merge (z => m)
---------- gives this:
before cat
Merged notes from z into refs/notes/m

Conflicts:
        04ed9a0bbe0285f41c913e2002cb09ef8449d4a6
        0f7aa3ec6325aeb88b910453bb3eb37c49d75c11
        7a4ca6ee52a974a66cbaa78e33214535dff1d691
        d07d62e5208f22eb5695e7eb47667dc8b9860290

after cat