From: Junio C Hamano <hidden> Date: 2016-06-15 22:54:49
Jeff King [off-list ref] writes:
quoted hunk
On Tue, Sep 18, 2012 at 09:38:32PM -0700, Junio C Hamano wrote:
quoted
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:
This patch would not hurt existing users very much; blame is an
unlikely thing to run in scripts, and it is easy to remove the
misguided --follow from them.
So I am in general OK with it, but if we are to go that route, we
should make sure that the documentation makes it clear that blame
follows whole-file renames without any special instruction before
doing so. Otherwise, it again will send the same wrong message to
people who try to use the "--follow" from their experience with
"log", no?
This patch would not hurt existing users very much; blame is an
unlikely thing to run in scripts, and it is easy to remove the
misguided --follow from them.
I would not worry about such users. I am of the opinion that their
scripts are buggy for calling a useless and undocumented option that
just happened to not complain.
So I am in general OK with it, but if we are to go that route, we
should make sure that the documentation makes it clear that blame
follows whole-file renames without any special instruction before
doing so. Otherwise, it again will send the same wrong message to
people who try to use the "--follow" from their experience with
"log", no?
I guess it depends on your perspective. I can see the argument that
blame is already doing what --follow would ask for, and thus it is a
no-op. I think of it more as --follow is nonsensical for blame. But I
do not think either is wrong per se, and there is no reason not to help
people who come to git thinking the former. So yes, I think
documentation in either case is probably a good thing.
I am a little lukewarm on my patch if only because of the precedent it
sets. There are a trillion options that revision.c parses that are not
necessarily meaningful or implemented for sub-commands that piggy-back
on its option parser. I'm not sure we want to get into manually
detecting and disallowing each one in every caller.
-Peff
From: Jeff King <hidden> Date: 2016-06-15 22:54:49
On Wed, Sep 19, 2012 at 01:31:50PM -0700, Kevin Ballard wrote:
quoted
I am a little lukewarm on my patch if only because of the precedent it
sets. There are a trillion options that revision.c parses that are not
necessarily meaningful or implemented for sub-commands that piggy-back
on its option parser. I'm not sure we want to get into manually
detecting and disallowing each one in every caller.
I tend to agree with your final sentiment there. But the point that
users may not realize that blame already follows is also valid. Perhaps
we should catch --follow, as in your patch, but instead of saying that
it's an unknown argument, just print out a helpful message saying blame
already follows renames (and then continue with the blame anyway, so
as to not set a precedent to abort on unknown-but-currently-accepted
flags).
Sure, that would probably make sense. Care to roll a patch with
suggested wording?
-Peff
From: Kevin Ballard <hidden> Date: 2016-06-15 22:54:49
On Sep 19, 2012, at 1:37 PM, Jeff King [off-list ref] wrote:
On Wed, Sep 19, 2012 at 01:31:50PM -0700, Kevin Ballard wrote:
quoted
quoted
I am a little lukewarm on my patch if only because of the precedent it
sets. There are a trillion options that revision.c parses that are not
necessarily meaningful or implemented for sub-commands that piggy-back
on its option parser. I'm not sure we want to get into manually
detecting and disallowing each one in every caller.
I tend to agree with your final sentiment there. But the point that
users may not realize that blame already follows is also valid. Perhaps
we should catch --follow, as in your patch, but instead of saying that
it's an unknown argument, just print out a helpful message saying blame
already follows renames (and then continue with the blame anyway, so
as to not set a precedent to abort on unknown-but-currently-accepted
flags).
Sure, that would probably make sense. Care to roll a patch with
suggested wording?
Sadly, no. I'm not in a position to contribute to GPL code anymore, based
on my current job (I'd have to jump through some hoops to get the ok
to expose myself to that potential legal liability).
-Kevin
From: Kevin Ballard <hidden> Date: 2016-06-15 22:54:49
On Sep 19, 2012, at 12:42 PM, Jeff King [off-list ref] wrote:
quoted
So I am in general OK with it, but if we are to go that route, we
should make sure that the documentation makes it clear that blame
follows whole-file renames without any special instruction before
doing so. Otherwise, it again will send the same wrong message to
people who try to use the "--follow" from their experience with
"log", no?
I guess it depends on your perspective. I can see the argument that
blame is already doing what --follow would ask for, and thus it is a
no-op. I think of it more as --follow is nonsensical for blame. But I
do not think either is wrong per se, and there is no reason not to help
people who come to git thinking the former. So yes, I think
documentation in either case is probably a good thing.
I am a little lukewarm on my patch if only because of the precedent it
sets. There are a trillion options that revision.c parses that are not
necessarily meaningful or implemented for sub-commands that piggy-back
on its option parser. I'm not sure we want to get into manually
detecting and disallowing each one in every caller.
I tend to agree with your final sentiment there. But the point that
users may not realize that blame already follows is also valid. Perhaps
we should catch --follow, as in your patch, but instead of saying that
it's an unknown argument, just print out a helpful message saying blame
already follows renames (and then continue with the blame anyway, so
as to not set a precedent to abort on unknown-but-currently-accepted
flags).
-Kevin