From: Andreas Ericsson <ae@op5.se>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: "Dmitry V. Levin" <ldv@altlinux.org>, git@vger.kernel.org
Subject: [PATCH] git fetch: Take '-n' to mean '--no-tags'
Date: Thu, 13 Mar 2008 08:13:15 +0100 [thread overview]
Message-ID: <47D8D40B.60409@op5.se> (raw)
In-Reply-To: <47D8CEA6.5040301@op5.se>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Prior to commit 83201998730ac5f0b95ac832f3b727da26ab0129, we
understood '-n' as a short option to mean "don't fetch tags
from the remote". This patch reinstates behaviour similar,
but not identical to the pre commit 832019987 times.
Back then, -n always overrode --tags, so if both --tags and -n
was given on command-line, no tags were fetched regardless of
argument ordering. Now we use a "last entry wins" strategy,
so '-n --tags' means "fetch tags".
Since it's patently absurd to say both --tags and --no-tags
this shouldn't matter in practice.
Spotted-by: Artem Zolochevskiy <azol@altlinux.org>
Reported-by: Dmitry V. Levin <ldv@altlinux.org>
Tested-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Andreas Ericsson wrote:
> Johannes Schindelin wrote:
>>
>> Maybe like this (completely untested, that will be your task tomorrow):
>>
>
> Looks like how I thought it should be. Test passed fine, both real and
> automated. Proper patch incoming in a minute.
>
And here it is.
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 55f611e..b2b9935 100644
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
@@ -40,6 +40,8 @@ static struct option builtin_fetch_options[] = {
"force overwrite of local branch"),
OPT_SET_INT('t', "tags", &tags,
"fetch all tags and associated objects", TAGS_SET),
+ OPT_SET_INT('n', NULL, &tags,
+ "do not fetch all tags (--no-tags)", TAGS_UNSET),
OPT_BOOLEAN('k', "keep", &keep, "keep downloaded pack"),
OPT_BOOLEAN('u', "update-head-ok", &update_head_ok,
"allow updating of HEAD ref"),
--
1.5.4.4.532.ga6828.dirty
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
next prev parent reply other threads:[~2008-03-13 7:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 10:51 I: git-fetch: -n option disappeared but git-fetch(1) still describe it Dmitry V. Levin
2008-03-12 14:52 ` Andreas Ericsson
2008-03-12 16:04 ` Johannes Schindelin
2008-03-12 16:06 ` Andreas Ericsson
2008-03-12 16:11 ` Johannes Schindelin
2008-03-13 6:50 ` Andreas Ericsson
2008-03-13 7:13 ` Andreas Ericsson [this message]
2008-03-13 7:30 ` [PATCH] git fetch: Take '-n' to mean '--no-tags' Junio C Hamano
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=47D8D40B.60409@op5.se \
--to=ae@op5.se \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=ldv@altlinux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.