summaryrefslogtreecommitdiff
path: root/t/t5406-remote-rejects.sh
AgeCommit message (Collapse)AuthorFilesLines
2018-07-03t5406: use write_script() instead of birthing shell script manuallyLibravatar Eric Sunshine1-2/+3
Take advantage of write_script() to abstract-away details of shell script creation, thus allowing the reader to focus on script content. Readability benefits, particularly in this case, since the script body was buried in a noisy one-liner subshell responsible for emitting boilerplate and body. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13t/: Use "test_must_fail git" instead of "! git"Libravatar Stephan Beyer1-1/+1
This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-17send-pack: assign remote errors to each refLibravatar Jeff King1-0/+24
This lets us show remote errors (e.g., a denied hook) along with the usual push output. There is a slightly clever optimization in receive_status that bears explanation. We need to correlate the returned status and our ref objects, which naively could be an O(m*n) operation. However, since the current implementation of receive-pack returns the errors to us in the same order that we sent them, we optimistically look for the next ref to be looked up to come after the last one we have found. So it should be an O(m+n) merge if the receive-pack behavior holds, but we fall back to a correct but slower behavior if it should change. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>