Re: [PATCH v2 3/3] checkout: reorder option handling
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 29, 2012, 18:55 UTC
- Message-ID
- <7v3935wms5.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1346248524-11616-3-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
Show 5 quoted lines
> + if (opts.patch_mode || opts.pathspec) > + return cmd_checkout_entry(&opts, &new); > + else > + return cmd_switch(&opts, &new); > }
Yeah, patch_mode is really part of checking out paths, so separating the actions into two makes sense.
Even though I am not sure about "cmd_" prefix (as these are not commands), I'll rename the former "cmd_checkout_paths" to be consistent with the underlying checkout_paths() function, and the. latter "cmd_checkout_branch" for consistency with the former (you either check out one-or-more paths, or check out a branch).