diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-11-20 10:38:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-20 10:38:32 -0800 |
commit | 3a2c08238326a219ce9d7e53d95e382ed3fb8b7c (patch) | |
tree | 43059b26f7ba14a7493bdefc37894a47bb9c5aaa /t | |
parent | Merge branch 'jk/maint-gitweb-xss' (diff) | |
parent | replace: parse revision argument for -d (diff) | |
download | tgif-3a2c08238326a219ce9d7e53d95e382ed3fb8b7c.tar.xz |
Merge branch 'mg/replace-resolve-delete'
Be more user friendly to people using "git replace -d".
* mg/replace-resolve-delete:
replace: parse revision argument for -d
Diffstat (limited to 't')
-rwxr-xr-x | t/t6050-replace.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 5c87f28e4e..decdc33c52 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -140,6 +140,17 @@ test_expect_success '"git replace" replacing' ' test "$HASH2" = "$(git replace)" ' +test_expect_success '"git replace" resolves sha1' ' + SHORTHASH2=$(git rev-parse --short=8 $HASH2) && + git replace -d $SHORTHASH2 && + git replace $SHORTHASH2 $R && + git show $HASH2 | grep "O Thor" && + test_must_fail git replace $HASH2 $R && + git replace -f $HASH2 $R && + test_must_fail git replace -f && + test "$HASH2" = "$(git replace)" +' + # This creates a side branch where the bug in H2 # does not appear because P2 is created by applying # H2 and squashing H5 into it. |