git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Taylor Blau <me@ttaylorr.com>
Cc: Johannes Sixt <j6t@kdbg.org>,
	Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	git@vger.kernel.org
Subject: Re: [PATCH] fetch: optionally allow disabling FETCH_HEAD update
Date: Mon, 13 Jul 2020 12:45:35 -0700	[thread overview]
Message-ID: <xmqq7dv7nqqo.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20200713190834.GA77607@syl.lan> (Taylor Blau's message of "Mon, 13 Jul 2020 15:08:34 -0400")

Taylor Blau <me@ttaylorr.com> writes:

>> -	const char *filename = dry_run ? "/dev/null" : git_path_fetch_head(the_repository);
>> +	const char *filename = (!write_fetch_head
>> +				? "/dev/null"
>> +				: git_path_fetch_head(the_repository));
>
> Ah, because dry_run ==> !write_fetch_head, so this is an equivalent
> translation. Makes sense.

Yup, now dry_run is merely one of the two cases we turn
write_fetch_head off, and the logic to prevent us from writing
FETCH_HEAD (hopefully without any other side effect) was already
there in this function.

> Test coverage all looks good, thanks for working on this. I don't think
> there's anything left, so this would be great after 2.28 is released.
>
>   Reviewed-by: Taylor Blau <me@ttaylorr.com>

Thanks.

  reply	other threads:[~2020-07-13 19:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-11 20:48 FETCH_HEAD files and mirrored repos Konstantin Ryabitsev
2020-07-11 21:07 ` Junio C Hamano
2020-07-11 21:19   ` Konstantin Ryabitsev
2020-07-12 17:33     ` Junio C Hamano
2020-07-12 20:25       ` Konstantin Ryabitsev
2020-07-12 20:52         ` Junio C Hamano
2020-07-12 21:54           ` Konstantin Ryabitsev
2020-07-13 17:09           ` Johannes Sixt
2020-07-13 17:13             ` Junio C Hamano
2020-07-13 18:06               ` [PATCH] fetch: optionally allow disabling FETCH_HEAD update Junio C Hamano
2020-07-13 19:08                 ` Taylor Blau
2020-07-13 19:45                   ` Junio C Hamano [this message]
2020-07-13 20:00               ` FETCH_HEAD files and mirrored repos Konstantin Ryabitsev
2020-07-13 20:04                 ` Junio C Hamano
2020-07-13 20:22                   ` Jeff King
2020-07-13 20:34                     ` Konstantin Ryabitsev
2020-07-13 20:50                       ` Jeff King
2020-07-13 20:43                     ` Johannes Sixt
2020-07-14  4:11             ` Jonathan Nieder

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=xmqq7dv7nqqo.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=me@ttaylorr.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 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 NNTP newsgroup(s).