From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/1] mingw: only test index entries for backslashes, not tree entries
Date: Sat, 4 Jan 2020 22:29:31 +0100 (CET) [thread overview]
Message-ID: <nycvar.QRO.7.76.6.2001042225080.46@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <20200104015749.GE130883@google.com>
Hi Jonathan,
On Fri, 3 Jan 2020, Jonathan Nieder wrote:
> Johannes Schindelin wrote:
>
> > As mentioned above, the idea is to prevent Git from attempting to create
> > files with illegal file name characters.
> [...]
> > On Thu, 26 Dec 2019, Jonathan Nieder wrote:
>
> >> Is there anything we can or should do to prevent people checking in
> >> new examples of paths with backslash in them (on all platforms)?
> >
> > As mentioned in my reply to Junio, I don't think that it would be wise to
> > even try to warn about backslashes in the file names. There are _so_ many
> > Git users out there, I am convinced that at least some of them have valid
> > use cases for file names with backslashes in them.
>
> Thanks for the quick answers. It helps.
>
> I think allowing people to clone
> https://github.com/zephyrproject-rtos/civetweb but not to check out
> the problematic historic revision is a reasonable choice, especially
> since it's still possible to get the data from there using
>
> git checkout <rev> -- . ':!bad-paths'
>
> [...]
> > Or maybe you know of a code path in the `unpack_trees()` machinery that
> > does _not_ go through `add_index_entry()`? I would be very interested to
> > learn about such code paths.
>
> Every once in a while someone (e.g., in #git) has wanted "git checkout
> --skip-index <rev> -- <paths>", and that would be the natural way to
> implement such a thing. But no one has done it yet. :)
>
> We'll just have to keep a watchful eye as people make new
> contributions.
Right.
As to my patch, in the meantime I wondered whether I should simply extend
`verify_path()` to take a `flags` parameter where I can specify whether
this is intended for checkout, and handle the backslashes _there_. That
would cover e.g. uses of `make_transient_cache_entry()`, too.
The only reason why I would want to introduce `flags` is that `git apply`
has this `--unsafe-paths` option where `verify_paths()` is called on the
file names in the diff, and I was unsure whether there are legitimate use
cases with diffs containing DOS-style paths (I suspect that there are
legitimate scenarios where this is desirable).
What do you think of that?
Ciao,
Dscho
next prev parent reply other threads:[~2020-01-04 21:29 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-26 17:42 [PATCH 0/1] Disallow writing, but not fetching commits with file names containing backslashes Johannes Schindelin via GitGitGadget
2019-12-26 17:42 ` [PATCH 1/1] mingw: only test index entries for backslashes, not tree entries Johannes Schindelin via GitGitGadget
2019-12-26 18:56 ` Junio C Hamano
2019-12-26 21:16 ` Johannes Schindelin
2019-12-30 21:57 ` Junio C Hamano
2020-01-02 19:53 ` Johannes Schindelin
2019-12-26 20:03 ` Jonathan Nieder
2019-12-26 21:23 ` Johannes Schindelin
2019-12-26 21:42 ` Jonathan Nieder
2019-12-26 22:01 ` Junio C Hamano
2019-12-26 22:25 ` Junio C Hamano
2019-12-31 22:51 ` Johannes Schindelin
2020-01-02 19:58 ` Johannes Schindelin
2020-01-04 1:57 ` Jonathan Nieder
2020-01-04 21:29 ` Johannes Schindelin [this message]
2019-12-26 19:22 ` [PATCH 0/1] Disallow writing, but not fetching commits with file names containing backslashes Junio C Hamano
2019-12-26 21:19 ` Johannes Schindelin
2019-12-31 22:53 ` [PATCH v2 " Johannes Schindelin via GitGitGadget
2019-12-31 22:53 ` [PATCH v2 1/1] mingw: only test index entries for backslashes, not tree entries Johannes Schindelin via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.QRO.7.76.6.2001042225080.46@tvgsbejvaqbjf.bet \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=jrnieder@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).