From: Catalin Marinas Date: Mon, 16 Jul 2007 22:48:31 +0000 (+0100) Subject: Add the '--expose' option to 'pick' X-Git-Tag: v0.13~8 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/2ff25eb8999966f579141542911c1fd1d53508ff?ds=sidebyside Add the '--expose' option to 'pick' This option is similar to the '-x' one of the git-cherry-pick command (maybe the naming is not really obvious). It appends the imported commit id to the patch log. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/pick.py b/stgit/commands/pick.py index 20ecd02..27fdf9c 100644 --- a/stgit/commands/pick.py +++ b/stgit/commands/pick.py @@ -40,6 +40,9 @@ options = [make_option('-n', '--name', action = 'store_true'), make_option('-p', '--parent', metavar = 'COMMITID', help = 'use COMMITID as parent'), + make_option('-x', '--expose', + help = 'append the imported commit id to the patch log', + action = 'store_true'), make_option('--fold', help = 'fold the commit object into the current patch', action = 'store_true'), @@ -111,6 +114,8 @@ def func(parser, options, args): out.done() else: message = commit.get_log() + if options.expose: + message += '(imported from commit %s)\n' % commit.get_id_hash() author_name, author_email, author_date = \ name_email_date(commit.get_author())