Re: [PATCH 1/2] git-submodule.sh: Support 'checkout' as a valid update command
- From
W. Trevor King <wking@tremily.us>
- Date
- Jan 5, 2014, 20:44 UTC
- Message-ID
- <20140105204423.GF3156@odin.tremily.us>
- In-Reply-To
- <1388890249-3577-1-git-send-email-ceztko@gmail.com>
On Sun, Jan 05, 2014 at 03:50:48AM +0100, Francesco Pretto wrote:
Show 12 quoted lines
> + case "$update_module" in > + '') > + ;; # Unset update mode > + checkout | rebase | merge | none) > + ;; # Known update modes > + !*) > + ;; # Custom update command > + *) > + update_module= > + echo >&2 "warning: invalid update mode for submodule '$name'" > + ;; > + esac
I'd prefer `die "…"` to `echo >&2 "…"`. It's hard to know if mapping the user's preferred (unknown) update mechanism to 'checkout' is serious or not.
This commit also makes me think that --rebase, --merge, and --checkout should be replaced with a single --update={rebase|merge|checkout|!…} option, but that's probably food for another commit (and a long finger-breaking deprecation period).
Cheers, Trevor
-- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy