Re: [PATCH v3 8/8] builtin/checkout-index: stop using `the_repository`

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

 



Usman Akinyemi <usmanakinyemi202@xxxxxxxxx> writes:

> Remove the_repository global variable in favor of the repository
> argument that gets passed in "builtin/checkout-index.c".
>
> When `-h` is passed to the command outside a Git repository, the
> `run_builtin()` will call the `cmd_checkout_index()` function with `repo`
> set to NULL and then early in the function, `show_usage_with_options_if_asked()`
> call will give the options help and exit.
>
> Pass the repository available in the calling context to both `checkout_all()`
> and `checkout_file()` to remove their dependency on the global
> `the_repository` variable.

Hmph, if we are passing anything down to these code paths, I would
have expected that it would be an instance of "struct index_state".

Do these two helper functions need anything other than that from the
repository instance?

Other than that, I think this step does look great.

Will queue.

Thanks.




[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