summaryrefslogtreecommitdiff
path: root/t/t7509-commit.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-05-11tests: fix tests broken under GETTEXT_POISON=YesPleaseLibravatar Ævar Arnfjörð Bjarmason1-2/+2
The GETTEXT_POISON=YesPlease compile-time testing option added in my bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly translator", 2011-02-22) has been slowly bitrotting as strings have been marked for translation, and new tests have been added without running it. I brought this up on the list ("[BUG] test suite broken with GETTEXT_POISON=YesPlease", [1]) asking whether this mode was useful at all anymore. At least one person occasionally uses it, and Lars Schneider offered to change one of the the Travis builds to run in this mode, so fix up the failing ones. My test setup runs most of the tests, with the notable exception of skipping all the p4 tests, so it's possible that there's still some lurking regressions I haven't fixed. 1. <CACBZZX62+acvi1dpkknadTL827mtCm_QesGSZ=6+UnyeMpg8+Q@mail.gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2015-07-28t/t7509: remove unnecessary manipulation of reflogLibravatar David Turner1-13/+0
Remove unnecessary reflog manipulation. The test does not rely in any way on this reflog manipulation, and the case that the test exercises is unrelated to reflogs. Signed-off-by: David Turner <dturner@twopensource.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-30commit --amend: test specifies authorship but forgets to checkLibravatar Fabian Ruch1-0/+1
The test case "--amend option copies authorship" specifies that the git-commit option `--amend` uses the authorship of the replaced commit for the new commit. Add the omitted check that this property actually holds. Signed-off-by: Fabian Ruch <bafain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-02-21Teach commit about CHERRY_PICK_HEADLibravatar Jay Soffian1-0/+29
Previously the user was advised to use commit -c CHERRY_PICK_HEAD after a conflicting cherry-pick. While this would preserve the original commit's authorship, it would sadly discard cherry-pick's carefully crafted MERGE_MSG (which contains the list of conflicts as well as the original commit-id in the case of cherry-pick -x). On the other hand, if a bare 'commit' were performed, it would preserve the MERGE_MSG while resetting the authorship. In other words, there was no way to simultaneously take the authorship from CHERRY_PICK_HEAD and the commit message from MERGE_MSG. This change fixes that situation. A bare 'commit' will now take the authorship from CHERRY_PICK_HEAD and the commit message from MERGE_MSG. If the user wishes to reset authorship, that must now be done explicitly via --reset-author. A side-benefit of passing commit authorship along this way is that we can eliminate redundant authorship parsing code from revert.c. (Also removed an unused include from revert.c) Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-09tests: add missing &&Libravatar Jonathan Nieder1-1/+1
Breaks in a test assertion's && chain can potentially hide failures from earlier commands in the chain. Commands intended to fail should be marked with !, test_must_fail, or test_might_fail. The examples in this patch do not require that. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-20Convert "! git" to "test_must_fail git"Libravatar Jared Hance1-2/+2
test_must_fail will account for segfaults in git, so it should be used instead of "! git" This patch does not change any of the commands that use pipes. Signed-off-by: Jared Hance <jaredhance@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-04commit --amend: cope with missing display nameLibravatar Jonathan Nieder1-0/+46
Though I have not seen this in the wild, it has been said that there are likely to be git repositories converted from other version control systems with an invalid ident line like this one: author <user@example.com> 18746342 +0000 Because there is no space between the (empty) user name and the email address, commit --amend chokes. When searching for a space-left-bracket sequence on the ident line, it finds it in the committer line, ending up utterly confused. Better for commit --amend to treat this like a valid ident line with empty username and complain. The tests remove the questionable commit objects after use so there is no chance for them to confuse later tests. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-11-04commit -c/-C/--amend: reset timestamp and authorship to committer with ↵Libravatar Erick Mattos1-0/+114
--reset-author When we use -c, -C, or --amend, we are trying one of two things: using the source as a template or modifying a commit with corrections. When these options are used, the authorship and timestamp recorded in the newly created commit are always taken from the original commit. This is inconvenient when we just want to borrow the commit log message or when our change to the code is so significant that we should take over the authorship (with the blame for bugs we introduce, of course). The new --reset-author option is meant to solve this need by regenerating the timestamp and setting the committer as the new author. Signed-off-by: Erick Mattos <erick.mattos@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>