Re: [PATCH 11/16] git-fetch: skip empty arguments
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 18, 2007, 22:33 UTC
- Message-ID
- <7vmz014v9z.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <117951630747-git-send-email-skimo@liacs.nl>
skimo@liacs.nl writes:
> From: Sven Verdoolaege <skimo@kotnet.org> > > This makes it easier for scripts to call git-fetch with options > that may or may not be set.
For git-fetch it does not matter as I do not think there is any valid case to pass an empty string as a parameter to it (even "fetch from our own repository" requires a single dot). But from discipline point of view, I am not happy about this.
If you are talking about shell scripts, the standard way to do that is to say ${1+"$1"}.