git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org, Jon Smirl <jonsmirl@gmail.com>
Subject: [StGit PATCH 1/2] Test "stg status" with renames
Date: Tue, 08 Jul 2008 21:54:25 +0200	[thread overview]
Message-ID: <20080708195425.24866.58362.stgit@yoghurt> (raw)
In-Reply-To: <20080708195214.24866.61663.stgit@yoghurt>

Currently, it only works if -M is not passed to git diff-files, so the
second of the two tests fails.

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 t/t0002-status.sh |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)


diff --git a/t/t0002-status.sh b/t/t0002-status.sh
index 43e1ca0..69c29a0 100755
--- a/t/t0002-status.sh
+++ b/t/t0002-status.sh
@@ -171,4 +171,20 @@ test_expect_success 'Status of disappeared newborn' '
     diff -u expected.txt output.txt
 '
 
+cat > expected.txt <<EOF
+A fay
+D fie
+EOF
+test_expect_success 'Status after renaming a file' '
+    git rm foo/bar &&
+    git mv fie fay &&
+    stg status > output.txt &&
+    diff -u expected.txt output.txt
+'
+
+test_expect_failure 'Status after renaming a file (with rename detection)' '
+    stg status --diff-opts=-M > output.txt &&
+    diff -u expected.txt output.txt
+'
+
 test_done

  reply	other threads:[~2008-07-08 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07 15:10 stgit error on status command Jon Smirl
2008-07-08  7:02 ` Karl Hasselström
2008-07-08 12:06   ` Jon Smirl
2008-07-08 12:25     ` Karl Hasselström
2008-07-08 19:54       ` [StGit PATCH 0/2] stg status rename fix (stable) Karl Hasselström
2008-07-08 19:54         ` Karl Hasselström [this message]
2008-07-08 19:54         ` [StGit PATCH 2/2] Don't allow extra diff options with "stg status" Karl Hasselström
2008-07-09  4:05         ` [StGit PATCH 0/2] stg status rename fix (stable) Karl Hasselström
2008-07-08 19:57       ` [StGit PATCH] stg status rename fix (safe+experimental) Karl Hasselström
2008-07-08 19:57         ` [StGit PATCH] Test "stg status" with -M in stgit.diff-opts 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=20080708195425.24866.58362.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jonsmirl@gmail.com \
    /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).