git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH 2/3] [BUG] Add a testcase for "git mv -f" on untracked files.
Date: Wed,  4 Feb 2009 10:32:07 +0100	[thread overview]
Message-ID: <1233739928-19895-2-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1233739928-19895-1-git-send-email-Matthieu.Moy@imag.fr>

This currently fails with:
git: builtin-mv.c:217: cmd_mv: Assertion `pos >= 0' failed.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
 t/t7001-mv.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh
index e4dfe95..52a47b5 100755
--- a/t/t7001-mv.sh
+++ b/t/t7001-mv.sh
@@ -58,6 +58,14 @@ test_expect_success \
      test ! -f path0/untracked1 &&
      test ! -f path0/untracked2'
 
+test_expect_failure \
+    'checking -f on untracked file with existing target' \
+    'touch path0/untracked1 &&
+     git mv -f untracked1 path0
+     test ! -f .git/index.lock &&
+     test -f untracked1 &&
+     test -f path0/untracked1'
+
 # clean up the mess in case bad things happen
 rm -f idontexist untracked1 untracked2 \
      path0/idontexist path0/untracked1 path0/untracked2 \
-- 
1.6.1.2.321.g68da9

  reply	other threads:[~2009-02-04  9:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  9:32 [PATCH 1/3] Missing && in t/t7001.sh Matthieu Moy
2009-02-04  9:32 ` Matthieu Moy [this message]
2009-02-04  9:32   ` [PATCH 3/3] builtin-mv.c: check for unversionned files before looking at the destination Matthieu Moy
2009-02-04 20:54     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1233739928-19895-2-git-send-email-Matthieu.Moy@imag.fr \
    --to=matthieu.moy@imag.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).