From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasushi SHOJI Subject: [PATCH] describe: Add unlisted option Date: Mon, 23 Jul 2007 15:24:37 +0900 Message-ID: <87sl7fmyca.wl@mail2.atmark-techno.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Mon Jul 23 08:45:45 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1ICrfn-0003yt-S2 for gcvg-git@gmane.org; Mon, 23 Jul 2007 08:45:40 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755701AbXGWGpf (ORCPT ); Mon, 23 Jul 2007 02:45:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757926AbXGWGpf (ORCPT ); Mon, 23 Jul 2007 02:45:35 -0400 Received: from mail2.atmark-techno.com ([210.191.215.173]:38591 "EHLO mail2.atmark-techno.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754937AbXGWGpe (ORCPT ); Mon, 23 Jul 2007 02:45:34 -0400 Received: from wat.atmark-techno.com.atmark-techno.com (dns1.atmark-techno.com [210.191.215.170]) by mail2.atmark-techno.com (Postfix) with ESMTP id 64415547D7; Mon, 23 Jul 2007 15:24:37 +0900 (JST) User-Agent: Wanderlust/2.14.0 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: added unlisted options, --contains, --candidates and --debug, to usage line. also, prints some info when --contains and --debug are given. --- Documentation/git-describe.txt | 4 +++- builtin-describe.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt index ac23e28..f0bcb61 100644 --- a/Documentation/git-describe.txt +++ b/Documentation/git-describe.txt @@ -8,7 +8,9 @@ git-describe - Show the most recent tag that is reachable from a commit SYNOPSIS -------- -'git-describe' [--all] [--tags] [--contains] [--abbrev=] ... +'git-describe' [--all] [--tags] [--contains] [--abbrev=] + [--candidates=] [--debug] + ... DESCRIPTION ----------- diff --git a/builtin-describe.c b/builtin-describe.c index 669110c..e94f867 100644 --- a/builtin-describe.c +++ b/builtin-describe.c @@ -9,7 +9,7 @@ #define MAX_TAGS (FLAG_BITS - 1) static const char describe_usage[] = -"git-describe [--all] [--tags] [--abbrev=] *"; +"git-describe [--all] [--tags] [--contains] [--abbrev=] [--candidates] [--debug] *"; static int debug; /* Display lots of verbose info */ static int all; /* Default to annotated tags only */ @@ -283,6 +283,9 @@ int cmd_describe(int argc, const char **argv, const char *prefix) args[2] = "--tags"; memcpy(args + 3, argv + i, (argc - i) * sizeof(char*)); args[3 + argc - i] = NULL; + if (debug) + fprintf(stderr, "redirecting to \"git name-rev\"; " + "no searching strategy will be printed\n"); return cmd_name_rev(3 + argc - i, args, prefix); } -- 1.5.3.rc2.4.g726f9