git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Matthieu Moy <Matthieu.Moy@imag.fr>, git <git@vger.kernel.org>
Subject: Re: [BUG] assertion failure in builtin-mv.c with "git mv -k"
Date: Wed, 14 Jan 2009 11:02:44 -0800	[thread overview]
Message-ID: <7vbpu91zjf.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <496E0D1C.20807@drmicha.warpmail.net> (Michael J. Gruber's message of "Wed, 14 Jan 2009 17:04:44 +0100")

Michael J Gruber <git@drmicha.warpmail.net> writes:

> So, should I prepare a series like:
>
> 1: test case and mark known fail
> 2: the 1 line fix
> 3: mark test pass
>
> Or should 2+3 be squashed into one?

If "git mv" already has its own sets of tests with a good coverage, please
strive to add a case that covers your fix to an existing script.  Then
step #1 above would be a patch to add a few "test_expect_failure" tests to
an existing file, and step #3 would be a patch to flip expect_failure to
expect_success.

And in such a case, for a single liner, all three can be squashed in to a
single patch.  It would show what changed in the code and have a few new
test_expect_success tests added to the test suite, and it would be obvious
to anybody who looks at such a change 6 months down the road that the test
cases added by the patch are the cases that did not work without the
changes to the code.  It never makes sense to separate steps #2 and #3 for
any fix.

If "git mv" did not have adequate test coverage, then please add a test
script with both expect_success (for cases that should have been there
when somebody worked on "git mv" originally), and expect_failure to expose
the bug you found in your first patch.  Again, the second patch would
update the code and flip expect_failure to expect_success.

I see there is t7001-mv and even though it claims to concentrate on its
operation from subdirectory, it has tests for more basic modes of the
operation.

So my recommendation would be to have a single patch that:

 (1) retitles t7001;
 (2) adds your new -k tests to it; and
 (3) adds the 1-liner fix.

  parent reply	other threads:[~2009-01-14 19:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-14 13:20 [BUG] assertion failure in builtin-mv.c with "git mv -k" Matthieu Moy
2009-01-14 14:53 ` Michael J Gruber
2009-01-14 15:54   ` Johannes Schindelin
2009-01-14 16:04     ` Michael J Gruber
2009-01-14 16:47       ` Jeff King
2009-01-14 19:02       ` Junio C Hamano [this message]
2009-01-15 10:53         ` Michael J Gruber
2009-01-15 22:19           ` Junio C Hamano
2009-01-16 12:57             ` Matthieu Moy
2009-01-14 17:03     ` [PATCH v2 0/3] Add test cases for "git mv -k" and fix a known breakage Michael J Gruber
2009-01-14 17:03       ` [PATCH v2 1/3] add test cases for "git mv -k" Michael J Gruber
2009-01-14 17:03         ` [PATCH v2 2/3] fix handling of multiple untracked files for git mv -k Michael J Gruber
2009-01-14 17:03           ` [PATCH v2 3/3] mark fixed breakage as expect pass for "git mv -k" multiple files Michael J Gruber
2009-01-14 15:42 ` [PATCH] fix handling of multiple untracked files for git mv -k Michael J Gruber

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=7vbpu91zjf.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=Matthieu.Moy@imag.fr \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /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).