Ævar Arnfjörð Bjarmason de8bada2bf wildmatch test: create & test files on disk in addition to in-memory
There has never been any full roundtrip testing of what git-ls-files
and other commands that use wildmatch() actually do, rather we've been
satisfied with just testing the underlying C function.

Due to git-ls-files and friends having their own codepaths before they
call wildmatch() there's sometimes differences in the behavior between
the two. Even when we test for those (as with [1]), there was no one
place where you can review how these two modes differ.

Now there is. We now attempt to create a file called $haystack and
match $needle against it for each pair of $needle and $haystack that
we were passing to test-wildmatch.

If we can't create the file we skip the test. This ensures that we can
run this on all platforms and not maintain some infinitely growing
whitelist of e.g. platforms that don't support certain characters in
filenames.

A notable exception to this is Windows, where due to the reasons
explained in [2] the shellscript emulation layer might fake the
creation of a file such as "*", and "test -e" for it will succeed
since it just got created with some character that maps to "*", but
git ls-files won't be fooled by this.

Thus we need to skip creating certain filenames entirely on Windows,
the list here might be overly aggressive. I don't have access to a
Windows system to test this.

As a result of doing these tests we can now see the cases where these
two ways of testing wildmatch differ:

 * Creating a file called 'a[]b' and running ls-files 'a[]b' will show
   that file, but wildmatch("a[]b", "a[]b") will not match

 * wildmatch() won't match a file called \ against \, but ls-files
   will.

 * `git --glob-pathspecs ls-files 'foo**'` will match a file
   'foo/bba/arr', but wildmatch won't, however pathmatch will.

   This seems like a bug to me, the two are otherwise equivalent as
   these tests show.

This also reveals the case discussed in [1], since 2.16.0 '' is now an
error as far as ls-files is concerned, but wildmatch() itself happily
accepts it.

1. 9e4e8a64c2 ("pathspec: die on empty strings as pathspec",
   2017-06-06)

2. nycvar.QRO.7.76.6.1801052133380.1337@wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet
   (https://public-inbox.org/git/?q=nycvar.QRO.7.76.6.1801052133380.1337%40wbunaarf-fpuvaqryva.tvgsbejvaqbjf.bet)

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-01-30 14:04:01 -08:00
2017-07-10 14:24:36 -07:00
2017-09-10 17:08:22 +09:00
2017-10-29 10:04:12 +08:00
2017-10-26 12:29:23 +09:00
2017-07-06 18:14:44 -07:00
2017-09-10 17:08:22 +09:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-06-24 14:28:41 -07:00
2017-03-13 15:28:54 -07:00
2017-09-29 11:23:43 +09:00
2017-07-31 13:05:15 -07:00
2017-05-25 13:08:23 +09:00
2017-05-08 15:12:57 +09:00
2017-05-08 15:12:57 +09:00
2017-08-03 11:08:10 -07:00
2017-05-02 10:46:41 +09:00
2017-11-06 13:11:21 +09:00
2017-11-06 13:11:21 +09:00
2017-10-24 10:19:06 +09:00
2017-01-25 14:42:37 -08:00
2017-09-29 11:23:43 +09:00
2017-09-06 13:11:25 +09:00
2017-11-06 13:11:21 +09:00
2017-10-03 15:42:48 +09:00
2017-06-22 14:15:20 -07:00
2017-06-24 14:28:41 -07:00
2017-11-06 13:11:26 +09:00
2017-06-22 14:15:21 -07:00
2017-10-01 17:18:03 +09:00
2017-03-31 08:33:56 -07:00
2017-03-31 08:33:56 -07:00
2017-10-30 14:00:44 +09:00
2017-10-03 15:42:49 +09:00
2017-10-07 16:27:54 +09:00
2017-08-23 15:12:07 -07:00
2017-06-24 14:28:41 -07:00
2017-01-30 14:17:00 -08:00
2017-09-06 17:19:54 +09:00
2017-10-11 14:52:22 +09:00
2017-06-24 14:28:41 -07:00
2017-09-19 10:47:52 +09:00
2017-10-01 17:18:03 +09:00
2017-10-01 17:18:03 +09:00
2017-10-01 17:18:03 +09:00
2017-10-01 17:18:03 +09:00
2017-09-29 11:23:43 +09:00
2017-01-30 14:17:00 -08:00
2017-08-23 15:12:07 -07:00
2017-08-22 10:29:03 -07:00
2017-05-29 12:34:43 +09:00
2017-10-28 10:18:40 +09:00
2017-10-03 15:42:48 +09:00
2017-10-18 14:24:09 +09:00
2017-10-02 13:15:59 +09:00
2017-09-25 15:24:06 +09:00
2017-09-29 11:23:42 +09:00
2017-09-29 11:23:43 +09:00
2017-10-03 08:42:57 +09:00
2017-03-31 08:33:56 -07:00
2017-11-06 13:11:21 +09:00
2017-03-31 08:33:56 -07:00
2017-09-29 11:23:43 +09:00
2017-06-24 14:28:41 -07:00
2017-09-28 14:47:52 +09:00
2017-08-26 22:55:04 -07:00
2017-09-29 11:23:42 +09:00
2017-06-24 14:28:41 -07:00
2017-09-29 11:23:43 +09:00
2017-11-06 13:11:21 +09:00

Git - fast, scalable, distributed revision control system

Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.

Git is an Open Source project covered by the GNU General Public License version 2 (some parts of it are under different licenses, compatible with the GPLv2). It was originally written by Linus Torvalds with help of a group of hackers around the net.

Please read the file INSTALL for installation instructions.

Many Git online resources are accessible from https://git-scm.com/ including full documentation and Git related tools.

See Documentation/gittutorial.txt to get started, then see Documentation/giteveryday.txt for a useful minimum set of commands, and Documentation/git-.txt for documentation of each command. If git has been correctly installed, then the tutorial can also be read with man gittutorial or git help tutorial, and the documentation of each command with man git-<commandname> or git help <commandname>.

CVS users may also want to read Documentation/gitcvs-migration.txt (man gitcvs-migration or git help cvs-migration if git is installed).

The user discussion and development of Git take place on the Git mailing list -- everyone is welcome to post bug reports, feature requests, comments and patches to git@vger.kernel.org (read Documentation/SubmittingPatches for instructions on patch submission). To subscribe to the list, send an email with just "subscribe git" in the body to majordomo@vger.kernel.org. The mailing list archives are available at https://public-inbox.org/git/, http://marc.info/?l=git and other archival sites.

The maintainer frequently sends the "What's cooking" reports that list the current status of various development topics to the mailing list. The discussion following them give a good reference for project status, development direction and remaining tasks.

The name "git" was given by Linus Torvalds when he wrote the very first version. He described the tool as "the stupid content tracker" and the name as (depending on your mood):

  • random three-letter combination that is pronounceable, and not actually used by any common UNIX command. The fact that it is a mispronunciation of "get" may or may not be relevant.
  • stupid. contemptible and despicable. simple. Take your pick from the dictionary of slang.
  • "global information tracker": you're in a good mood, and it actually works for you. Angels sing, and a light suddenly fills the room.
  • "goddamn idiotic truckload of sh*t": when it breaks
Description
No description provided
Readme 279 MiB
Languages
C 50.5%
Shell 38.7%
Perl 4.5%
Tcl 3.2%
Python 0.8%
Other 2.1%