chiark / gitweb /
tg-patch: add support for generating patches against worktree and index
This implements `tg patch -i` and `tg patch -w` to see current patch as
generated against not-yet-committed index and worktree.
NOTE: unfortunately `git cat-file blob <file>` does not provide an option
to cat file from worktree (only from an object or from index), so I had to
unroll my own `cat file topic:file` with special support for '(i)' and
'(w)' topics.
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>