git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Parth Gala <parthpgala@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>, chriscool@tuxfamily.org
Subject: Re: [GSoC Project RFC] "git log --oneline" improvements
Date: Sat, 21 Mar 2020 15:37:03 -0700	[thread overview]
Message-ID: <xmqqh7yh8hdc.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <a67e0d2e-5bcd-8ac7-648e-51c1dc0f72ef@gmail.com> (Parth Gala's message of "Sun, 22 Mar 2020 03:35:14 +0530")

Parth Gala <parthpgala@gmail.com> writes:

>>>    |   === 2015-09-04 ===
>>>    | * 27ea6f85 10:46 jch (tag: v2.5.2) Git 2.5.2
>>>    * 74b67638 10:36 jch (tag: v2.4.9) Git 2.4.9
>>>                         ..........
>>>    * ecad27cf 10:32 jch (tag: v2.3.9) Git 2.3.9
>>>
>>> So these are the two main formats to be enhanced along with as many options
>>> of log as possible. What are your views on this ?
>>>
>> Making the "--oneline" format to consume more than one line for a
>> commit is probably not what we want anyway.
>
> For this format can we build a new option say `--time` or `--log-time`(duh!)

Making such an option orthogonal to the base formats (i.e.
"--decorate" is usable with "--pretty=short", "--pretty=fuller",
"--oneline", etc.---note that this is not meant to be exhaustive)
would be a good idea.  I do not think of any reason why your
"--group-by-same-date" cannot be combined with some of these formats.

It is reasonable to combine it with "--format="%h %s", for that
matter, because the "--group-by-same-date" is not about showing any
particular commit but inserting something that does *not* belong to
any particular commit in between.  Just like "--graph" can be
combined with many formats, showing group separators in between the
stream of commits would mix well with any format, I would say.

By using the idea Peff shown, before starting to emit one commit (in
any format), you would show a single line of "== YYYY-MM-DD ==" if
the commit is from a date different from the one that was shown
last.  It would naturally extend to "--group-by-same-month", etc.,
so you'd want to be prepared for such future.  Your patch does *not*
have to implement such variations like grouping by month, season or
year.  But a developer with a good taste would prepare the code in
such a way that is easy to modify to extend the support for such
variations by future developers.

Also remember there are two timestamps, and depending on the use
case, people want to see author dates or committer dates.

Thanks.

      reply	other threads:[~2020-03-21 22:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 23:11 [GSoC Project RFC] "git log --oneline" improvements Parth Gala
2020-03-20 23:36 ` Junio C Hamano
2020-03-21 22:05   ` Parth Gala
2020-03-21 22:37     ` Junio C Hamano [this message]

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=xmqqh7yh8hdc.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=parthpgala@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).