From: Brandon Casey Date: Wed, 11 Jun 2008 21:28:45 GMT Subject: [PATCH 1/2] git-reflog: add new option '--exclude=' to expire subcommand Message-ID: This new option will allow refs to be specified which will be skipped when expiring, i.e. they will not be expired. Currently it is convenient to use the '--all' option to operate on _all_ reflogs. In some cases it may be convenient to operate on _all_ reflogs except one or two or ... The primary motivation behind this option is to allow git-gc to exclude refs/stash when calling git-reflog to expire reflogs. Signed-off-by: Brandon Casey --- I had one reservation against using --exclude= as the option name and that is that --exclude= is generally used with a glob. In the future this can easily be extended to accept a glob, and may be necessary depending on how per-branch stashes are implemented. For now it is not necessary (for me). -brandon Documentation/git-reflog.txt | 5 +++++ builtin-reflog.c | 27 ++++++++++++++++++++++++--- t/t1410-reflog.sh | 16 +++++++++++++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/Documentation/git-reflog.txt b/Documentation/git-reflog.txt index 8492aea..d1c4a14 100644 --- a/Documentation/git-reflog.txt +++ b/Documentation/git-reflog.txt @@ -65,6 +65,11 @@ should not have to ever worry about missing objects, because the current prune and pack-objects know about reflogs and protect objects referred by them. +--exclude=:: + When expiring, do not operate on the reflog of the named ref. + This option may be used multiple times to exclude more than one ref. + This is not a glob, it is a ref name such as `stash` or `refs/stash`. + --expire=