From: Chuck Lever Date: Thu, 1 Dec 2005 02:40:19 +0000 (-0500) Subject: Make "stg export" save the base commit in the output directory X-Git-Tag: v0.8~11 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/6c4e4b6848f4d68aaeebbca4cbd0f544413c8dc1 Make "stg export" save the base commit in the output directory When trying to apply a series of diffs that was exported from an StGIT series, it can be convenient to know exactly which base commit the patches apply to. Save that commit as a comment in the "series" file. Signed-off-by: Chuck Lever --- diff --git a/stgit/commands/export.py b/stgit/commands/export.py index b33c9ea..30b6986 100644 --- a/stgit/commands/export.py +++ b/stgit/commands/export.py @@ -141,6 +141,10 @@ def func(parser, options, args): tmpl = file(patch_tmpl).read() break + # note the base commit for this series + base_commit = crt_series.get_patch(patches[0]).get_bottom() + print >> series, '# This series applies on GIT commit %s' % base_commit + patch_no = 1; for p in patches: pname = p