public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Lucas Seiki Oshiro <lucasseikioshiro@gmail•com>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, ps@pks•im, karthik.188@gmail•com
Subject: Re: [GSoC PATCH v2 1/2] repo: add the flag -z as an alias for --format=nul
Date: Mon, 1 Sep 2025 10:50:03 -0300	[thread overview]
Message-ID: <FBD7B727-BE36-45FF-BD19-8086701C9753@gmail.com> (raw)
In-Reply-To: <xmqqcy8frqn2.fsf@gitster.g>


> Putting the devil's advocate hat on, "--format=<plain,nul>" was an
> attempt to avoid needless proliferation of options (e.g. presense of
> "-z" would tempt people into add "--json" when they introduce
> "--format=json"), so it may not be unconditionally a good idea to
> mimic these older commands where there are only two output formats.

Yeah, I understand...

> You'd probably need to define a parseopt callback function for
> "format" and "-z", and remember the one that you saw the last.  So
> giving "-z --format=nul --format=text" would first set an internal
> "format" to FORMAT_NUL_TERMINATED (due to "-z"), and then to the
> same FORMAT_NUL_TERMINATED again (due to "--format=nul"), and then
> finally to FORMAT_TEXT (due to "--format=text"), or something like
> that, which would give the familiar "the last one wins" semantics.

Ok, accepted! I'll also replace the tests and the documentation in
order to match this behavior. Thanks!


  reply	other threads:[~2025-09-01 13:50 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-20 14:42 [GSoC PATCH 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-08-20 14:42 ` [GSoC PATCH 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-08-21 10:12   ` Karthik Nayak
2025-08-21 16:09     ` Junio C Hamano
2025-08-21 16:52       ` Karthik Nayak
2025-08-21 10:29   ` Patrick Steinhardt
2025-08-21 13:29     ` Lucas Seiki Oshiro
2025-08-21 17:28       ` Junio C Hamano
2025-08-21 20:57         ` Lucas Seiki Oshiro
2025-08-21 21:50           ` Junio C Hamano
2025-08-21 18:23   ` Jean-Noël AVILA
2025-08-21 19:52     ` Junio C Hamano
2025-08-20 14:42 ` [GSoC PATCH 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-08-21 10:29   ` Patrick Steinhardt
2025-08-21 19:44   ` Junio C Hamano
2025-08-26 14:51     ` Lucas Seiki Oshiro
2025-08-21 10:14 ` [GSoC PATCH 0/2] repo: add -z and objects.format Karthik Nayak
2025-08-21 16:12   ` Junio C Hamano
2025-08-21 10:29 ` Patrick Steinhardt
2025-08-21 13:23   ` Lucas Seiki Oshiro
2025-08-21 14:55     ` Patrick Steinhardt
2025-08-21 17:28     ` Junio C Hamano
2025-08-26 18:13       ` Lucas Seiki Oshiro
2025-08-26 18:32 ` [GSoC PATCH v2 " Lucas Seiki Oshiro
2025-08-26 18:32   ` [GSoC PATCH v2 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-08-28 23:08     ` Junio C Hamano
2025-09-01 13:50       ` Lucas Seiki Oshiro [this message]
2025-08-26 18:32   ` [GSoC PATCH v2 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-01 17:27 ` [GSoC PATCH v3 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-09-01 17:27   ` [GSoC PATCH v3 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-09-02 16:21     ` Junio C Hamano
2025-09-02 21:51       ` Lucas Seiki Oshiro
2025-09-01 17:27   ` [GSoC PATCH v3 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-04 13:40 ` [GSoC PATCH v4 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-09-04 13:40   ` [GSoC PATCH v4 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-09-04 13:40   ` [GSoC PATCH v4 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-04 18:40   ` [GSoC PATCH v4 0/2] repo: add -z and objects.format 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=FBD7B727-BE36-45FF-BD19-8086701C9753@gmail.com \
    --to=lucasseikioshiro@gmail$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=karthik.188@gmail$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox