X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/9f00453e337990a34a432a08340799fe628bd4d2..537ddf3fcbb207659094a19acd83ac7b83d4deb1:/stgit/git.py diff --git a/stgit/git.py b/stgit/git.py index 20c84c8..ae5506b 100644 --- a/stgit/git.py +++ b/stgit/git.py @@ -387,11 +387,11 @@ def status(files = [], modified = False, new = False, deleted = False, def diff(files = [], rev1 = 'HEAD', rev2 = None, out_fd = None): """Show the diff between rev1 and rev2 """ - os.system('git-update-cache --refresh > /dev/null') if rev2: diff_str = _output(['git-diff-tree', '-p', rev1, rev2] + files) else: + os.system('git-update-cache --refresh > /dev/null') diff_str = _output(['git-diff-cache', '-p', rev1] + files) if out_fd: @@ -403,7 +403,6 @@ def diffstat(files = [], rev1 = 'HEAD', rev2 = None): """Return the diffstat between rev1 and rev2 """ - os.system('git-update-cache --refresh > /dev/null') p=popen2.Popen3('git-apply --stat') diff(files, rev1, rev2, p.tochild) p.tochild.close() @@ -415,7 +414,6 @@ def diffstat(files = [], rev1 = 'HEAD', rev2 = None): def files(rev1, rev2): """Return the files modified between rev1 and rev2 """ - os.system('git-update-cache --refresh > /dev/null') str = '' for line in _output_lines('git-diff-tree -r %s %s' % (rev1, rev2)):