author | Junio C Hamano <gitster@pobox.com> | |
Mon, 25 Aug 2008 08:05:31 +0000 (01:05 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 7 Sep 2008 01:56:44 +0000 (18:56 -0700) | ||
commit | 6ecb1ee28a9479af1d39cfab170b5d93e238c277 | |
tree | 7b8dfdec19e5b2117f8928916da9ca6e56907917 | tree | snapshot |
parent | 80d12c23de4fbddfaee2f9bf7fe809f57d02e171 | commit | diff |
git-apply:--include=pathspec
This allows --include=pathspec, similar to --exclude=pathspec.
The rule when one or both of these are used is that the include/exclude
patterns are examined in the order they are given on the command line, and
the first match determines if a patch to each path is used or not. Hence:
$ git apply --include='specific.h' --exclude='*.h' <diff
would apply the patch to specific.h header file, but all other patches in
the input file to other header files are ignored. A patch to a path that
does not match any include/exclude pattern is used by default if there is
no include pattern on the command line, and ignored if there is any
include pattern.
This originally came from Joe Perches, but both the design of the
semantics and the implementation have been redone complately.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This allows --include=pathspec, similar to --exclude=pathspec.
The rule when one or both of these are used is that the include/exclude
patterns are examined in the order they are given on the command line, and
the first match determines if a patch to each path is used or not. Hence:
$ git apply --include='specific.h' --exclude='*.h' <diff
would apply the patch to specific.h header file, but all other patches in
the input file to other header files are ignored. A patch to a path that
does not match any include/exclude pattern is used by default if there is
no include pattern on the command line, and ignored if there is any
include pattern.
This originally came from Joe Perches, but both the design of the
semantics and the implementation have been redone complately.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-apply.txt | diff | blob | history | |
builtin-apply.c | diff | blob | history |