git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "Git List" <git@vger.kernel.org>,
	"Johannes Schindelin" <Johannes.Schindelin@gmx.de>,
	"René Scharfe" <l.s.r@web.de>
Subject: Re: [PATCH v4 2/2] rev-parse: add option for absolute or relative path formatting
Date: Mon, 7 Dec 2020 02:38:15 +0000	[thread overview]
Message-ID: <X82Vl7YmZ1/Sr4xS@camp.crustytoothpaste.net> (raw)
In-Reply-To: <CAPig+cS-2Vw84rejMFAiDeF8dd5gtBOmQZUMpOy2ufA8nU7W7g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1620 bytes --]

On 2020-12-07 at 00:30:13, Eric Sunshine wrote:
> I read the commit message and looked at the implementation so I know
> that this option can be specified multiple times, but this
> documentation only vaguely hints at it by saying "options following
> it". We could do a better job of imparting that knowledge to the
> reader by saying so explicitly, perhaps like this:
> 
>     Controls the behavior of some path-printing options. If
>     'absolute', [...]. If 'relative', [...]. May be specified multiple
>     times, each time affecting the path-printing options which
>     follow it. The default path format is option-specific.

I'll improve the documentation in v5.

> Since this option can be specified multiple times, should it also
> recognize `default` to request the default behavior in addition to
> `absolute` and `relative`? (Genuine question. Maybe real-world
> use-cases wouldn't need it, but it would be easy to support and make
> it functionally complete.)

I don't think adding the default is helpful.  I can think of situations
where people want absolute path names or relative path names, but in
what case would someone want, "meh, whatever Git decides to give me"?

The problem we're solving here is that Git isn't consistent and can't be
used to provide valuable information that the user wants.  If a user
doesn't care what format the path is in, then they can always specify
absolute and it will almost certainly be correct and work for them.

> Leaking `realbuf` and `prefixbuf` here.

Will fix.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      reply	other threads:[~2020-12-07  2:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 22:53 [PATCH v4 0/2] rev-parse options for absolute or relative paths brian m. carlson
2020-12-06 22:53 ` [PATCH v4 1/2] abspath: add a function to resolve paths with missing components brian m. carlson
2020-12-07  0:02   ` Eric Sunshine
2020-12-07  2:11     ` brian m. carlson
2020-12-07 17:19   ` René Scharfe
2020-12-08  2:51     ` brian m. carlson
2020-12-06 22:53 ` [PATCH v4 2/2] rev-parse: add option for absolute or relative path formatting brian m. carlson
2020-12-07  0:30   ` Eric Sunshine
2020-12-07  2:38     ` brian m. carlson [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=X82Vl7YmZ1/Sr4xS@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=sunshine@sunshineco.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).