Skip to content

Commit 77e9e49

Browse files
brainfluxgitster
authored andcommitted
am: pass exclude down to apply
This allows to pass patches around from repositories, where the other repository doesn't feature certain files. In the special case this works for dash git sync to klibc dash: git am --directory="usr/dash" --exclude="usr/dash/configure.ac" \ --exclude="usr/dash/ChangeLog" --exclude="usr/dash/dash.1" \ .. -i -s -k ../dash/000X-foo.patch Signed-off-by: maximilian attems <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3503b8d commit 77e9e49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-am.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ whitespace= pass it through git-apply
2222
ignore-space-change pass it through git-apply
2323
ignore-whitespace pass it through git-apply
2424
directory= pass it through git-apply
25+
exclude= pass it through git-apply
2526
C= pass it through git-apply
2627
p= pass it through git-apply
2728
patch-format= format the patch(es) are in
@@ -362,7 +363,7 @@ do
362363
;;
363364
--resolvemsg)
364365
shift; resolvemsg=$1 ;;
365-
--whitespace|--directory)
366+
--whitespace|--directory|--exclude)
366367
git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
367368
-C|-p)
368369
git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;

0 commit comments

Comments
 (0)