git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: "Abimbola via GitGitGadget" <gitgitgadget@gmail.com>,
	git@vger.kernel.org, Abimbola Olaitan <craftwordltd@gmail.com>
Subject: Re: [PATCH 1/5] remove-annotate: change cmd_annotate to cmd_blame
Date: Mon, 04 Nov 2019 13:04:17 +0900	[thread overview]
Message-ID: <xmqqy2wwz3r2.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <86tv7khgtf.fsf@gmail.com> (Jakub Narebski's message of "Sun, 03 Nov 2019 20:59:24 +0100")

Jakub Narebski <jnareb@gmail.com> writes:

> "Abimbola via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> Subject: Re: [PATCH 1/5] remove-annotate: change cmd_annotate to cmd_blame
>> From: Abimbola <craftwordltd@gmail.com>
>>
>> Changing this command is to remove the annotate.c file which does almost
>> the same thing as blame.c. git annotate will invoke blame directly
>
> Both the summary and the detailed description of the changes is not
> entirely clean.  What is this 'remove-annotate' subsystem?  Why we would
> want to change cmd_annotate to cmd_blame -- and wouldn't we loose
> difference (in defaults, and thus in output format) between git-blame
> and git-annotate?
>
>>
>> Signed-off-by: Abimbola <craftwordltd@gmail.com>
>
> Why not
>
>   Signed-off-by: Abimbola Olaitan <craftwordltd@gmail.com>
>
>> ---
>>  git.c | 143 +++++++++++++++++++++++++++++++++-------------------------
>>  1 file changed, 82 insertions(+), 61 deletions(-)
>
> Looks like a big change, strangely.  And annotate.c is not actually
> deleted...

Thanks for all the good comments.  The first priority of any work in
this area is not to lose the different defaults between "annotate"
and "blame", as the former has ("had", at least when we invented
"blame") known uses in widely used script(s), and the solution we
took was to use a small annotate.c shim to tell the blame machinery
to emit historical "annotate" output format.  If we can do so
without having the shim, that would be OK.  If removal of shim loses
the distinction, then it is not.

I suspect that cmd_blame() can be taught to look at argv[0] and
pretend "-c" was given on the command line, and then the command
dispatch table can call cmd_blame() upon seeing "annotate" as the
subcommand name, but I haven't actually tried it so there may be
hidden dragons.

Thanks.

  reply	other threads:[~2019-11-04  4:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-03  3:51 [PATCH 0/5] Teach git annotate to use parse option instead of its own argv Abimbola Olaitan via GitGitGadget
2019-11-03  3:51 ` [PATCH 1/5] remove-annotate: change cmd_annotate to cmd_blame Abimbola via GitGitGadget
2019-11-03 19:59   ` Jakub Narebski
2019-11-04  4:04     ` Junio C Hamano [this message]
2019-11-03  3:51 ` [PATCH 2/5] edit the makefile Abimbola via GitGitGadget
2019-11-03  3:51 ` [PATCH 3/5] remove-annotate: comment out annotate BUILDIN_OBJS Abimbola via GitGitGadget
2019-11-03  3:51 ` [PATCH 4/5] remove-annotate: delete builtin annotate file Abimbola via GitGitGadget
2019-11-03  3:51 ` [PATCH 5/5] fix unproper comment in Makefile Abimbola via GitGitGadget
2019-11-04  4:13   ` 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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy2wwz3r2.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=craftwordltd@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=jnareb@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).