diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-10-30 20:07:08 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-10-30 20:07:08 -0700 |
| commit | 97d484bea211f6d16c52d153ae02ea7a42668330 (patch) | |
| tree | 311122e566c95ac35f43a868f44250b4f99298f9 /commit.c | |
| parent | Merge branch 'ak/bisect-reset-to-switch' (diff) | |
| parent | info/grafts: allow trailing whitespaces at the end of line (diff) | |
| download | git-97d484bea211f6d16c52d153ae02ea7a42668330.tar.gz git-97d484bea211f6d16c52d153ae02ea7a42668330.zip | |
Merge branch 'jc/maint-1.6.3-graft-trailing-space'
* jc/maint-1.6.3-graft-trailing-space:
info/grafts: allow trailing whitespaces at the end of line
Diffstat (limited to 'commit.c')
| -rw-r--r-- | commit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -132,8 +132,8 @@ struct commit_graft *read_graft_line(char *buf, int len) int i; struct commit_graft *graft = NULL; - if (buf[len-1] == '\n') - buf[--len] = 0; + while (len && isspace(buf[len-1])) + buf[--len] = '\0'; if (buf[0] == '#' || buf[0] == '\0') return NULL; if ((len + 1) % 41) { |
