Re: [PATCH v2] remote show: fix the -n option
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Jun 10, 2008, 01:19 UTC
- Message-ID
- <20080610011913.GA11793@spearce.org>
- In-Reply-To
- <7vd4mqdrhi.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
> At least I care enough to point out that I think you are wrong in this > case. "show -n" in the scripted version was never about "dry-run" but > was about "no-query".
...
> I am CC'ing Shawn who authored 859607d (Teach 'git remote' how to cleanup > stale tracking branches., 2007-02-02) to give him a chance to point out > why I am wrong in saying "prune -n" is nonsense. Maybe there is a valid > use case for that option, even though I do not see one.
I agree with you Junio. "prune -n" is nonsense. You cannot know what to remove locally that the remote no longer advertises without querying the remote.
So "prune -n" is nonsense and should issue an error. "prune --dry-run" is different and means "query, show what you would delete, but don't actually delete".
Likewise "show --dry-run" is nonsense. What does it mean to show what would show without showing it? Just show it. :)
-- Shawn.