Commit 2e6e3e8
git-am: cope better with an empty Subject: line
When the Subject: line is empty for whatever reason, git-am was fooled by
it and left an empty line at the beginning of the resulting commit log
message.
This moves the logic around so that we do not keep $SUBJECT in a separate
variable. Instead, $dotest/msg-clean, which used to be the log message
body extracted from the message and then trailing whitespaces cleansed
out, now contains the subject line followed by a blank line at the
beginning for normal messages, and we use the first line from the file as
the summary line throughout the program.
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 6a28518 commit 2e6e3e8
1 file changed
+10
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | 120 | | |
125 | 121 | | |
126 | 122 | | |
| |||
303 | 299 | | |
304 | 300 | | |
305 | 301 | | |
306 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | 322 | | |
326 | 323 | | |
327 | 324 | | |
| |||
340 | 337 | | |
341 | 338 | | |
342 | 339 | | |
343 | | - | |
344 | 340 | | |
345 | 341 | | |
346 | | - | |
347 | 342 | | |
348 | 343 | | |
349 | 344 | | |
| |||
360 | 355 | | |
361 | 356 | | |
362 | 357 | | |
| 358 | + | |
363 | 359 | | |
364 | 360 | | |
365 | 361 | | |
| |||
380 | 376 | | |
381 | 377 | | |
382 | 378 | | |
383 | | - | |
| 379 | + | |
384 | 380 | | |
385 | 381 | | |
386 | 382 | | |
| |||
403 | 399 | | |
404 | 400 | | |
405 | 401 | | |
406 | | - | |
| 402 | + | |
407 | 403 | | |
408 | 404 | | |
409 | 405 | | |
| |||
461 | 457 | | |
462 | 458 | | |
463 | 459 | | |
464 | | - | |
| 460 | + | |
465 | 461 | | |
466 | 462 | | |
467 | 463 | | |
| |||
0 commit comments