git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH v2 6/6] describe --contains: use "name-rev --weight"
Date: Wed, 29 Aug 2012 20:50:29 -0700	[thread overview]
Message-ID: <1346298629-13730-7-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1346298629-13730-1-git-send-email-gitster@pobox.com>

And this is the logical conclusion of the series, to
allow 0136db586c in the kernel history to be described
as v3.5-rc1~83^2~81^2~76, not as v3.6-rc1~59^2~56^2~76.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/describe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/builtin/describe.c b/builtin/describe.c
index 9f63067..fbd5be5 100644
--- a/builtin/describe.c
+++ b/builtin/describe.c
@@ -436,11 +436,12 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
 		die(_("--long is incompatible with --abbrev=0"));
 
 	if (contains) {
-		const char **args = xmalloc((7 + argc) * sizeof(char *));
+		const char **args = xmalloc((8 + argc) * sizeof(char *));
 		int i = 0;
 		args[i++] = "name-rev";
 		args[i++] = "--name-only";
 		args[i++] = "--no-undefined";
+		args[i++] = "--weight";
 		if (always)
 			args[i++] = "--always";
 		if (!all) {
-- 
1.7.12.286.g9df01f7

      parent reply	other threads:[~2012-08-30  3:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-30  3:50 [PATCH v2 0/6] describe --contains / name-rev --weight Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 1/6] name-rev: lose unnecessary typedef Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 2/6] name_rev: clarify the logic to assign a new tip-name to a commit Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 3/6] name-rev: --weight option Junio C Hamano
2012-09-04 22:29   ` [PATCH 3.5/6] name-rev --weight: trivial optimization Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 4/6] name-rev --weight: cache the computed weight in notes Junio C Hamano
2012-08-30  3:50 ` [PATCH v2 5/6] name-rev --weight: tests and documentation Junio C Hamano
2012-08-30  3:50 ` Junio C Hamano [this message]

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=1346298629-13730-7-git-send-email-gitster@pobox.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /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).