diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-10-13 19:03:22 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-13 19:03:22 -0700 |
commit | 0941d6054524bc91f45bf3cbb1c641712b0e0e6d (patch) | |
tree | c2ff08811332fe9247ca57f124863d8289ba7844 /t | |
parent | dd57c76e84372bf16c6bdba9a1bd49da3e617339 (diff) | |
parent | 86a0a408b900eecc9d0d4a1eb8ae223181e96679 (diff) | |
download | git-0941d6054524bc91f45bf3cbb1c641712b0e0e6d.tar.gz |
Merge branch 'rs/pending'
* rs/pending:
commit: factor out clear_commit_marks_for_object_array
checkout: use leak_pending flag
bundle: use leak_pending flag
bisect: use leak_pending flag
revision: add leak_pending flag
checkout: use add_pending_{object,sha1} in orphan check
revision: factor out add_pending_sha1
checkout: check for "Previous HEAD" notice in t2020
Conflicts:
builtin/checkout.c
revision.c
Diffstat (limited to 't')
-rwxr-xr-x | t/t2020-checkout-detach.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t2020-checkout-detach.sh b/t/t2020-checkout-detach.sh index 2366f0f414..068fba4c8e 100755 --- a/t/t2020-checkout-detach.sh +++ b/t/t2020-checkout-detach.sh @@ -12,11 +12,14 @@ check_not_detached () { } ORPHAN_WARNING='you are leaving .* commit.*behind' +PREV_HEAD_DESC='Previous HEAD position was' check_orphan_warning() { - test_i18ngrep "$ORPHAN_WARNING" "$1" + test_i18ngrep "$ORPHAN_WARNING" "$1" && + test_i18ngrep ! "$PREV_HEAD_DESC" "$1" } check_no_orphan_warning() { - test_i18ngrep ! "$ORPHAN_WARNING" "$1" + test_i18ngrep ! "$ORPHAN_WARNING" "$1" && + test_i18ngrep "$PREV_HEAD_DESC" "$1" } reset () { |