summaryrefslogtreecommitdiff
path: root/t/t3904-stash-patch.sh
AgeCommit message (Collapse)AuthorFilesLines
2011-04-07stash: ensure --no-keep-index and --patch can be used in any orderLibravatar Dan McGee1-1/+1
Don't assume one comes after the other on the command line. Use a three-state variable to track and check its value accordingly. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-04-07stash: add two more tests for --no-keep-indexLibravatar Dan McGee1-0/+12
One of these passes just fine; the other one exposes a problem where command line flag order matters for --no-keep-index and --patch interaction. Signed-off-by: Dan McGee <dpmcgee@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-08-18lib-patch-mode tests: change from skip_all=* to prereq skipLibravatar Ævar Arnfjörð Bjarmason1-5/+5
Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-08-15Implement 'git stash save --patch'Libravatar Thomas Rast1-0/+55
This adds a hunk-based mode to git-stash. You can select hunks from the difference between HEAD and worktree, and git-stash will build a stash that reflects these changes. The index state of the stash is the same as your current index, and we also let --patch imply --keep-index. Note that because the selected hunks are rolled back from the worktree but not the index, the resulting state may appear somewhat confusing if you had also staged these changes. This is not entirely satisfactory, but due to the way stashes are applied, other solutions would require a change to the stash format. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>