git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Drew Northup <n1xim.email@gmail.com>,
	gitList <git@vger.kernel.org>,
	Matthieu.Moy@imag.fr, andy@aeruder.net, chriscool@tuxfamily.org,
	dmellor@whistlingcat.com, dpmcgee@gmail.com, fonseca@diku.dk,
	freku045@student.liu.se, kevin@sb.org, marius@trolltech.com,
	namhyung@gmail.com, rene.scharfe@lsrfire.ath.cx, s-beyer@gmx.net,
	trast@inf.ethz.ch
Subject: Re: [PATCH] Documentation/git-blame.txt: --follow is a NO-OP
Date: Wed, 19 Sep 2012 14:27:15 -0400	[thread overview]
Message-ID: <20120919182715.GF11699@sigill.intra.peff.net> (raw)
In-Reply-To: <7v627aiq47.fsf@alter.siamese.dyndns.org>

On Tue, Sep 18, 2012 at 09:38:32PM -0700, Junio C Hamano wrote:

> That is a totally wrong message to send.  You failed to teach the
> reader that there is no need to do anything special to tell the
> command to follow per-line origin across renames.
> 
> So if anything, I would phrase it this way instead:
> 
>     --follow::
>           This option is accepted but silently ignored.  "git blame"
> 	  follows per-line origin across renames without any special
> 	  options, and there is no reason to use this option.

I think that is much better than Drew's text. But I really wonder if the
right solution is to simply disallow --follow. It does not do anything,
and it is not documented. There is no special reason to think that it
would do anything, except by people who try it. So perhaps that is the
right time to say "no, this is not a valid option".

Like this (totally untested) patch:

diff --git a/builtin/blame.c b/builtin/blame.c
index 0e102bf..412d6dd 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -2365,6 +2365,10 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 			ctx.argv[0] = "--children";
 			reverse = 1;
 		}
+		else if (!strcmp(ctx.argv[0], "--follow")) {
+			error("unknown option `--follow`");
+			usage_with_options(blame_opt_usage, options);
+		}
 		parse_revision_opt(&revs, &ctx, options, blame_opt_usage);
 	}
 parse_done:

-Peff

  reply	other threads:[~2012-09-19 18:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06  7:02 git blame --follow norbert.nemec
2012-09-06  9:58 ` Jeff King
2012-09-06 10:12   ` norbert.nemec
2012-09-06 15:13     ` Jeff King
2012-09-19  2:48       ` [PATCH] Documentation/git-blame.txt: --follow is a NO-OP Drew Northup
2012-09-19  4:38         ` Junio C Hamano
2012-09-19 18:27           ` Jeff King [this message]
2012-09-19 19:36             ` Junio C Hamano
2012-09-19 19:42               ` Jeff King
2012-09-19 20:31                 ` Kevin Ballard
2012-09-19 20:37                   ` Jeff King
2012-09-19 21:09                     ` Kevin Ballard
2012-09-21 19:09                     ` Re* " Junio C Hamano
2012-09-21 21:00                       ` Junio C Hamano
2012-09-20  0:05                 ` 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=20120919182715.GF11699@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@imag.fr \
    --cc=andy@aeruder.net \
    --cc=chriscool@tuxfamily.org \
    --cc=dmellor@whistlingcat.com \
    --cc=dpmcgee@gmail.com \
    --cc=fonseca@diku.dk \
    --cc=freku045@student.liu.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=kevin@sb.org \
    --cc=marius@trolltech.com \
    --cc=n1xim.email@gmail.com \
    --cc=namhyung@gmail.com \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=s-beyer@gmx.net \
    --cc=trast@inf.ethz.ch \
    /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).