Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-08-19 09:07:57 +0400
committerJunio C Hamano <gitster@pobox.com>2011-08-19 09:07:57 +0400
commitbeace29a0437068a36bc5963d905fac482724196 (patch)
treeab6c9dbb2e883e33e513b762cb1e9850b206b7f8 /git-am.sh
parentd8308c79fc2cae2d1891f92b9e0f9ec0361fe7df (diff)
parent0e8341f29d6541f661cc52f27f96877c0fd469c2 (diff)
Merge branch 'db/am-skip-blank-at-the-beginning'
* db/am-skip-blank-at-the-beginning: am: ignore leading whitespace before patch
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 57150eb7ba..b2c4b2b853 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -197,10 +197,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