summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-04-12 13:24:04 -0700
committerJunio C Hamano <junkio@cox.net>2006-04-12 13:24:04 -0700
commit3103c005207f0840782804b9387b3a831005bb9c (patch)
tree51d1c31f842c5f56e3dd42eeb9ca0980e716853c /commit.c
parent8bc7574b6332ef45645c6e0917e9d59919b277ef (diff)
parentf4ee3eb68906f079dea45de4f1bbb03d68189eb3 (diff)
downloadgit-3103c005207f0840782804b9387b3a831005bb9c.tar.gz
Merge branch 'master' into jc/combine
* master: 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.
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;
}