All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/4] t4011: illustrate "diff-index -p" on stat-dirty paths
Date: Thu, 01 Mar 2012 11:05:49 +0100	[thread overview]
Message-ID: <4F4F49FD.3090504@in.waw.pl> (raw)
In-Reply-To: <1330568057-27304-3-git-send-email-gitster@pobox.com>

On 03/01/2012 03:14 AM, Junio C Hamano wrote:
> -test_expect_success SYMLINKS 'diff unchanged symlink'  '
> +test_expect_success SYMLINKS 'diff unchanged symlink and file'  '
>   	tree=$(git write-tree)&&
> -	git update-index frotz&&
> +	git update-index frotz nitfol&&
>   	test -z "$(git diff-index --name-only $tree)"
>   '
Hi,
why modify and extend an existing test instead of adding a new separate 
one? I think the test-suite should be getting more unittest-y, ie. 
checking minimal aspects of functionality, not less.

Zbyszek

> -test_expect_success SYMLINKS 'diff removed symlink' '
> +test_expect_success SYMLINKS 'diff removed symlink and file' '
>   	cat>expected<<-\EOF&&
>   	diff --git a/frotz b/frotz
>   	deleted file mode 120000
> @@ -44,22 +52,39 @@ test_expect_success SYMLINKS 'diff removed symlink' '
>   	@@ -1 +0,0 @@
>   	-xyzzy
>   	\ No newline at end of file
> +	diff --git a/nitfol b/nitfol
> +	deleted file mode 100644
> +	index 7c465af..0000000
> +	--- a/nitfol
> +	+++ /dev/null
> +	@@ -1 +0,0 @@
> +	-xyzzy
>   	EOF
>   	mv frotz frotz2&&
> +	mv nitfol nitfol2&&
>   	git diff-index -M -p $tree>current&&
>   	compare_diff_patch expected current
>   '

  parent reply	other threads:[~2012-03-01 10:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-01  2:14 [PATCH 0/4] "diff -p" patch header generation updates Junio C Hamano
2012-03-01  2:14 ` [PATCH 1/4] t4011: modernise style Junio C Hamano
2012-03-01  2:14 ` [PATCH 2/4] t4011: illustrate "diff-index -p" on stat-dirty paths Junio C Hamano
2012-03-01  9:05   ` Thomas Rast
2012-03-01 16:18     ` Junio C Hamano
2012-03-01 16:52     ` [PATCH 2/4 v2] " Junio C Hamano
2012-03-01 10:05   ` Zbigniew Jędrzejewski-Szmek [this message]
2012-03-01 16:10     ` [PATCH 2/4] " Junio C Hamano
2012-03-01  2:14 ` [PATCH 3/4] diff -p: squelch "diff --git" header for " Junio C Hamano
2012-03-01  2:14 ` [PATCH 4/4] diff --ignore-mode-change 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

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

  git send-email \
    --in-reply-to=4F4F49FD.3090504@in.waw.pl \
    --to=zbyszek@in.waw.pl \
    --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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.