git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Kirill Kolyshkin <kolyshkin@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Roman Dodin <dodin.roman@gmail.com>
Subject: Re: [PATCH] remote: align columns on -v
Date: Wed, 8 Feb 2023 17:11:40 -0800	[thread overview]
Message-ID: <CAGmPdrxcb+ztx96=aF2+ok7DgOkEnZ+znSrG4D=AE_nQ57A17w@mail.gmail.com> (raw)
In-Reply-To: <xmqq5yccuo2s.fsf@gitster.g>

On Wed, Feb 8, 2023 at 8:19 AM Junio C Hamano <gitster@pobox.com> wrote:
>
> Kir Kolyshkin <kolyshkin@gmail.com> writes:
>
> > Currently, git remote -v produces a misaligned output when a remote name
> > is more than 8 characters long (i.e. longer than a tab step). Here's how
> > it looks like:
>
> The condition under which URLs do not align is not when they are
> more than 8 characters long.  If all of your remotes have
> 10-character names, their URLs would perfectly align, no?  The
> description may need to be tightened if we really wanted to do this.
>
> But I am skeptical, even without my devil's advocate hat on.
>
> > giuseppe      https://github.com/giuseppe/runc (fetch)
> > giuseppe      https://github.com/giuseppe/runc (push)
> > kir   git@github.com:kolyshkin/runc.git (fetch)
> > ...
>
> The current output allows programs to post-process by splitting each
> line with a tab, but this change will break such practice and force
> those who use such practice to do something different (like "split
> at the first run of whitespaces or tabs").
>
> > While at it, let's keep the \t in case some tools depend on it
> > for parsing (there will still be trailing spaces in the remote name).
>
> That will not help avoid breaking the behaviour for existing
> practice (they did not need to strip the whitespaces, but now they
> are forced to).  It only make the output uglier by putting mixture
> of whitespaces and tabs.
>
> So, I dunno.

Yes, I agree that this can break someone's scripts, and adding \t was
not a bright idea either, as having it may hide the issue (of
incorrect splitting)
rather than break things entirely (and thus urging to fix it).

I assume that any decent script would split by "any whitespace", plus
the output of git remote -v is mostly for the user's eyes, not scripts.

Please take a look at v2 which I am sending now.

  reply	other threads:[~2023-02-09  1:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 23:52 [PATCH] remote: align columns on -v Kir Kolyshkin
2023-02-08 16:12 ` Torsten Bögershausen
2023-02-08 16:32   ` Junio C Hamano
2023-02-09  1:02   ` Kirill Kolyshkin
2023-02-08 16:19 ` Junio C Hamano
2023-02-09  1:11   ` Kirill Kolyshkin [this message]
2023-02-09  1:12 ` Kir Kolyshkin

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='CAGmPdrxcb+ztx96=aF2+ok7DgOkEnZ+znSrG4D=AE_nQ57A17w@mail.gmail.com' \
    --to=kolyshkin@gmail.com \
    --cc=dodin.roman@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).