Re: [PATCH 2/2] attr: add flag `-r|--revisions` to work with revisions

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

 



Hey Eric,

On Wed, Dec 7, 2022 at 2:10 AM Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
>
> On Tue, Dec 6, 2022 at 7:15 PM Junio C Hamano <gitster@xxxxxxxxx> wrote:
> > Karthik Nayak <karthik.188@xxxxxxxxx> writes:
> > > Add a new flag `--revision`/`-r` which will allow it work with
> > > revisions. This command will now, instead of checking the files/index,
> > > try and receive the blob for the given attribute file against the
> > > provided revision. The flag overrides checking against the index and
> > > filesystem and also works with bare repositories.
> >
> > As "check-attr" was not invented as a user-facing subcommand but was
> > a hack for debugging, I would have minded this change, but these
> > days people seem to treat it as if it is just one of the proper
> > plumbing commands, the new command line convention bothers me a
> > bit.  No other command uses --<anything> to signal that what comes
> > after it is a rev.
> >
> > But I do not think of a better alternative without making the
> > command line ambiguous, so I'll stop at raising a concern, so that
> > others who may be better at UI can come up with one.
>
> A few minor comments...
>
> We don't usually squat on short options, such as `-r`, right from the
> start but only add the short alias once shown that there is demand.
>
> Option `-r` has strong association with "recursive" elsewhere, so I'd
> worry about giving it such a completely different meaning here.
>
> Rather than calling the option `--revision`, perhaps pattern it after
> git-restore's `--source` option which allows specifying a particular
> commit, tree, tag, etc.?


I'm okay with removing the shortform `-r`. I decided to use `-r|--revision`
because it is also used in `git svn`.

I don't have strong feeling about the naming here, but I do feel that
`-r|--revision` sounds better than `--source`, because source doesn't directly
imply a revision and in the context of `git check-attr` is a bit ambiguous
because it could imply the source regarding which `gitattributes` file to
check against (although this feature doesn't exist).

-- 
- Karthik



[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