[kernel-team] 30/47: git-format-patch-for-debian: Add --local option for patches not upstream

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Dec 21 00:30:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch master
in repository kernel-team.

commit 6b2fe7946041769cc75d87f65e13987edbb7d8c8
Author: Ben Hutchings <benh at debian.org>
Date:   Mon Jul 1 05:15:00 2013 +0000

    git-format-patch-for-debian: Add --local option for patches not upstream
    
    In case the patch is only in a local branch and has not been forwarded
    upstream, the --local option results in a 'Forwarded: no' header instead
    of an Origin header.
    
    svn path=/people/benh/; revision=20318
---
 scripts/benh/git-format-patch-for-debian | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/scripts/benh/git-format-patch-for-debian b/scripts/benh/git-format-patch-for-debian
index a2bb4b0..2deb3c8 100755
--- a/scripts/benh/git-format-patch-for-debian
+++ b/scripts/benh/git-format-patch-for-debian
@@ -35,6 +35,9 @@ if [ "x$1" = x--url ]; then
 	    ;;
     esac
     shift 2
+elif [ "x$1" = x--local ]; then
+    export GIT_URL_BASE=
+    shift 1
 else
     echo >&2 "I: Assuming this patch is in Linus's tree."
     echo >&2 "I: If not, use the --url option to specify the git web URL."
@@ -45,7 +48,14 @@ git format-patch --subject-prefix='' "$@" | while read name; do
     printf '%s\n' "$name"
     mv "$name" "$name".orig
     awk 'FNR == 1 { hash = $2 }
-/^$/ && hash != "" { print "Origin: " ENVIRON["GIT_URL_BASE"] hash; hash = "" }
+/^$/ && hash != "" {
+    if (ENVIRON["GIT_URL_BASE"] != "") {
+        print "Origin: " ENVIRON["GIT_URL_BASE"] hash
+    } else {
+        print "Forwarded: no"
+    }
+    hash = ""
+}
 FNR > 1 { print }' \
         "$name".orig > "$name"
     rm "$name".orig

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list