summaryrefslogtreecommitdiff
path: root/git-am.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/git-am.sh b/git-am.sh
index 463c741dfc..c8422dbe6e 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -196,10 +196,15 @@ check_patch_format () {
return 0
fi
- # otherwise, check the first few lines of the first patch to try
- # to detect its format
+ # otherwise, check the first few non-blank lines of the first
+ # patch to try to detect its format
{
- read l1
+ # Start from first line containing non-whitespace
+ l1=
+ while test -z "$l1"
+ do
+ read l1
+ done
read l2
read l3
case "$l1" in