From: Junio C Hamano <gitster@pobox.com>
To: Alex Vandiver <alexmv@dropbox.com>
Cc: git@vger.kernel.org,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Ben Peart <peartben@gmail.com>
Subject: Re: [PATCH 4/6] fsmonitor: Add a trailing newline to test-dump-fsmonitor
Date: Tue, 19 Dec 2017 12:28:12 -0800 [thread overview]
Message-ID: <xmqqlghyv4wz.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <dab89f071d22a21b85dff5d31e9e9a8ceb6458e3.1513642743.git.alexmv@dropbox.com> (Alex Vandiver's message of "Mon, 18 Dec 2017 16:28:56 -0800")
Alex Vandiver <alexmv@dropbox.com> writes:
> Subject: Re: [PATCH 4/6] fsmonitor: Add a trailing newline to test-dump-fsmonitor
"Subject: fsmonitor: complete the last line of test-dump-fsmonitor output"
perhaps.
> This makes it more readable when used for debugging from the
> commandline.
>
> Signed-off-by: Alex Vandiver <alexmv@dropbox.com>
> ---
> t/helper/test-dump-fsmonitor.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/t/helper/test-dump-fsmonitor.c b/t/helper/test-dump-fsmonitor.c
> index 53b19b39b..4e56929f7 100644
> --- a/t/helper/test-dump-fsmonitor.c
> +++ b/t/helper/test-dump-fsmonitor.c
> @@ -19,5 +19,6 @@ int cmd_main(int ac, const char **av)
> for (i = 0; i < istate->cache_nr; i++)
> printf((istate->cache[i]->ce_flags & CE_FSMONITOR_VALID) ? "+" : "-");
>
> + printf("\n");
That (and existing) uses of printf() all feel a bit overkill ;-)
Perhaps putchar() would suffice.
I am not sure if the above wants to become something like
for (i = 0; i < istate->cache_nr; i++) {
putchar(istate->cache[i]->ce_flags & CE_FSMONITOR_VALID ? '+' : '-');
quote_c_style(istate->cache[i]->name, NULL, stdout, 0);
putchar('\n');
}
instead of "a single long incomplete line" in the first place. Your
"fix" merely turns it into "a single long complete line", which does
not quite feel big enough an improvement, at least to me.
> return 0;
> }
next prev parent reply other threads:[~2017-12-19 20:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-19 0:28 [PATCH 0/6] Minor fsmonitor bugfixes, use with `git diff` Alex Vandiver
2017-12-19 0:28 ` [PATCH 1/6] Fix comments to agree with argument name Alex Vandiver
2017-12-19 0:28 ` [PATCH 2/6] fsmonitor: Add dir.h include, for untracked_cache_invalidate_path Alex Vandiver
2017-12-19 20:17 ` Junio C Hamano
2017-12-20 20:59 ` Alex Vandiver
2017-12-21 21:47 ` Junio C Hamano
2017-12-19 0:28 ` [PATCH 3/6] fsmonitor: Update helper tool, now that flags are filled later Alex Vandiver
2017-12-20 21:12 ` Alex Vandiver
2017-12-19 0:28 ` [PATCH 4/6] fsmonitor: Add a trailing newline to test-dump-fsmonitor Alex Vandiver
2017-12-19 20:28 ` Junio C Hamano [this message]
2017-12-21 1:55 ` Alex Vandiver
2017-12-21 21:49 ` Junio C Hamano
2017-12-19 0:28 ` [PATCH 5/6] fsmonitor: Remove debugging lines from t/t7519-status-fsmonitor.sh Alex Vandiver
2017-12-19 20:19 ` Junio C Hamano
2017-12-20 17:35 ` Johannes Schindelin
2017-12-19 0:28 ` [PATCH 6/6] fsmonitor: Use fsmonitor data in `git diff` Alex Vandiver
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=xmqqlghyv4wz.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=alexmv@dropbox.com \
--cc=git@vger.kernel.org \
--cc=peartben@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).