From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jul 2016, #05; Wed, 13)
Date: Thu, 14 Jul 2016 08:45:13 -0700 [thread overview]
Message-ID: <xmqqzipkrzp2.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1607141505160.6426@virtualbox> (Johannes Schindelin's message of "Thu, 14 Jul 2016 15:15:13 +0200 (CEST)")
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> + ret = add_cache_entry(ce, options);
> + if (refresh) {
>
> Should we really refresh, even if ret < 0?
As we stopped calling make_cache_entry() with REFRESH flag on, we
can change this not to refresh if we want to, and I think we can
skip refresh without compromising correctness. But I'd prefer to
see that change as a separate "optimization" step---after all, the
original before this change unconditionally refreshed before even
calling add_cache_entry() and knowing the result of it.
> + struct cache_entry *nce;
> +
> + nce = refresh_cache_entry(ce, CE_MATCH_REFRESH | CE_MATCH_IGNORE_MISSING);
>
> This line is overly long, but there is a *lot* of precedent for that in
> merge-recursive.c, unfortunately. So this is just a remark, not an
> objection.
Yes, I had the same objection to the original codebase while I was
touching it.
Thanks.
next prev parent reply other threads:[~2016-07-14 15:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 16:56 What's cooking in git.git (Jul 2016, #05; Wed, 13) Junio C Hamano
2016-07-13 17:27 ` Stefan Beller
2016-07-13 17:32 ` Junio C Hamano
2016-07-13 17:52 ` Stefan Beller
2016-07-13 17:55 ` Junio C Hamano
2016-07-13 22:41 ` Junio C Hamano
2016-07-13 22:42 ` Jeff King
2016-07-13 17:40 ` Duy Nguyen
2016-07-13 17:46 ` Junio C Hamano
2016-07-14 12:59 ` Johannes Schindelin
2016-07-14 13:15 ` Johannes Schindelin
2016-07-14 15:45 ` Junio C Hamano [this message]
2016-07-14 13:46 ` Johannes Schindelin
2016-07-14 15:48 ` Junio C Hamano
2016-07-16 20:54 ` Lars Schneider
2016-07-16 21:04 ` Eric Wong
2016-07-16 22:04 ` Lars Schneider
2016-07-17 0:25 ` [PATCH] list: avoid incompatibility with *BSD sys/queue.h Eric Wong
2016-07-17 5:58 ` Eric Sunshine
2016-07-17 23:07 ` Eric Wong
2016-07-18 16:08 ` Lars Schneider
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=xmqqzipkrzp2.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.