summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-12 13:24:48 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-12 13:24:48 -0700
commit02376287ffd8b37ea7622fd4b61d654855112e75 (patch)
tree012240009f9afed51301c938dae22c95ce3e72c7 /commit.c
parent72c159f642a33255b76fff512f2a8c3aff9f5dca (diff)
parent3103c005207f0840782804b9387b3a831005bb9c (diff)
downloadgit-02376287ffd8b37ea7622fd4b61d654855112e75.tar.gz
Merge branch 'jc/combine' into next
* jc/combine: stripspace: make sure not to leave an incomplete line. git-commit: do not muck with commit message when no_edit is set. When showing a commit message, do not lose an incomplete line. Retire t5501-old-fetch-and-upload test. combine-diff: type fix.
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/commit.c b/commit.c
index d534c9ba58..c7bb8dba64 100644
--- a/commit.c
+++ b/commit.c
@@ -400,11 +400,11 @@ static int get_one_line(const char *msg, unsigned long len)
while (len--) {
char c = *msg++;
+ if (!c)
+ break;
ret++;
if (c == '\n')
break;
- if (!c)
- return 0;
}
return ret;
}