Re: [PATCH v2 0/4] for-each-ref: introduce seeking functionality via '--skip-until'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas Schwab <schwab@xxxxxxxxxxxxxx> writes:

> On Jul 04 2025, Karthik Nayak wrote:
>
>> This series adds a '--skip-until' option in 'git-for-each-ref(1)'. When
>> used, the reference iteration seeks to the first matching reference and
>> iterates from there onward.
>
> I would have named the option --start-with.  It has the advantage that
> it is clear whether the matched ref is included.
>

We did discuss this internally, some other names we thought of:
--skip-to
--start-after
--start-from
--seek
--skip-before
--start-at

I think I was a bit against '--start-from' and '--start-at', because
they imply that the reference provided must exist.

Consider the example

  $ git for-each-ref
  refs/heads/bar
  refs/heads/foo
  refs/heads/main

  $ git for-each-ref --seek=refs/heads/cat
  refs/heads/foo
  refs/heads/main

You can see that the reference doesn't have to exist. So implying that
it should can be a bit confusing.

But I'm open to changing this, if we can conclude on any flag name...

> --
> Andreas Schwab, schwab@xxxxxxxxxxxxxx
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux