git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] remote: align --verbose output with spaces

From
WBWang Bing-hua <louiswpf@gmail.com>
Date
Dec 18, 2024, 05:49 UTC
Message-ID
<18122f6da7729ff9.8ab23eb43f7bb6f4.c74125d7d6163423@host>
In-Reply-To
<xmqqr066ysa6.fsf@gitster.g>
On 17/12/2024 12:21, Junio C Hamano wrote:
Show 7 quoted lines
>> On Tue, Dec 17, 2024 at 12:39:36PM +0000, Wang Bing-hua via GitGitGadget wrote:
>>> From: Wang Bing-hua <louiswpf@gmail.com>
>>> 
>>> Remote names exceeding a tab width could cause misalignment.
> 
> If all of them are named with ten ASCII characters, on a terminal
> with fixed-width font, things will still display aligned ;-)

Indeed :) I did consider this scenario and wrote "could". I should have worded this more clearly.

Show 13 quoted lines
> With a Devil's advocate hat on, a change like this will completely
> break tools when they are reading the "--verbose" output and
> expecting that the fields are separated with a TAB (in other words,
> the tab is *not* about alignment in the first place for them).
> 
> Now with that hat off.
> 
> For users with that many remotes where the alignment of URLs in the
> interactive "git remote -v" output matter, I am not sure if this
> change is a real improvement enough that it is worth the possible
> risk of breaking existing tools.  With that many remotes defined,
> wouldn't they be doing "git remote -v" piped to "grep '^name<TAB>'"
> or something?  That use case would break with the change, too.

Agreed on all points. Another point to consider is to align with "git branch -v" since it also uses spaces for alignment. This patch was also originally lifted from "builtin/branch.c".

Previous: Junio C HamanoNext: shejialuo
Message 5 of 12 in “remote: align --verbose output with spaces”
  1. remote: align --verbose output with spacesWang Bing-hua via GitGitGadget, Dec 17, 2024
  2. shejialuoDec 17, 2024
  3. Wang Bing-huaDec 17, 2024
  4. Junio C HamanoDec 17, 2024
  5. Wang Bing-huaDec 18, 2024
  6. shejialuoDec 18, 2024
  7. Wang Bing-huaDec 18, 2024
  8. remote: align --verbose output with spacesWang Bing-hua via GitGitGadget, Dec 17, 2024
  9. Junio C HamanoDec 17, 2024
  10. Wang Bing-huaDec 18, 2024
  11. Junio C HamanoDec 18, 2024
  12. Wang Bing-huaDec 19, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.