[PATCH] --walk-reflogs: disallow uninteresting commits
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 20, 2007, 02:28 UTC
- Message-ID
- <Pine.LNX.4.63.0701200325380.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7v4pqmbhzg.fsf@assigned-by-dhcp.cox.net>
Do not allow uninteresting commits with --walk-reflogs, since it is not clear what should be shown in these cases:
$ git log --walk-reflogs master..next $ git log --walk-reflogs ^master
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> ---
On Fri, 19 Jan 2007, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > > > How about failing if there are _uninteresting_ commits? So, > > > > git log --walk-reflogs next master > > > > still works? > > That feels like a good way to deal with it.
Here you are.
> I think people may also appreciate timestamps on Reflog headers > you add to the output.
At the moment, if you ask for @{1} (or leave it out), you will see
them enumerated by number. If you ask for @{now}, you will see
them identified by date...reflog-walk.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/reflog-walk.c b/reflog-walk.c index d4b49c7..2d97411 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -145,6 +145,9 @@ void add_reflog_for_walk(struct reflog_walk_info *info, char *branch, *at = strchr(name, '@'); struct commit_reflog *commit_reflog; + if (commit->object.flags & UNINTERESTING) + die ("Cannot walk reflogs for %s", name); + branch = xstrdup(name); if (at && at[1] == '{') { char *ep;
-- 1.5.0.rc1.g5a400-dirty