Show More
@@ -47,6 +47,9 b' def split(stream):' | |||||
47 | if inheader and line[0] in (' ', '\t'): |
|
47 | if inheader and line[0] in (' ', '\t'): | |
48 | # continuation |
|
48 | # continuation | |
49 | return True |
|
49 | return True | |
|
50 | if line[0] in (' ', '-', '+'): | |||
|
51 | # diff line - don't check for header pattern in there | |||
|
52 | return False | |||
50 | l = line.split(': ', 1) |
|
53 | l = line.split(': ', 1) | |
51 | return len(l) == 2 and ' ' not in l[0] |
|
54 | return len(l) == 2 and ' ' not in l[0] | |
52 |
|
55 |
@@ -474,3 +474,24 b' EOF' | |||||
474 | hg sum |
|
474 | hg sum | |
475 | hg diff --git -c tip |
|
475 | hg diff --git -c tip | |
476 | cd .. |
|
476 | cd .. | |
|
477 | ||||
|
478 | echo '% diff lines looking like headers' | |||
|
479 | hg init difflineslikeheaders | |||
|
480 | cd difflineslikeheaders | |||
|
481 | echo a >a | |||
|
482 | echo b >b | |||
|
483 | echo c >c | |||
|
484 | hg ci -Am1 | |||
|
485 | ||||
|
486 | echo "key: value" >>a | |||
|
487 | echo "key: value" >>b | |||
|
488 | echo "foo" >>c | |||
|
489 | hg ci -m2 | |||
|
490 | ||||
|
491 | hg up -C 0 | |||
|
492 | hg diff --git -c1 >want | |||
|
493 | hg diff -c1 | hg import --no-commit - | |||
|
494 | hg diff --git >have | |||
|
495 | diff want have | |||
|
496 | cd .. | |||
|
497 |
@@ -373,3 +373,9 b' new file mode 100644' | |||||
373 | diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash |
|
373 | diff --git a/src/cmd/gc/mksys.bash b/src/cmd/gc/mksys.bash | |
374 | old mode 100644 |
|
374 | old mode 100644 | |
375 | new mode 100755 |
|
375 | new mode 100755 | |
|
376 | % diff lines looking like headers | |||
|
377 | adding a | |||
|
378 | adding b | |||
|
379 | adding c | |||
|
380 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
381 | applying patch from stdin |
General Comments 0
You need to be logged in to leave comments.
Login now