From: Jacob Keller Date: Fri, 17 Jun 2022 00:20:36 GMT Subject: [PATCH v3 6/6] remote: add test for negative refspec with prune Message-ID: <20220617002036.1577-7-jacob.keller@gmail.com> In-Reply-To: <20220617002036.1577-1-jacob.keller@gmail.com> git remote prune does not handle negative refspecs properly. If a negative refspec got added after a fetch, a user may expect that the resulting refs that were previously fetched would now be considered stale, and thus removed by git remote prune. Show that this isn't the case with a new test case. Signed-off-by: Jacob Keller --- t/t5505-remote.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 8cad753023ef..0810e7d8d0b7 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -399,6 +399,19 @@ test_expect_success 'prune --dry-run' ' test_cmp expect output ' +cat >expect <output && + git -C test rev-parse refs/remotes/origin/side2 && + test_cmp expect output +' + test_expect_success 'add --mirror && prune' ' mkdir mirror && git -C mirror init --bare && -- 2.36.1