Re: [PATCH v2] scalar: accept -C and -c options before the subcommand

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

 



On 1/28/2022 9:31 AM, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@xxxxxx>
> 
> The `git` executable has these two very useful options:
> 
> -C <directory>:
> 	switch to the specified directory before performing any actions
> 
> -c <key>=<value>:
> 	temporarily configure this setting for the duration of the
> 	specified scalar subcommand
> 
> With this commit, we teach the `scalar` executable the same trick.
> 
> Note: It might look like a good idea to try to reuse the
> `handle_options()` function in `git.c` instead of replicating only the
> `-c`/`-C` part. However, that function is not only not in `libgit.a`, it
> is also intricately entangled with the rest of the code in `git.c` that
> is necessary e.g. to handle `--paginate`. Besides, no other option
> handled by that `handle_options()` function is relevant to Scalar,
> therefore the cost of refactoring vastly would outweigh the benefit.

Based on discussions elsewhere in this thread, I have changed my mind
and agree that this approach is the best one to take at the moment.

With this additional context and the new tests, I think this patch is
ready to go.

Thanks,
-Stolee



[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