From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH 4/5] New test: try "stg refresh" in a subdirectory
Date: Mon, 08 Oct 2007 01:25:00 +0200 [thread overview]
Message-ID: <20071007232500.13070.5063.stgit@yoghurt> (raw)
In-Reply-To: <20071007231949.13070.49517.stgit@yoghurt>
Currently, it doesn't work. Or rather, it does work for changes that
are already in the index, which is the case for newly added files; but
it doesn't work for changes that aren't in the index.
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
t/t2300-refresh-subdir.sh | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
create mode 100755 t/t2300-refresh-subdir.sh
diff --git a/t/t2300-refresh-subdir.sh b/t/t2300-refresh-subdir.sh
new file mode 100755
index 0000000..d1c7168
--- /dev/null
+++ b/t/t2300-refresh-subdir.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+test_description='Test the refresh command from a subdirectory'
+. ./test-lib.sh
+stg init
+
+test_expect_success 'Refresh from a subdirectory' '
+ stg new foo -m foo &&
+ echo foo >> foo.txt &&
+ mkdir bar &&
+ echo bar >> bar/bar.txt &&
+ stg add foo.txt bar/bar.txt &&
+ cd bar &&
+ stg refresh &&
+ cd .. &&
+ [ "$(stg status)" = "" ]
+'
+
+test_expect_failure 'Refresh again' '
+ echo foo2 >> foo.txt &&
+ echo bar2 >> bar/bar.txt &&
+ cd bar &&
+ stg refresh &&
+ cd .. &&
+ [ "$(stg status)" = "" ]
+'
+
+test_done
next prev parent reply other threads:[~2007-10-07 23:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-07 23:24 [StGit PATCH 0/5] Make push and refresh subdirectory safe Karl Hasselström
2007-10-07 23:24 ` [StGit PATCH 1/5] Infrastructure for current directory handling Karl Hasselström
2007-10-07 23:24 ` [StGit PATCH 2/5] New test: Try "stg push" in a subdirectory Karl Hasselström
2007-10-07 23:24 ` [StGit PATCH 3/5] Make "stg push" subdirectory safe Karl Hasselström
2007-10-07 23:25 ` Karl Hasselström [this message]
2007-10-07 23:25 ` [StGit PATCH 5/5] Make "stg refresh" " Karl Hasselström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071007232500.13070.5063.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).