From: Ben Willard <benwillard@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com
Subject: [PATCH 1/2] t8006: Add test to show blame failure
Date: Tue, 2 Jun 2009 15:28:55 -0400 [thread overview]
Message-ID: <4a257d7b.1358560a.504d.47c3@mx.google.com> (raw)
In-Reply-To: <cover.1243969358.git.benwillard@gmail.com>
'git blame' fails on a file which was changed from a directory to a file
in a single commit. This test shows the failure.
Signed-off-by: Ben Willard <benwillard@gmail.com>
---
t/t8006-blame.sh | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
create mode 100755 t/t8006-blame.sh
diff --git a/t/t8006-blame.sh b/t/t8006-blame.sh
new file mode 100755
index 0000000..7c271f0
--- /dev/null
+++ b/t/t8006-blame.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+test_description='git blame on file which changed from a directory to a file in the same commit'
+. ./test-lib.sh
+
+test_expect_success 'setup' '
+ mkdir dir &&
+ touch dir/file &&
+ git add dir/file &&
+ git commit -m "Add dir/file" &&
+ git rm dir/file &&
+ echo "File contents" > dir &&
+ git add dir &&
+ git commit -m "Add dir as a file"
+'
+
+test_expect_failure 'blame runs on dir' '
+ git blame dir
+'
+
+test_done
--
1.6.3.1.279.gd4bf4
next prev parent reply other threads:[~2009-06-02 19:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 19:28 [PATCH 0/2] git-blame bug Ben Willard
2009-06-02 19:28 ` Ben Willard [this message]
2009-06-02 19:29 ` [PATCH 2/2] blame: Fix corner case when a directory becomes a file Ben Willard
2009-06-03 7:43 ` Junio C Hamano
2009-06-03 12:40 ` Ben Willard
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=4a257d7b.1358560a.504d.47c3@mx.google.com \
--to=benwillard@gmail.com \
--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).