RE: [PATCH v4 2/7] archive --add-file-with-contents: allow paths containing colons
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- May 19, 2022, 18:12 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2205192010210.352@tvgsbejvaqbjf.bet>
- In-Reply-To
- <03d801d864bc$85fe62a0$91fb27e0$@nexbridge.com>
Hi Randall,
On Tue, 10 May 2022, rsbecker@nexbridge.com wrote:
Show 24 quoted lines
> On May 10, 2022 5:57 PM, Junio C Hamano wrote: > >"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > >writes: > > > >> git archive --format=zip >with_file_with_content.zip \ > >> + --add-file-with-content=\"$QUOTED\": \ > >> --add-file-with-content=hello:world $EMPTY_TREE && > >> test_when_finished "rm -rf tmp-unpack" && > >> mkdir tmp-unpack && ( > >> cd tmp-unpack && > >> "$GIT_UNZIP" ../with_file_with_content.zip && > >> test_path_is_file hello && > >> + test_path_is_file $QUOTED && > > > >Looks OK, even though it probably is a good idea to have dq around $QUOTED, so > >that future developers can easily insert SP into its value to use a bit more common > >but still a bit more problematic pathnames in the test. > > A test case for .gitignore in this would be good too. People on our > exotic platform do this stuff as a matter of course. As an example, a > name of $Z3P4:12399334 being used as a named pipe (associated with the > unique name of a process) actually has been seen in the wild recently. > My solution was to wild card this and/or contain it in an ignored > directory.
The `--add-file-with-content` option, which this test case is all about, specifically does not heed `.gitignore`. Is this what you want to test? If so, I don't think that's necessary. Unless you expect some future version to introduce a patch by mistake that makes `--add-file-with-content` subject to the `.gitignore` rules.
Ciao, Dscho