From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Daniel Lyubomirov <daniel@digitalus.bg>, git@vger.kernel.org
Subject: Re: Bug: problem with file named with dash character
Date: Wed, 27 Jun 2012 17:00:39 -0400 [thread overview]
Message-ID: <20120627210039.GA2292@sigill.intra.peff.net> (raw)
In-Reply-To: <7vvcic7a6t.fsf@alter.siamese.dyndns.org>
On Wed, Jun 27, 2012 at 01:48:42PM -0700, Junio C Hamano wrote:
> >>> It is not ready yet, but here are a few patches WIP.
> >>
> >> And this is the second clean-up
> >
> > And this is the third one.
>
> Some of the other breakages that comes from the "no-index" codepath
> that we may want to consider addressing I have found so far are:
>From a cursory look, these definitely go in the right direction. I like
how the third one was able to rip populate_from_stdin entirely out of
diff.c.
I suspect we could get by without even the nongit_stdin flag you added;
the only place which uses it is diff_fill_sha1_info, but theoretically
we don't even need it there; we could just index_mem the file contents
we get via diff_populate_filespec, and the stdin contents will
already be there.
Right now we call index_path for worktree files, but I don't really see
much point; we have to read the whole data either way, and
populate_filespec should be mmap-ing them for us.
> - We say on the "diff --git" header uglyness like "a/-", "b/-";
> likewise in the metainfo;
I'd consider changing the path to "/dev/stdin" for this case. It doesn't
exist on some platforms, of course, but neither does /dev/null, which we
use similarly.
> - We show on the "index" header "0*" value for these entries, even
> though we should be able to compute it (after all we do so for
> files on disk in a non-git directory);
The index_mem I mentioned above would fix that.
> - We still apply attributes and textconv as if we are dealing with
> a regular file "-" at the root level.
I think that's bad. I wonder if it should have "*" attributes applied to
it or not. While I can see it being convenient in some cases, I think it
makes the rules confusingly complex.
-Peff
next prev parent reply other threads:[~2012-06-27 21:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <52ae7682-3e9a-4b52-bec1-08ba3aadffc0@office.digitalus.nl>
2012-06-27 7:32 ` Bug: problem with file named with dash character Daniel Lyubomirov -|- Digitalus Bulgaria
2012-06-27 9:57 ` faux
2012-06-27 18:28 ` Junio C Hamano
2012-06-27 19:52 ` Jeff King
2012-06-27 20:25 ` Jeff King
2012-06-27 20:27 ` Junio C Hamano
2012-06-27 20:33 ` Junio C Hamano
2012-06-27 20:35 ` Junio C Hamano
2012-06-27 20:39 ` Junio C Hamano
2012-06-27 20:48 ` Junio C Hamano
2012-06-27 21:00 ` Jeff King [this message]
2012-06-27 22:17 ` Junio C Hamano
2012-06-27 22:41 ` Jeff 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=20120627210039.GA2292@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=daniel@digitalus.bg \
--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 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).