-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regression: test 027: test refresh code
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
- Loading branch information
Showing
2 changed files
with
71 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
% setup_repo | ||
% guilt-refresh (no applied patches) | ||
No patches applied; try guilt-push first | ||
% list_files | ||
d .git/patches | ||
d .git/patches/master | ||
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode | ||
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add | ||
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove | ||
f bacb4aad8a55fe4e7aa58a9ae169990bb764069f .git/patches/master/series | ||
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify | ||
f da39a3ee5e6b4b0d3255bfef95601890afd80709 .git/patches/master/status | ||
% git-reset --hard HEAD | ||
HEAD is now at d485041... initial | ||
% guilt-push modify | ||
Applying patch..modify | ||
Patch applied. | ||
% guilt-refresh (applied patch) | ||
All patches popped. | ||
Applying patch..modify | ||
Patch applied. | ||
% list_files | ||
d .git/patches | ||
d .git/patches/master | ||
f 22930c6d1f1938f298a4fca51c57e4b47171db21 .git/patches/master/mode | ||
f 42d2613ecee1b642b2b8b7b7a9cef165bf456e48 .git/patches/master/modify | ||
f 5d8322e2edfca0589cc24df9c09985a544591a2c .git/patches/master/add | ||
f 8bdf2abdb045e63bb877890db12afcd5a2f023eb .git/patches/master/remove | ||
f bacb4aad8a55fe4e7aa58a9ae169990bb764069f .git/patches/master/series | ||
f bc9ab2e0f5db99d483961e956e814d963f0309f8 .git/patches/master/modify~ | ||
f de06c667ff8f99131cb05bf1ce42083449db78df .git/patches/master/status |
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,40 @@ | ||
#!/bin/bash | ||
# | ||
# Test the refresh code | ||
# | ||
|
||
source $REG_DIR/scaffold | ||
|
||
begin "setup_repo" | ||
setup_repo | ||
|
||
function fixup_time_info | ||
{ | ||
touch -d "$GIT_COMMITTER_DATE" ".git/patches/master/$1" | ||
} | ||
|
||
begin "guilt-refresh (no applied patches)" | ||
echo abcdef >> def | ||
shouldfail guilt-refresh 2>&1 | ||
|
||
begin "list_files" | ||
list_files | ||
|
||
begin "git-reset --hard HEAD" | ||
git-reset --hard HEAD | ||
|
||
begin "guilt-push modify" | ||
guilt-push modify 2>&1 | ||
|
||
begin "guilt-refresh (applied patch)" | ||
echo abcdef >> def | ||
guilt-refresh | ||
guilt-pop | ||
fixup_time_info modify | ||
guilt-push modify | ||
|
||
begin "list_files" | ||
list_files | ||
|
||
# FIXME: we should check that the patch actually contains what it should, | ||
# test arguments work the way they should |