Skip to content

Commit

Permalink
am: pass exclude down to apply
Browse files Browse the repository at this point in the history
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 <max@stro.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
maximilian attems authored and Junio C Hamano committed Aug 3, 2011
1 parent 3503b8d commit 77e9e49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ whitespace= pass it through git-apply
ignore-space-change pass it through git-apply
ignore-whitespace pass it through git-apply
directory= pass it through git-apply
exclude= pass it through git-apply
C= pass it through git-apply
p= pass it through git-apply
patch-format= format the patch(es) are in
Expand Down Expand Up @@ -362,7 +363,7 @@ do
;;
--resolvemsg)
shift; resolvemsg=$1 ;;
--whitespace|--directory)
--whitespace|--directory|--exclude)
git_apply_opt="$git_apply_opt $(sq "$1=$2")"; shift ;;
-C|-p)
git_apply_opt="$git_apply_opt $(sq "$1$2")"; shift ;;
Expand Down

0 comments on commit 77e9e49

Please sign in to comment.