git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: git@vger.kernel.org,
	"Dr . Matthias St . Pierre" <Matthias.St.Pierre@ncp-e.com>,
	Stefan Beller <stefanbeller@gmail.com>
Subject: Re: [PATCH v2 1/2] blame: Describe default output format
Date: Wed, 29 Sep 2021 12:11:26 -0700	[thread overview]
Message-ID: <xmqq8rzfdwo1.fsf@gitster.g> (raw)
In-Reply-To: <20210929124935.41917-2-bagasdotme@gmail.com> (Bagas Sanjaya's message of "Wed, 29 Sep 2021 19:49:34 +0700")

Bagas Sanjaya <bagasdotme@gmail.com> writes:

> While there is descriptions for porcelain and incremental output
> formats, the default format isn't described. Describe that format for
> the sake of completeness.

Sounds quite sensible.  It also is sensible to have it before other
formats, as this is what the users will see most often.

> +THE DEFAULT FORMAT
> +------------------
> +
> +When neither `--porcelain` nor `--incremental` option is specified,
> +`git blame` will output inline annotation for each line with:
> +
> +- abbreviated SHA-1 of the commit the line is attributed to;
> +- author name (or author email if `-e` or `--show-email` is specified);
> +- author date; and
> +- line number
> +

We probably would want to conclude the sentence and tell the readers
that they get the contents of the file as well ;-)  Perhaps like...

    `git blame` will output annotation for each line with:

      <<<these things that we list here>>>

    before the contents of the line.

The second and third items may want to see a bit more careful
thought, though.  I think three presentations are possible for them,
i.e. you can:

    . use -s to suppress the author ident part altogether;
    . accept the default to use the name and date as the author ident; or
    . use -e to replace name with email in the author ident.

Given that, it would be easier to explain if you did not split the
author ident as if they are two independent items.  The most concice
description would be:

    - abbreviated object name for the commit the line came from,

    - author ident (usually the name and the date, but see '-e' 
      and '-s' for how these options may affect it),

    - line number

I also thought we might need to also update description for "-s" and
"-e" to clarify what they affect is "author ident" while trying to
come up with the above suggestion, but after re-reading them, I
think the current text we use to describe them is understandable
enough.

Thanks.

  reply	other threads:[~2021-09-29 19:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 12:49 [PATCH v2 0/2] blame: documentation update Bagas Sanjaya
2021-09-29 12:49 ` [PATCH v2 1/2] blame: Describe default output format Bagas Sanjaya
2021-09-29 19:11   ` Junio C Hamano [this message]
2021-09-29 12:49 ` [PATCH v2 2/2] blame: document --color-* options Bagas Sanjaya
2021-09-29 19:15   ` 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=xmqq8rzfdwo1.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Matthias.St.Pierre@ncp-e.com \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=stefanbeller@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).