From: Jeff King <peff@peff.net>
To: Christian Couder <christian.couder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
Arjun Sreedharan <arjun024@gmail.com>,
Philip Oakley <philipoakley@iee.org>, Git <git@vger.kernel.org>
Subject: Re: [PATCH] introduce git root
Date: Tue, 2 Dec 2014 02:04:15 -0500 [thread overview]
Message-ID: <20141202070415.GC1948@peff.net> (raw)
In-Reply-To: <CAP8UFD2jES1i+6zOt1gXqTWFy1UHu2GBwAisQktd_Ymbj9Db2g@mail.gmail.com>
On Mon, Dec 01, 2014 at 05:17:22AM +0100, Christian Couder wrote:
> On Mon, Dec 1, 2014 at 4:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > 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.
>
> I wonder if we could reuse "git config" which is already a "kitchen
> synk" command to get/set a lot of parameters.
> Maybe we could dedicate a "git" or "virtual" or "proc" or "sys" (like
> /proc or /sys in Linux) namespace for these special config parameters
> that would not necessarily reflect something in the config file.
>
> "git config git.man-path" would be the same as "git --man-path".
> "git config git.root" would be the same as "git rev-parse --show-toplevel".
> "git config git.exec-path mypath" would allow us to override the path
> to the subcommands, probably by saving something in the config file.
What would:
git config git.root foo
git config git.root
output? No matter what the answer is, I do not relish the thought of
trying to explain it in the documentation. :)
There is also "git var", which is a catch-all for printing some deduced
environmental defaults. I'd be just as happy to see it go away, though.
Having:
git --exec-path
git --toplevel
git --author-ident
all work would make sense to me (I often get confused between "git
--foo" and "git rev-parse --foo" when trying to get the exec-path and
git-dir). And I don't think it's too late to move in this direction.
We'd have to keep the old interfaces around, of course, but it would
immediately improve discoverability and consistency.
-Peff
next prev parent reply other threads:[~2014-12-02 7: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
2014-12-01 4:17 ` Christian Couder
2014-12-01 4:53 ` Junio C Hamano
2014-12-02 7:04 ` Jeff King [this message]
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=20141202070415.GC1948@peff.net \
--to=peff@peff.net \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=arjun024@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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.