From: Catalin Marinas <catalin.marinas@arm.com>
To: git@vger.kernel.org, "Karl Hasselström" <kha@treskal.com>
Subject: [StGit PATCH 8/9] Add the log --clear option
Date: Tue, 28 Apr 2009 16:10:20 +0100 [thread overview]
Message-ID: <20090428151020.27261.27456.stgit@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20090428150742.27261.19620.stgit@pc1117.cambridge.arm.com>
This option allows the clearing of the log history which sometimes may
get too large.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
---
stgit/commands/log.py | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/stgit/commands/log.py b/stgit/commands/log.py
index 3370e6c..92aaf0b 100644
--- a/stgit/commands/log.py
+++ b/stgit/commands/log.py
@@ -50,7 +50,9 @@ options = [
opt('-f', '--full', action = 'store_true',
short = 'Show the full commit ids'),
opt('-g', '--graphical', action = 'store_true',
- short = 'Run gitk instead of printing')]
+ short = 'Run gitk instead of printing'),
+ opt('--clear', action = 'store_true',
+ short = 'Clear the log history')]
directory = common.DirectoryHasRepositoryLib()
@@ -76,6 +78,11 @@ def func(parser, options, args):
except KeyError:
out.info('Log is empty')
return
+
+ if options.clear:
+ log.delete_log(stack.repository, stack.name)
+ return
+
stacklog = log.get_log_entry(stack.repository, logref, logcommit)
pathlim = [os.path.join('patches', pn) for pn in patches]
next prev parent reply other threads:[~2009-04-28 15:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 15:09 [StGit PATCH 0/9] Various StGit updates Catalin Marinas
2009-04-28 15:09 ` [StGit PATCH 1/9] Show "Pushing <patch>...done" when pushing a patch Catalin Marinas
2009-04-29 6:04 ` Karl Hasselström
2009-04-28 15:09 ` [StGit PATCH 2/9] Show some progress information when checking for upstream merges Catalin Marinas
2009-04-29 6:07 ` Karl Hasselström
2009-04-28 15:09 ` [StGit PATCH 3/9] Do not sleep after the last patch sent by e-mail Catalin Marinas
2009-04-29 6:13 ` Karl Hasselström
2009-04-28 15:09 ` [StGit PATCH 4/9] Convert 'clone' to the use stgit.lib Catalin Marinas
2009-04-29 6:21 ` Karl Hasselström
2009-05-13 16:10 ` Catalin Marinas
2009-04-28 15:10 ` [StGit PATCH 5/9] Convert 'hide' to the lib infrastructure Catalin Marinas
2009-04-29 6:27 ` Karl Hasselström
2009-05-13 16:08 ` Catalin Marinas
2009-04-28 15:10 ` [StGit PATCH 6/9] Convert 'unhide' " Catalin Marinas
2009-04-29 6:29 ` Karl Hasselström
2009-04-28 15:10 ` [StGit PATCH 7/9] Reinstate the --annotate option for refresh Catalin Marinas
2009-04-29 6:33 ` Karl Hasselström
2009-04-28 15:10 ` Catalin Marinas [this message]
2009-04-29 6:35 ` [StGit PATCH 8/9] Add the log --clear option Karl Hasselström
2009-04-28 15:10 ` [StGit PATCH 9/9] Use the default git colouring scheme rather than specific scripts Catalin Marinas
2009-04-29 6:43 ` Karl Hasselström
2009-04-29 11:48 ` Samuel Tardieu
2009-04-29 11:56 ` Samuel Tardieu
2009-04-29 14:25 ` Karl Hasselström
2009-05-04 12:48 ` Shinya Kuribayashi
2009-05-29 12:22 ` Catalin Marinas
2009-05-30 0:36 ` Shinya Kuribayashi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090428151020.27261.27456.stgit@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
--cc=kha@treskal.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).