Let the caller supply the diff text to diffstat()
authorKarl Hasselström <kha@treskal.com>
Sun, 27 Jan 2008 13:31:31 +0000 (14:31 +0100)
committerKarl Hasselström <kha@treskal.com>
Tue, 29 Jan 2008 03:26:13 +0000 (04:26 +0100)
commita45cea156746937c5d2e73c22cbcbf23479b4cfe
tree90f6df439a8b786979a6de59e55d30e982245565
parentc4f073ee7be827cf08965206bea8e37e7b97e53c
Let the caller supply the diff text to diffstat()

Almost all diffstat() callers already have the diff text, so they
might as well pass it to diffstat() instead of letting it recompute
it. In some cases this even makes for a code simplification since the
diff (and thus diffstat) parameters were nontrivial.

Also, diffstat() wasn't as versatile as diff(); for example, it didn't
accept any extra diff options. This patch solves all of those problems
as a side-effect.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/commands/diff.py
stgit/commands/edit.py
stgit/commands/export.py
stgit/commands/files.py
stgit/commands/mail.py
stgit/git.py