]> git.ipfire.org Git - thirdparty/git.git/commit - dir.c
dir.c: keep track of where patterns came from
authorAdam Spiers <git@adamspiers.org>
Sun, 6 Jan 2013 16:58:04 +0000 (16:58 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sun, 6 Jan 2013 22:26:37 +0000 (14:26 -0800)
commitc04318e46aae79b8b8df059e2118519d83dfee12
tree714436b653a34517e552024b0d1d2c9f94644997
parentc082df24539329c2e75395cf378f0a3fe187c028
dir.c: keep track of where patterns came from

For exclude patterns read in from files, the filename is stored in the
exclude list, and the originating line number is stored in the
individual exclude (counting starting at 1).

For exclude patterns provided on the command line, a string describing
the source of the patterns is stored in the exclude list, and the
sequence number assigned to each exclude pattern is negative, with
counting starting at -1.  So for example the 2nd pattern provided via
--exclude would be numbered -2.  This allows any future consumers of
that data to easily distinguish between exclude patterns from files
vs. from the CLI.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/clean.c
builtin/ls-files.c
dir.c
dir.h