From: Junio C Hamano <gitster@pobox.com>
To: Brad King <brad.king@kitware.com>
Cc: git@vger.kernel.org, newren@gmail.com
Subject: Re: [PATCH/RFC 3/3] merge-recursive: Tolerate missing file when HEAD is up to date
Date: Fri, 24 Jan 2014 11:50:39 -0800 [thread overview]
Message-ID: <xmqq8uu5rwfk.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <5e5bfe752655c39fca626811972af9d0a90ddab9.1390574981.git.brad.king@kitware.com> (Brad King's message of "Fri, 24 Jan 2014 10:01:03 -0500")
Brad King <brad.king@kitware.com> writes:
> Teach add_cacheinfo to optionally tolerate make_cache_entry failure when
> the reason is ENOENT from lstat. Tell it to do so in the call path when
> the entry from HEAD is known to be up to date.
It somehow feels wrong to force callers of make_cache_entry() to be
so intimate with the implementation details of refresh_cache_ent()
by having them inspect the errno from lstat(2) so deep in the
callchain, and to force callers of make_cache_entry() that says
refresh=NoThanks to pass a useless NULL.
Looking at refresh_cache_ent(), I notice that we already have cases
where we do not bother to lstat and instead say "Yeah, the cache
entry you have is good", and have to wonder if this new feature
should be modeled after them instead, namely, by introducing a new
option bit CE_MATCH_MISSING_OK that asks it to treat a path that is
missing from the working tree as if it is checked out unmodified.
next prev parent reply other threads:[~2014-01-24 19:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CABPp-BGAsrrjcZxVirzKU_VEyUM1U=4TFj18CieKKE7==c7v2A@mail.gmail.com>
2014-01-24 15:01 ` [PATCH/RFC 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-24 15:01 ` [PATCH/RFC 1/3] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-24 16:51 ` Jonathan Nieder
2014-01-24 17:50 ` Brad King
2014-01-24 15:01 ` [PATCH/RFC 2/3] read-cache.c: Thread lstat error through make_cache_entry signature Brad King
2014-01-24 15:01 ` [PATCH/RFC 3/3] merge-recursive: Tolerate missing file when HEAD is up to date Brad King
[not found] ` <CABPp-BEK9+_ebRiodCp59DHJZExYn3N1jjtBsikSmwt-s_v_0A@mail.gmail.com>
2014-01-24 19:37 ` Fwd: " newren
2014-01-24 19:45 ` Brad King
2014-01-24 19:50 ` Junio C Hamano [this message]
2014-01-24 20:02 ` Brad King
2014-01-24 20:10 ` [PATCH v2 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-24 20:10 ` [PATCH v2 1/3] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-24 20:10 ` [PATCH v2 2/3] read-cache.c: Optionally tolerate missing files in make_cache_entry Brad King
2014-01-24 20:39 ` Junio C Hamano
2014-01-24 20:10 ` [PATCH v2 3/3] merge-recursive.c: Tolerate missing files while refreshing index Brad King
2014-01-27 14:45 ` [PATCH v3 0/3] merge-recursive: Avoid diagnostic on empty work tree Brad King
2014-01-27 14:45 ` [PATCH v3 1/4] t3030-merge-recursive: Test known breakage with " Brad King
2014-01-27 14:45 ` [PATCH v3 2/4] read-cache.c: Refactor --ignore-missing implementation Brad King
2014-01-27 17:39 ` Junio C Hamano
2014-01-27 14:45 ` [PATCH v3 3/4] read-cache.c: Extend make_cache_entry refresh flag with options Brad King
2014-01-27 14:45 ` [PATCH v3 4/4] merge-recursive.c: Tolerate missing files while refreshing index Brad King
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=xmqq8uu5rwfk.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=brad.king@kitware.com \
--cc=git@vger.kernel.org \
--cc=newren@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.