git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Elijah Newren <newren@gmail.com>
Cc: git@vger.kernel.org, szeder.dev@gmail.com
Subject: Re: [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l
Date: Sun, 27 May 2018 08:58:59 +0900	[thread overview]
Message-ID: <xmqq4lium0jg.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180526010944.9975-1-newren@gmail.com> (Elijah Newren's message of "Fri, 25 May 2018 18:09:44 -0700")

Elijah Newren <newren@gmail.com> writes:

>> I'd expect that a reader of the commit who cares enough to bother to
>> wonder by looking at the patch and seeing that 2 became 3 would know
>> why already.  And a reader of the resulting file would not know that
>> the 3 used to be 2, and won't be helped by "we used to count to 2,
>> now we have 'out' also counted" that much, especially in the commit
>> log message.  What would help the latter would be to name which
>> three paths we expect to see in the comment (or test against the
>> exact list of paths, instead of using test_line_count).
>>
>>> An alternative to consider would be to add a .gitignore file in the
>>> initial commit to ignore 'out', then the number of untracked files
>>> don't have to be adjusted.
>>
>> I think that is a preferred solution that we've used in ls-files and
>> status tests successfully.
>
> ...except that if we add a .gitignore to each initial commit (we use
> test_create_repo for nearly every test to keep them separable meaning
> we'd have to do this many times), then four lines above we have to
> adjust the number of expected tracked files.  And, for it to work,
> we'd have to add an --exclude-standard flag to ls-files -o.

Yeah, unless the original planned to use the .gitignore mechanism,
converting it to use it now will become noisy.

  reply	other threads:[~2018-05-26 23:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABPp-BEcTKaPPUOVqTRUAW+LBBySCK0dgx1J66hYB30yMasK_Q@mail.gmail.com/>
2018-05-26  1:09 ` [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l Elijah Newren
2018-05-26 23:58   ` Junio C Hamano [this message]
2018-05-24  7:04 [PATCH 0/5] Modernize some testcases for merge-recursive corner cases Elijah Newren
2018-05-24  7:04 ` [PATCH 2/5] t6036, t6042: use test_line_count instead of wc -l Elijah Newren
2018-05-24 10:05   ` SZEDER Gábor
2018-05-24 10:36     ` SZEDER Gábor
2018-05-24 17:03     ` Elijah Newren
2018-05-25  1:17     ` Junio C Hamano
2018-05-26  0:44       ` Elijah Newren

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=xmqq4lium0jg.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=newren@gmail.com \
    --cc=szeder.dev@gmail.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).