Problem: git quotes filenames containing spaces, unicode, or special
characters (e.g. M "path with spaces/file.lua"). parse_file_line
passed the quotes through, causing file-not-found on diff operations.
Solution: add unquote() helper that strips surrounding quotes and
unescapes \\, \", \n, \t, and octal \NNN sequences. Apply it to both
filename returns in parse_file_line.
When pressing `du`/`dU` from a hunk line in the fugitive status buffer
(after expanding with `=`), the unified diff now opens at the
corresponding line instead of line 1.
Implementation:
- `fugitive.get_hunk_position()` returns @@ header and offset when on a hunk line
- `commands.find_hunk_line()` finds matching @@ header in diff buffer
- `commands.gdiff_file()` accepts optional `hunk_position` and jumps after opening
Also updates @phanen's README credit for the previous two fixes.
Closes#65
Parse both old and new filenames from rename lines (R old -> new).
When diffing staged renames, use old filename as base to correctly
show content changes rather than treating the file as entirely new.
Also adds comprehensive tests for filename edge cases:
- Double extensions, hyphens, underscores, dotfiles
- Deep nested paths, complex renames
- Documents known limitation with filenames containing ' -> '
Section headers (Staged/Unstaged) now show all diffs in that section,
matching fugitive's behavior. Untracked files show as all-added diffs.
Deleted files show as all-removed diffs.
Also handles edge cases:
- Empty new/old content for deleted/new files
- Section header detection returns is_header flag