All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Chitester <andchi@fastmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [GSoC PATCH] t1420-lost-found.sh: use test_path_is_file for error logging
Date: Wed, 07 Jan 2026 20:30:54 -0500	[thread overview]
Message-ID: <87v7hcvqk1.fsf@fastmail.com> (raw)
In-Reply-To: <xmqq4ip0n3mm.fsf@gitster.g>

Junio C Hamano <gitster@pobox.com> writes:

> Looks correct, but given that what these tests want to ensure is
> that underneath .git/lost-found there are only these two expected
> files, I have to wonder if the output of "ls" here is expected to be
> very stable.  I.e. if we rewrote the whole thing to something like
> ...
>
> 	ls .git/lost-found/*/* >actual &&
> 	cat >expect <<-EOF &&
> 	.git/lost-found/commit/$(cat lost-commit)
> 	.git/lost-found/other/$(cat lost-other)
> 	EOF
> 	test_cmp expect actual
>
> ... would it be a more direct way to say that and is easier to
> understand to our readers.

Thanks for the feedback. This is an elegant solution that I did not
consider. Looking through the other tests, I am seeing this similar
pattern of comparing an expected result with the actual result. It is
much more deliberate and readable this way. I sent a v2, as a reply to
my original message, but I think I forgot to Cc you in that message. I'm
still figuring out the email workflow.

  reply	other threads:[~2026-01-08  1:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-04 16:15 [GSoC PATCH] t1420-lost-found.sh: use test_path_is_file for error logging Andrew Chitester
2026-01-05  3:24 ` Junio C Hamano
2026-01-08  1:30   ` Andrew Chitester [this message]
2026-01-06 13:26 ` [GSoC PATCH v2 1/1] t1420: modernize the lost-found test Andrew Chitester

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=87v7hcvqk1.fsf@fastmail.com \
    --to=andchi@fastmail.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 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.