From 1eb446fa9fe66df037b416d2fb3c44cf36250354 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 31 Aug 2005 11:48:41 -0700 Subject: [PATCH 1/4] Add Pine 4.63 help from Daniel. Signed-off-by: Junio C Hamano --- Documentation/SubmittingPatches | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 26db5dd283..9ccb8f72ed 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches @@ -232,6 +232,18 @@ diff --git a/pico/pico.c b/pico/pico.c break; +(Daniel Barkalow) + +> A patch to SubmittingPatches, MUA specific help section for +> users of Pine 4.63 would be very much appreciated. + +Ah, it looks like a recent version changed the default behavior to do the +right thing, and inverted the sense of the configuration option. (Either +that or Gentoo did it.) So you need to set the +"no-strip-whitespace-before-send" option, unless the option you have is +"strip-whitespace-before-send", in which case you should avoid checking +it. + Thunderbird ----------- From 6e7722e6f88c049f43a1c00c45c502542d1a5752 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 31 Aug 2005 17:11:39 -0700 Subject: [PATCH 2/4] Fix git-log-script when HEAD is invalid. It used 'die' without including git-sh-setup-script; since everything it uses are subdirectory-aware, instead of including the script to force it to be run from the top, use echo & exit. Signed-off-by: Junio C Hamano --- git-log-script | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/git-log-script b/git-log-script index 5716b29941..b36c4e9534 100755 --- a/git-log-script +++ b/git-log-script @@ -1,4 +1,15 @@ #!/bin/sh +# +# Copyright (c) 2005 Linus Torvalds +# + +# This one uses only subdirectory-aware commands, so no need to +# include sh-setup-script. + revs=$(git-rev-parse --revs-only --no-flags --default HEAD "$@") || exit -[ "$revs" ] || die "No HEAD ref" -git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | LESS=-S ${PAGER:-less} +[ "$revs" ] || { + echo >&2 "No HEAD ref" + exit 1 +} +git-rev-list --pretty $(git-rev-parse --default HEAD "$@") | +LESS=-S ${PAGER:-less} From 7e011c40bc6c7dbd48b033fb16c861b1166f808c Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 31 Aug 2005 17:13:48 -0700 Subject: [PATCH 3/4] Fix git-status when HEAD is invalid. It tried to do git-diff-cache against HEAD, of course. Signed-off-by: Junio C Hamano --- git-status-script | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/git-status-script b/git-status-script index 1696f23e04..2b029545de 100755 --- a/git-status-script +++ b/git-status-script @@ -39,11 +39,23 @@ esac git-update-cache --refresh >/dev/null 2>&1 -git-diff-cache -M --cached HEAD | -sed 's/^://' | -report "Updated but not checked in" "will commit" +if test -f "$GIT_DIR/HEAD" +then + git-diff-cache -M --cached HEAD | + sed 's/^://' | + report "Updated but not checked in" "will commit" -committable="$?" + committable="$?" +else + echo '# +# Initial commit +#' + git-ls-files | + sed 's/^/o o o o A /' | + report "Updated but not checked in" "will commit" + + committable="$?" +fi git-diff-files | sed 's/^://' | From 2d56993347eac4e4f91c0539ff3c5f05fd777495 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 31 Aug 2005 17:15:25 -0700 Subject: [PATCH 4/4] Use 'git status' now it can handle initial commit. Update 'git commit' to use the updated `git status`. Also earlier the `-s` flag was ignored for the initial commit. Signed-off-by: Junio C Hamano --- git-commit-script | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/git-commit-script b/git-commit-script index cd28dde64d..a2455b0f8f 100755 --- a/git-commit-script +++ b/git-commit-script @@ -113,21 +113,6 @@ t) fi esac -if [ ! -r "$GIT_DIR/HEAD" ] -then - echo "#" - echo "# Initial commit" - echo "#" - git-ls-files | sed 's/^/# New file: /' - echo "#" -elif [ -f "$GIT_DIR/MERGE_HEAD" ]; then - echo "#" - echo "# It looks like your may be committing a MERGE." - echo "# If this is not correct, please remove the file" - echo "# $GIT_DIR/MERGE_HEAD" - echo "# and try again" - echo "#" -fi >.editmsg if test "$log_message" != '' then echo "$log_message" @@ -144,7 +129,25 @@ then elif test "$use_commit" != "" then git-cat-file commit "$use_commit" | sed -e '1,/^$/d' -fi | git-stripspace >>.editmsg +fi | git-stripspace >.editmsg + +case "$signoff" in +t) + git-var GIT_COMMITTER_IDENT | sed -e ' + s/>.*/>/ + s/^/Signed-off-by: / + ' >>.editmsg + ;; +esac + +if [ -f "$GIT_DIR/MERGE_HEAD" ]; then + echo "#" + echo "# It looks like your may be committing a MERGE." + echo "# If this is not correct, please remove the file" + echo "# $GIT_DIR/MERGE_HEAD" + echo "# and try again" + echo "#" +fi >>.editmsg PARENTS="-p HEAD" if [ ! -r "$GIT_DIR/HEAD" ]; then @@ -186,16 +189,8 @@ else export GIT_AUTHOR_EMAIL export GIT_AUTHOR_DATE fi - case "$signoff" in - t) - git-var GIT_COMMITTER_IDENT | sed -e ' - s/>.*/>/ - s/^/Signed-off-by: / - ' >>.editmsg - ;; - esac - git-status-script >>.editmsg fi +git-status-script >>.editmsg if [ "$?" != "0" -a ! -f $GIT_DIR/MERGE_HEAD ] then rm -f .editmsg