git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>,
	Avery Pennarun <apenwarr@gmail.com>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t4202 (log): add test for --follow over a merge
Date: Mon, 22 Apr 2013 23:28:21 -0700	[thread overview]
Message-ID: <20130423062821.GA32683@elie.Belkin> (raw)
In-Reply-To: <1366643912-3942-1-git-send-email-artagnon@gmail.com>

Hi,

Ramkumar Ramachandra wrote:

> The --follow feature can be used to follow the history of a file over
> a merge commit, and is useful even when the file hasn't been
> copied/renamed.  Add a test to show off this feature.

I can't claim to have followed the discussion, but I don't understand
the above.  If the file's name hasn't changed, the most one can hope
for is that --follow doesn't hurt, no?

[...]
> +	cat >expect <<-\EOF &&
> +	df26551 add a line to the beginning of ichi
> +	882d8d9 add a line to the end of ichi
> +	2fbe8c0 third
> +	f7dab8e second
> +	3a2fdcb initial
> +	EOF
> +	test_cmp expect actual

t/README explains:

| As with any programming projects, existing programs are the best
| source of the information.  However, do _not_ emulate
| t0000-basic.sh when writing your tests.  The test is special in
| that it tries to validate the very core of GIT.
[...]
|          other tests that simply rely on basic parts of the core
| GIT working properly should not have that level of intimate
| knowledge of the core GIT internals.  If all the test scripts
| hardcoded the object IDs like t0000-basic.sh does, that defeats
| the purpose of t0000-basic.sh, which is to isolate that level of
| validation in one place.

Hard-coding object names makes it painful to tweak a given test and
tests that come before it, lest a timestamp or the phase of moon
change and cause the object names to drift.   Don't do it, except
in t0000.

Hope that helps,
Jonathan

      reply	other threads:[~2013-04-23  6:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-22 15:18 [PATCH] t4202 (log): add test for --follow over a merge Ramkumar Ramachandra
2013-04-23  6:28 ` Jonathan Nieder [this message]

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=20130423062821.GA32683@elie.Belkin \
    --to=jrnieder@gmail.com \
    --cc=apenwarr@gmail.com \
    --cc=artagnon@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.
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).