All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] diff-files: treat "i-t-a" files as "not-in-index"
Date: Thu, 18 Jun 2020 15:40:38 -0700	[thread overview]
Message-ID: <xmqqbllgknfd.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <xmqqk104knrs.fsf@gitster.c.googlers.com> (Junio C. Hamano's message of "Thu, 18 Jun 2020 15:33:11 -0700")

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

>> +	touch empty &&
>
> Use of "touch" gives a wrong impression that you care about the file
> timestamp; use something like ": >empty &&" instead when you care
> about the presence of the file and do not care about its timestamp.

I just realized that this is even more important in this case not to
use "touch".

The test that uses this file cares not just the presence, but it
deeply cares that its contents is empty.  The thing it least cares
about is its timestamp.

The purpose of using "touch" is to update the timestamp, to keep the
current contents if it exists, and to ensure it exists (as a side
effect), in the decreasing order of importance.  Use of the command
here misleads the readers.

Thanks.

  reply	other threads:[~2020-06-18 22:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 16:16 [PATCH] diff-files: treat "i-t-a" files as "not-in-index" Srinidhi Kaushik
2020-06-11 20:27 ` Junio C Hamano
2020-06-11 23:28   ` Srinidhi Kaushik
2020-06-18 17:58     ` Srinidhi Kaushik
2020-06-18 22:33       ` Junio C Hamano
2020-06-18 22:33 ` Junio C Hamano
2020-06-18 22:40   ` Junio C Hamano [this message]
2020-06-19  9:31     ` Srinidhi Kaushik
2020-06-19 21:43       ` Junio C Hamano
2020-06-20 16:38 ` [PATCH v2] " Srinidhi Kaushik
2020-06-20 16:54   ` Junio C Hamano
2020-06-23 15:17   ` Johannes Schindelin

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=xmqqbllgknfd.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=shrinidhi.kaushik@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.
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.