summaryrefslogtreecommitdiff
path: root/t/t5533-push-cas.sh
AgeCommit message (Collapse)AuthorFilesLines
2016-08-04t5533: make it pass on case-sensitive filesystemsLibravatar Johannes Schindelin1-1/+1
The newly-added test case wants to commit a file "c.t" (note the lower case) when a previous test case already committed a file "C.t". This confuses Git to the point that it thinks "c.t" was not staged when "git add c.t" was called. Simply make the naming of the test commits consistent with the previous test cases: use upper-case, and advance in the alphabet. This came up in local work to rebase the Windows-specific patches to the current `next` branch. An identical fix was suggested by John Keeping. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-26push: allow pushing new branches with --force-with-leaseLibravatar John Keeping1-0/+12
If there is no upstream information for a branch, it is likely that it is newly created and can safely be pushed under the normal fast-forward rules. Relax the --force-with-lease check so that we do not reject these branches immediately but rather attempt to push them as new branches, using the null SHA-1 as the expected value. In fact, it is already possible to push new branches using the explicit --force-with-lease=<branch>:<expect> syntax, so all we do here is make this behaviour the default if no explicit "expect" value is specified. Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-07-26push: add shorthand for --force-with-lease branch creationLibravatar John Keeping1-0/+26
Allow the empty string to stand in for the null SHA-1 when pushing a new branch, like we do when deleting branches. This means that the following command ensures that `new-branch` is created on the remote (that is, is must not already exist): git push --force-with-lease=new-branch: origin new-branch Signed-off-by: John Keeping <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-02-01push: fix ref status reporting for --force-with-leaseLibravatar Andrew Wheeler1-5/+10
The --force--with-lease push option leads to less detailed status information than --force. In particular, the output indicates that a reference was fast-forwarded, even when it was force-updated. Modify the --force-with-lease ref status logic to leverage the --force ref status logic when the "lease" conditions are met. Also, enhance tests to validate output status reporting. Signed-off-by: Andrew Wheeler <awheeler@motorola.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20t: avoid using ":" for commentsLibravatar Jeff King1-1/+1
The ":" is not a comment marker, but rather a noop command. Using it as a comment like: : do something cmd1 && : something else cmd2 breaks the &&-chain, and we would fail to notice if "cmd1" failed in this instance. We can just use regular "#" comments instead. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-03-20t: fix trivial &&-chain breakageLibravatar Jeff King1-2/+2
These are tests which are missing a link in their &&-chain, but during a setup phase. We may fail to notice failure in commands that build the test environment, but these are typically not expected to fail at all (but it's still good to double-check that our test environment is what we expect). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-22t5533: test "push --force-with-lease"Libravatar Junio C Hamano1-0/+189
Prepare two repositories, src and dst, the latter of which is a clone of the former (with tracking branches), and push from the latter into the former, with various --force-with-lease options. Signed-off-by: Junio C Hamano <gitster@pobox.com>