-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* jc/am: am: --rebasing am: remove support for -d .dotest am: read from the right mailbox when started from a subdirectory
- Loading branch information
Showing
5 changed files
with
118 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/sh | ||
|
||
test_description='git am running from a subdirectory' | ||
|
||
. ./test-lib.sh | ||
|
||
test_expect_success setup ' | ||
echo hello >world && | ||
git add world && | ||
test_tick && | ||
git commit -m initial && | ||
git tag initial && | ||
echo goodbye >world && | ||
git add world && | ||
test_tick && | ||
git commit -m second && | ||
git format-patch --stdout HEAD^ >patchfile && | ||
: >expect | ||
' | ||
|
||
test_expect_success 'am regularly from stdin' ' | ||
git checkout initial && | ||
git am <patchfile && | ||
git diff master >actual && | ||
diff -u expect actual | ||
' | ||
|
||
test_expect_success 'am regularly from file' ' | ||
git checkout initial && | ||
git am patchfile && | ||
git diff master >actual && | ||
diff -u expect actual | ||
' | ||
|
||
test_expect_success 'am regularly from stdin in subdirectory' ' | ||
rm -fr subdir && | ||
git checkout initial && | ||
( | ||
mkdir -p subdir && | ||
cd subdir && | ||
git am <../patchfile | ||
) && | ||
git diff master>actual && | ||
diff -u expect actual | ||
' | ||
|
||
test_expect_success 'am regularly from file in subdirectory' ' | ||
rm -fr subdir && | ||
git checkout initial && | ||
( | ||
mkdir -p subdir && | ||
cd subdir && | ||
git am ../patchfile | ||
) && | ||
git diff master >actual && | ||
diff -u expect actual | ||
' | ||
|
||
test_expect_success 'am regularly from file in subdirectory with full path' ' | ||
rm -fr subdir && | ||
git checkout initial && | ||
P=$(pwd) && | ||
( | ||
mkdir -p subdir && | ||
cd subdir && | ||
git am "$P/patchfile" | ||
) && | ||
git diff master >actual && | ||
diff -u expect actual | ||
' | ||
|
||
test_done |