All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: Arjun Sreedharan <arjun024@gmail.com>,
	Philip Oakley <philipoakley@iee.org>, Git <git@vger.kernel.org>
Subject: Re: [PATCH] introduce git root
Date: Sun, 30 Nov 2014 19:04:04 -0800	[thread overview]
Message-ID: <xmqqd284rryz.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <vpqoaro99xd.fsf@anie.imag.fr> (Matthieu Moy's message of "Sun, 30 Nov 2014 12:58:54 +0100")

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> ... git rev-parse --show-toplevel is not just long,
> it's just not the place where people would look for (it's neither about
> revision nor about parsing, so clearly, "rev-parse" is not a good place
> to host the feature in the UI).

For the record, "rev-parse" is not about revisions in the first
place.  It started purely as a helper to implement "git log" in
terms of "git rev-list" piped to "git diff-tree --stdin", which
requires you to sift a command line argument list given to such
a scripted "git log" into those to be passed to "rev-list" (i.e.
primarily revision ranges) and those to be passed to "diff-tree"
(i.e. primarily diff options and pathspecs).

Various subcommands "rev-parse" takes such as --show-git-dir were
added only because there wasn't any single best "kitchen sink"
command to tuck such a small feature that do not deserve a
standalone command (e.g. "git root", which makes it sound as if the
top-level of the working tree is the most important thing in the
world, and adding other useful things such as --show-prefix to it,
while it would make sense to have them there from the implementation
point of view, would be hard to justify against the connotation the
word "root" gives us), and we happened to pick "rev-parse" as a
"kitchen sink" place, which is not better or worse as anything else.

If I were redoing this today, I would probably nominate the "git"
potty as such a "kitchen synk" command.  We have "--man-path" that
shows the location of the manual pages, "--exec-path[=path]" that
either shows or allows us to override the path to the subcommands,
and "--show-prefix", "--show-toplevel", and friends may feel quite
at home there.

  reply	other threads:[~2014-12-01  3:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-29 20:00 [PATCH] introduce git root Arjun Sreedharan
2014-11-29 23:08 ` Philip Oakley
2014-11-30  4:35   ` Arjun Sreedharan
2014-11-30 11:58     ` Matthieu Moy
2014-12-01  3:04       ` Junio C Hamano [this message]
2014-12-01  4:17         ` Christian Couder
2014-12-01  4:53           ` Junio C Hamano
2014-12-02  7:04           ` Jeff King
2014-12-02 10:05             ` Christian Couder
2014-12-02 17:26             ` Junio C Hamano
2014-12-04  9:22               ` Jeff King
2014-12-04 19:02                 ` Junio C Hamano
2014-12-04 20:00                   ` Matthieu Moy
2014-12-04 20:19                     ` Junio C Hamano
2014-12-04 21:12                   ` Jeff King
2014-12-04 21:30                     ` Junio C Hamano
2014-12-05  2:27                     ` Christian Couder
2014-12-05  9:27                       ` Jeff King
2014-12-07  5:23                         ` Christian Couder
2014-12-09 18:17                         ` Junio C Hamano
2014-12-10  9:16                           ` Christian Couder
2014-12-10 20:10                           ` Jeff King
2014-12-10 21:08                             ` 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=xmqqd284rryz.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=arjun024@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.