From c48be8b759725d7c9ce327ac6f32bb572fdc5ce1 Mon Sep 17 00:00:00 2001
From: Michael Haggerty <mhagger@alum.mit.edu>
Date: Mon, 27 Feb 2012 19:34:09 +0100
Subject: [PATCH 1/5] post-receive-email: remove unused variable

prep_for_email neither is passed a fourth argument nor uses it.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/hooks/post-receive-email | 1 -
 1 file changed, 1 deletion(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index ba077c13f96..ac2e0ed31bf 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -85,7 +85,6 @@ prep_for_email()
 	oldrev=$(git rev-parse $1)
 	newrev=$(git rev-parse $2)
 	refname="$3"
-	maxlines=$4
 
 	# --- Interpret
 	# 0000->1234 (create)

From 64baa4153b836646ecf6885482f4fc46e04a90db Mon Sep 17 00:00:00 2001
From: Michael Haggerty <mhagger@alum.mit.edu>
Date: Mon, 27 Feb 2012 19:34:10 +0100
Subject: [PATCH 2/5] post-receive-email: match up $LOGBEGIN..$LOGEND pairs
 correctly

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 contrib/hooks/post-receive-email | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index ac2e0ed31bf..01af9df15e1 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -460,7 +460,7 @@ generate_delete_branch_email()
 {
 	echo "       was  $oldrev"
 	echo ""
-	echo $LOGEND
+	echo $LOGBEGIN
 	git show -s --pretty=oneline $oldrev
 	echo $LOGEND
 }
@@ -560,7 +560,7 @@ generate_delete_atag_email()
 {
 	echo "       was  $oldrev"
 	echo ""
-	echo $LOGEND
+	echo $LOGBEGIN
 	git show -s --pretty=oneline $oldrev
 	echo $LOGEND
 }
@@ -625,7 +625,7 @@ generate_delete_general_email()
 {
 	echo "       was  $oldrev"
 	echo ""
-	echo $LOGEND
+	echo $LOGBEGIN
 	git show -s --pretty=oneline $oldrev
 	echo $LOGEND
 }

From 48f359bfafa7db4c399fa13f17ccfea7c35f333b Mon Sep 17 00:00:00 2001
From: Tim Henigan <tim.henigan@gmail.com>
Date: Fri, 24 Feb 2012 18:12:57 -0500
Subject: [PATCH 3/5] CodingGuidelines: Add a note about spaces after
 redirection

During code review of some patches, it was noted that redirection operators
should have space before, but no space after them.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/CodingGuidelines | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index 483008699f9..cfe3785909a 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -35,6 +35,13 @@ For shell scripts specifically (not exhaustive):
 
  - Case arms are indented at the same depth as case and esac lines.
 
+ - Redirection operators should be written with space before, but no
+   space after them.  In other words, write 'echo test >"$file"'
+   instead of 'echo test> $file' or 'echo test > $file'.  Note that
+   even though it is not required by POSIX to double-quote the
+   redirection target in a variable (as shown above), our code does so
+   because some versions of bash issue a warning without the quotes.
+
  - We prefer $( ... ) for command substitution; unlike ``, it
    properly nests.  It should have been the way Bourne spelled
    it from day one, but unfortunately isn't.

From 860f70f9f4206379361fd5af84c8fde31984b418 Mon Sep 17 00:00:00 2001
From: Tim Henigan <tim.henigan@gmail.com>
Date: Fri, 24 Feb 2012 18:12:58 -0500
Subject: [PATCH 4/5] CodingGuidelines: do not use 'which' in shell scripts

During the code review of a recent patch, it was noted that shell scripts
must not use 'which $cmd' to check the availability of the command $cmd.
The output of the command is not machine parseable and its exit code is
not reliable across platforms.

It is better to use 'type' to accomplish this task.

Signed-off-by: Tim Henigan <tim.henigan@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/CodingGuidelines | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines
index cfe3785909a..45577117c2a 100644
--- a/Documentation/CodingGuidelines
+++ b/Documentation/CodingGuidelines
@@ -46,6 +46,11 @@ For shell scripts specifically (not exhaustive):
    properly nests.  It should have been the way Bourne spelled
    it from day one, but unfortunately isn't.
 
+ - If you want to find out if a command is available on the user's
+   $PATH, you should use 'type <command>', instead of 'which <command>'.
+   The output of 'which' is not machine parseable and its exit code
+   is not reliable across platforms.
+
  - We use POSIX compliant parameter substitutions and avoid bashisms;
    namely:
 

From b0fa280751a8a3e7cee093a7fdc3656490abf984 Mon Sep 17 00:00:00 2001
From: Junio C Hamano <gitster@pobox.com>
Date: Mon, 27 Feb 2012 15:36:08 -0800
Subject: [PATCH 5/5] Update draft release notes to 1.7.9.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Documentation/RelNotes/1.7.9.3.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/RelNotes/1.7.9.3.txt b/Documentation/RelNotes/1.7.9.3.txt
index 1d03fd10c00..d7be177681f 100644
--- a/Documentation/RelNotes/1.7.9.3.txt
+++ b/Documentation/RelNotes/1.7.9.3.txt
@@ -14,4 +14,11 @@ Fixes since v1.7.9.2
  * "git add --refresh <pathspec>" used to warn about unmerged paths
    outside the given pathspec.
 
+ * The commit log template given with "git merge --edit" did not have
+   a short instructive text like what "git commit" gives.
+
+ * "gitweb" used to drop warnings in the log file when "heads" view is
+   accessed in a repository whose HEAD does not point at a valid
+   branch.
+
 Also contains minor fixes and documentation updates.