From ed7ec17a15b2f5e6627d5114de90726b69526e42 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 4 Nov 2005 16:05:09 +0000 Subject: [PATCH 1/1] Optimise the export command This patch replaces the call to git_id with patch.get_(top|bottom). Signed-off-by: Catalin Marinas --- stgit/commands/export.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stgit/commands/export.py b/stgit/commands/export.py index 3e318a9..c04ecc5 100644 --- a/stgit/commands/export.py +++ b/stgit/commands/export.py @@ -147,8 +147,8 @@ def func(parser, options, args): patch = crt_series.get_patch(p) tmpl_dict = {'description': patch.get_description().rstrip(), - 'diffstat': git.diffstat(rev1 = git_id('%s/bottom' % p), - rev2 = git_id('%s/top' % p)), + 'diffstat': git.diffstat(rev1 = patch.get_bottom(), + rev2 = patch.get_top()), 'authname': patch.get_authname(), 'authemail': patch.get_authemail(), 'authdate': patch.get_authdate(), @@ -170,8 +170,8 @@ def func(parser, options, args): f.write(descr) # write the diff - git.diff(rev1 = git_id('%s/bottom' % p), - rev2 = git_id('%s/top' % p), + git.diff(rev1 = patch.get_bottom(), + rev2 = patch.get_top(), out_fd = f) f.close() patch_no += 1 -- 2.11.0