| 1029 | } |
| 1030 | |
| 1031 | static void copy_reflog_msg(struct strbuf *sb, const char *msg) |
| 1032 | { |
| 1033 | char c; |
| 1034 | int wasspace = 1; |
| 1035 | |
| 1036 | while ((c = *msg++)) { |
| 1037 | if (wasspace && isspace(c)) |
| 1038 | continue; |
| 1039 | wasspace = isspace(c); |
| 1040 | if (wasspace) |
| 1041 | c = ' '; |
| 1042 | strbuf_addch(sb, c); |
| 1043 | } |
| 1044 | strbuf_rtrim(sb); |
| 1045 | } |
| 1046 | |
| 1047 | static char *normalize_reflog_message(const char *msg) |
| 1048 | { |
no test coverage detected