From 77e9e496a1248085d3bdf50dc23b79b4e7f0d26d Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 3 Aug 2011 11:37:29 +0200 Subject: [PATCH 1/2] 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 Signed-off-by: Junio C Hamano --- git-am.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-am.sh b/git-am.sh index 6cdd5910d..4ea2f2fe0 100755 --- a/git-am.sh +++ b/git-am.sh @@ -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 @@ -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 ;; From 2ae7345ab290ea1357c0b2f1901ef531c9f59e5b Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Tue, 9 Aug 2011 17:21:08 +0200 Subject: [PATCH 2/2] am: Document new --exclude= option The --exclude= option is passed down to apply; document it as such. Signed-off-by: maximilian attems Signed-off-by: Junio C Hamano --- Documentation/git-am.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 6b1b5af64..887466d77 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -13,7 +13,8 @@ SYNOPSIS [--3way] [--interactive] [--committer-date-is-author-date] [--ignore-date] [--ignore-space-change | --ignore-whitespace] [--whitespace=