diff --git a/regression/t-027.out b/regression/t-027.out new file mode 100644 index 0000000..e158fe0 --- /dev/null +++ b/regression/t-027.out @@ -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 diff --git a/regression/t-027.sh b/regression/t-027.sh new file mode 100755 index 0000000..4bdba51 --- /dev/null +++ b/regression/t-027.sh @@ -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