Merge branch 'tz/notes-error-to-stderr' into maint
"git notes" sent its error message to its standard output stream, which was corrected. * tz/notes-error-to-stderr: notes: send "Automatic notes merge failed" messages to stderr
This commit is contained in:
commit
0cfcb1695f
@ -865,9 +865,9 @@ static int merge(int argc, const char **argv, const char *prefix)
|
|||||||
if (create_symref("NOTES_MERGE_REF", default_notes_ref(), NULL))
|
if (create_symref("NOTES_MERGE_REF", default_notes_ref(), NULL))
|
||||||
die(_("failed to store link to current notes ref (%s)"),
|
die(_("failed to store link to current notes ref (%s)"),
|
||||||
default_notes_ref());
|
default_notes_ref());
|
||||||
printf(_("Automatic notes merge failed. Fix conflicts in %s and "
|
fprintf(stderr, _("Automatic notes merge failed. Fix conflicts in %s "
|
||||||
"commit the result with 'git notes merge --commit', or "
|
"and commit the result with 'git notes merge --commit', "
|
||||||
"abort the merge with 'git notes merge --abort'.\n"),
|
"or abort the merge with 'git notes merge --abort'.\n"),
|
||||||
git_path(NOTES_MERGE_WORKTREE));
|
git_path(NOTES_MERGE_WORKTREE));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ git rev-parse refs/notes/z > pre_merge_z
|
|||||||
test_expect_success 'merge z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
test_expect_success 'merge z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
||||||
git update-ref refs/notes/m refs/notes/y &&
|
git update-ref refs/notes/m refs/notes/y &&
|
||||||
git config core.notesRef refs/notes/m &&
|
git config core.notesRef refs/notes/m &&
|
||||||
test_must_fail git notes merge z >output &&
|
test_must_fail git notes merge z >output 2>&1 &&
|
||||||
# Output should point to where to resolve conflicts
|
# Output should point to where to resolve conflicts
|
||||||
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
||||||
# Inspect merge conflicts
|
# Inspect merge conflicts
|
||||||
@ -379,7 +379,7 @@ git rev-parse refs/notes/z > pre_merge_z
|
|||||||
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
||||||
git update-ref refs/notes/m refs/notes/y &&
|
git update-ref refs/notes/m refs/notes/y &&
|
||||||
git config core.notesRef refs/notes/m &&
|
git config core.notesRef refs/notes/m &&
|
||||||
test_must_fail git notes merge z >output &&
|
test_must_fail git notes merge z >output 2>&1 &&
|
||||||
# Output should point to where to resolve conflicts
|
# Output should point to where to resolve conflicts
|
||||||
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
||||||
# Inspect merge conflicts
|
# Inspect merge conflicts
|
||||||
@ -413,7 +413,7 @@ git rev-parse refs/notes/y > pre_merge_y
|
|||||||
git rev-parse refs/notes/z > pre_merge_z
|
git rev-parse refs/notes/z > pre_merge_z
|
||||||
|
|
||||||
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
||||||
test_must_fail git notes merge z >output &&
|
test_must_fail git notes merge z >output 2>&1 &&
|
||||||
# Output should point to where to resolve conflicts
|
# Output should point to where to resolve conflicts
|
||||||
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
||||||
# Inspect merge conflicts
|
# Inspect merge conflicts
|
||||||
@ -494,7 +494,7 @@ cp expect_log_y expect_log_m
|
|||||||
|
|
||||||
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
test_expect_success 'redo merge of z into m (== y) with default ("manual") resolver => Conflicting 3-way merge' '
|
||||||
git update-ref refs/notes/m refs/notes/y &&
|
git update-ref refs/notes/m refs/notes/y &&
|
||||||
test_must_fail git notes merge z >output &&
|
test_must_fail git notes merge z >output 2>&1 &&
|
||||||
# Output should point to where to resolve conflicts
|
# Output should point to where to resolve conflicts
|
||||||
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
test_i18ngrep "\\.git/NOTES_MERGE_WORKTREE" output &&
|
||||||
# Inspect merge conflicts
|
# Inspect merge conflicts
|
||||||
|
@ -61,7 +61,7 @@ test_expect_success 'merge z into x while mid-merge on y succeeds' '
|
|||||||
(
|
(
|
||||||
cd worktree2 &&
|
cd worktree2 &&
|
||||||
git config core.notesRef refs/notes/x &&
|
git config core.notesRef refs/notes/x &&
|
||||||
test_must_fail git notes merge z 2>&1 >out &&
|
test_must_fail git notes merge z >out 2>&1 &&
|
||||||
test_i18ngrep "Automatic notes merge failed" out &&
|
test_i18ngrep "Automatic notes merge failed" out &&
|
||||||
grep -v "A notes merge into refs/notes/x is already in-progress in" out
|
grep -v "A notes merge into refs/notes/x is already in-progress in" out
|
||||||
) &&
|
) &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user