Files
rtk-ai__rtk/tests/fixtures/diff/git_diff_submodule_dirty_raw.txt
kylehgc 613e78558d fix(diff): round 4 -- fact-arm names, dirty submodules, no-prefix renames, quoted paths
Review round 3 on the file-level-fact arms, plus a cold pass on top:

- `Only in <dir>: <file>` splits on the FIRST `: ` (GNU diff's separator
  follows the directory; a filename may carry its own).
- Standalone `Binary files X and Y differ` splits at the ` and ` where
  both sides agree past their first component, so a filename containing
  ` and ` is not cut, and is named through `header_name` so the `a/`/`b/`
  strip follows the same decision as a header pair.
- `* Unmerged path X` folds into the section git emits for X right after
  it: one `[file] X (unmerged) (+A -B)` entry instead of two.
- `Submodule <path> <a>..<b>` keeps only the path in the name slot (the
  tokens before the LAST `..` token, so a path containing `..` survives),
  and the sha-less `Submodule <path> contains ... content` dirty line is a
  fact too -- it used to be dropped silently beside a condensed sibling.
  Real fixture `git_diff_submodule_dirty_raw.txt` joins the corpus.
- `rename to` / `copy to` is git's exact path; the `+++` pair no longer
  re-derives it, which stripped a real `b/` directory under `--no-prefix`.
- `core.quotepath` wraps non-ASCII paths in quotes on every header line;
  names are dequoted before the prefix strip.
- The header-pair hunk gate applies to open hunkless sections as well:
  git only emits `---`/`+++` before the first `@@`, so a stray pair there
  is lost content and falls back raw instead of renaming the section.
- `diff --cc X` carries one path and leaves `prefixed` to its header pair.
- `past_diffstat` comment states the first-section-mangled shape it alone
  catches; the ` name | 3` bound says it fires always (the `---` separator
  is the marked line that follows); the stdin doc says the never-worse
  check is inlined and why.

A/B against 9106d48: 400 `git show` streams byte-identical; 290
format-patch series identical except 12 that fell back raw through a
prose pipe and now condense, zero new fallbacks.
2026-09-01 22:07:55 -04:00

10 lines
170 B
Plaintext

diff --git a/other.txt b/other.txt
index a484ea0..c39414d 100644
--- a/other.txt
+++ b/other.txt
@@ -1,2 +1,3 @@
keep
new
+more
Submodule sub contains modified content