git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] am: pass exclude down to apply

From
maximilian attems <max@stro.at>
Date
Aug 3, 2011, 09:37 UTC
Message-ID
<1312364249-1439-1-git-send-email-max@stro.at>

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>
---
 git-am.sh |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

This is a resent, haven't a test for this usecase, but it is useful and simple enough, so reposted.

diff --git a/git-am.sh b/git-am.sh
index 463c741..8d185aa 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
@@ -366,7 +367,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 ;;
-- 
1.7.5.4
Message 1 of 1 in “am: pass exclude down to apply”
  1. am: pass exclude down to applymaximilian attems, Aug 3, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.