From bdcaa325b47fcacfecb781a28801aafc249ba288 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Tue, 20 Jul 2010 19:01:01 -0500 Subject: [PATCH 1/4] t/README: correct an exception when breaking a && chain in tests The correct advice should have been taken from c289c31 (t/t7006: ignore return status of shell's unset builtin, 2010-06-02). A real-life issue we experienced was with "unset", not with "export" (exporting an unset variable may have similar portability issues, though). Signed-off-by: Junio C Hamano --- t/README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/README b/t/README index a590142438..0d1183c3e6 100644 --- a/t/README +++ b/t/README @@ -259,11 +259,11 @@ Do: test ... That way all of the commands in your tests will succeed or fail. If - you must ignore the return value of something (e.g. the return - value of export is unportable) it's best to indicate so explicitly - with a semicolon: + you must ignore the return value of something (e.g., the return + after unsetting a variable that was already unset is unportable) it's + best to indicate so explicitly with a semicolon: - export HLAGH; + unset HLAGH; git merge hla && git push gh && test ... From b1edaf669d483e983f1849ce804baa178387e9a9 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Tue, 20 Jul 2010 16:55:31 -0500 Subject: [PATCH 2/4] t/: work around one-shot variable assignment with test_must_fail See e2007832552ccea9befed9003580c494f09e666e Signed-off-by: Junio C Hamano --- t/t2017-checkout-orphan.sh | 36 ++++++++++++++++++++++++++++++------ t/t3200-branch.sh | 6 +++++- t/t3301-notes.sh | 6 +++++- 3 files changed, 40 insertions(+), 8 deletions(-) diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh index be88d4b5ee..81cb393a95 100755 --- a/t/t2017-checkout-orphan.sh +++ b/t/t2017-checkout-orphan.sh @@ -69,7 +69,11 @@ test_expect_success '--orphan makes reflog by default' ' git config --unset core.logAllRefUpdates && git checkout --orphan delta && ! test -f .git/logs/refs/heads/delta && - test_must_fail PAGER= git reflog show delta && + ( + PAGER= && + export PAGER && + test_must_fail git reflog show delta + ) && git commit -m Delta && test -f .git/logs/refs/heads/delta && PAGER= git reflog show delta @@ -80,17 +84,29 @@ test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = git config core.logAllRefUpdates false && git checkout --orphan epsilon && ! test -f .git/logs/refs/heads/epsilon && - test_must_fail PAGER= git reflog show epsilon && + ( + PAGER= && + export PAGER && + test_must_fail git reflog show epsilon + ) && git commit -m Epsilon && ! test -f .git/logs/refs/heads/epsilon && - test_must_fail PAGER= git reflog show epsilon + ( + PAGER= && + export PAGER && + test_must_fail git reflog show epsilon + ) ' test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' ' git checkout master && git checkout -l --orphan zeta && test -f .git/logs/refs/heads/zeta && - test_must_fail PAGER= git reflog show zeta && + ( + PAGER= && + export PAGER && + test_must_fail git reflog show zeta + ) && git commit -m Zeta && PAGER= git reflog show zeta ' @@ -99,10 +115,18 @@ test_expect_success 'giving up --orphan not committed when -l and core.logAllRef git checkout master && git checkout -l --orphan eta && test -f .git/logs/refs/heads/eta && - test_must_fail PAGER= git reflog show eta && + ( + PAGER= && + export PAGER && + test_must_fail git reflog show eta + ) && git checkout master && ! test -f .git/logs/refs/heads/eta && - test_must_fail PAGER= git reflog show eta + ( + PAGER= && + export PAGER && + test_must_fail git reflog show eta + ) ' test_expect_success '--orphan is rejected with an existing name' ' diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 859b99abf1..bf7747dc33 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -237,7 +237,11 @@ test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates git config core.logAllRefUpdates false && git checkout -b beta && ! test -f .git/logs/refs/heads/beta && - test_must_fail PAGER= git reflog show beta + ( + PAGER= && + export PAGER && + test_must_fail git reflog show beta + ) ' test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' ' diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index 2d67a40fc1..1d82f79ee0 100755 --- a/t/t3301-notes.sh +++ b/t/t3301-notes.sh @@ -693,7 +693,11 @@ test_expect_success 'create note from non-existing note with "git notes add -c" git add a10 && test_tick && git commit -m 10th && - test_must_fail MSG="yet another note" git notes add -c deadbeef && + ( + MSG="yet another note" && + export MSG && + test_must_fail git notes add -c deadbeef + ) && test_must_fail git notes list HEAD ' From 6e6842e36f8c6c12ae0ddd7db98cd900b25bb8dc Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 21 Jul 2010 12:47:48 -0700 Subject: [PATCH 3/4] tests: correct "does reflog exist?" tests These two tests weren't about how "git reflog show " exits when there is no reflog, but were about "checkout" and "branch" create or not create reflog when creating a new . Update the tests to check what we are interested in, using "git rev-parse --verify". Also lose tests based on "test -f .git/logs/refs/heads/" from nearby, to avoid exposing this particular implementation detail unnecessarily. Signed-off-by: Junio C Hamano --- t/t2017-checkout-orphan.sh | 47 +++++++------------------------------- t/t3200-branch.sh | 13 +++-------- 2 files changed, 11 insertions(+), 49 deletions(-) diff --git a/t/t2017-checkout-orphan.sh b/t/t2017-checkout-orphan.sh index 81cb393a95..2d2f63f22e 100755 --- a/t/t2017-checkout-orphan.sh +++ b/t/t2017-checkout-orphan.sh @@ -68,65 +68,34 @@ test_expect_success '--orphan makes reflog by default' ' git checkout master && git config --unset core.logAllRefUpdates && git checkout --orphan delta && - ! test -f .git/logs/refs/heads/delta && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show delta - ) && + test_must_fail git rev-parse --verify delta@{0} && git commit -m Delta && - test -f .git/logs/refs/heads/delta && - PAGER= git reflog show delta + git rev-parse --verify delta@{0} ' test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' ' git checkout master && git config core.logAllRefUpdates false && git checkout --orphan epsilon && - ! test -f .git/logs/refs/heads/epsilon && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show epsilon - ) && + test_must_fail git rev-parse --verify epsilon@{0} && git commit -m Epsilon && - ! test -f .git/logs/refs/heads/epsilon && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show epsilon - ) + test_must_fail git rev-parse --verify epsilon@{0} ' test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' ' git checkout master && git checkout -l --orphan zeta && - test -f .git/logs/refs/heads/zeta && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show zeta - ) && + test_must_fail git rev-parse --verify zeta@{0} && git commit -m Zeta && - PAGER= git reflog show zeta + git rev-parse --verify zeta@{0} ' test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' ' git checkout master && git checkout -l --orphan eta && - test -f .git/logs/refs/heads/eta && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show eta - ) && + test_must_fail git rev-parse --verify eta@{0} && git checkout master && - ! test -f .git/logs/refs/heads/eta && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show eta - ) + test_must_fail git rev-parse --verify eta@{0} ' test_expect_success '--orphan is rejected with an existing name' ' diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index bf7747dc33..f54a533456 100755 --- a/t/t3200-branch.sh +++ b/t/t3200-branch.sh @@ -228,28 +228,21 @@ test_expect_success 'checkout -b makes reflog by default' ' git checkout master && git config --unset core.logAllRefUpdates && git checkout -b alpha && - test -f .git/logs/refs/heads/alpha && - PAGER= git reflog show alpha + git rev-parse --verify alpha@{0} ' test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' ' git checkout master && git config core.logAllRefUpdates false && git checkout -b beta && - ! test -f .git/logs/refs/heads/beta && - ( - PAGER= && - export PAGER && - test_must_fail git reflog show beta - ) + test_must_fail git rev-parse --verify beta@{0} ' test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' ' git checkout master && git checkout -lb gamma && git config --unset core.logAllRefUpdates && - test -f .git/logs/refs/heads/gamma && - PAGER= git reflog show gamma + git rev-parse --verify gamma@{0} ' test_expect_success 'avoid ambiguous track' ' From 64fdc08dac6694d1e754580e7acb82dfa4988bb9 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 21 Jul 2010 12:55:50 -0700 Subject: [PATCH 4/4] Git 1.7.2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes-1.7.2.txt | 12 ++++-------- Documentation/git.txt | 5 +++++ GIT-VERSION-GEN | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Documentation/RelNotes-1.7.2.txt b/Documentation/RelNotes-1.7.2.txt index f24b3876af..15cf01178c 100644 --- a/Documentation/RelNotes-1.7.2.txt +++ b/Documentation/RelNotes-1.7.2.txt @@ -1,5 +1,5 @@ -Git v1.7.2 Release Notes (draft) -================================ +Git v1.7.2 Release Notes +======================== Updates since v1.7.1 -------------------- @@ -123,6 +123,8 @@ Updates since v1.7.1 * The test harness has been updated to produce TAP-friendly output. + * Many documentation improvement patches are also included. + Fixes since v1.7.1 ------------------ @@ -147,9 +149,3 @@ release, unless otherwise noted. * "git read-tree -m A B" used to switch to branch B while retaining local changes added an incorrect cache-tree information (b1f47514). - --- -exec >/var/tmp/1 -O=v1.7.2-rc2-17-gc9a9766 -echo O=$(git describe HEAD) -git shortlog --no-merges HEAD ^maint ^$O diff --git a/Documentation/git.txt b/Documentation/git.txt index 12066ab3fc..27ece58857 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -44,6 +44,11 @@ unreleased) version of git, that is available from 'master' branch of the `git.git` repository. Documentation for older releases are available here: +* link:v1.7.2/git.html[documentation for release 1.7.2] + +* release notes for + link:RelNotes-1.7.2.txt[1.7.2]. + * link:v1.7.1.1/git.html[documentation for release 1.7.1.1] * release notes for diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index e45513dee9..e88f50cafb 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.1.GIT +DEF_VER=v1.7.2 LF=' '