Re: [PATCH v2] remote show: fix the -n option

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Olivier Marin <dkr+ml.git@...>, <git@...>, Shawn O. Pearce <spearce@...>
Date: Monday, June 9, 2008 - 9:10 pm

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:


I do not think nobody cares ;-).

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".

The problem with the area of the code this patch touches is that compared
to the scripted version, show and prune now share their codepaths a bit
more, and it is less easy to keep -n disabled for prune (I think it is a
nonsense because you cannot "prune" sensibly without looking at what the
remote has.  It was a bug in the scripted version and losing it in C
rewrite was a "silent bugfix") while resurrecting -n for show (which is a
quick way to view where the URL points at without bothering to see what
remote branches there are).

I think a sensible thing to do would be to:

 - Agree that "-n" in the sense that "do not query" and "--dry-run" in the
   sense that "do not do anything but report what you would do" are
   different options.

 - Resurrect "show -n" as a quick way to view URLs without bothering to
   contact the remote end that is needed to show "the tracked branches"
   information.

 - Forbid "prune -n", which is nonsense.

 - Make "prune --dry-run" truly useful --- contact the other end, and
   report what will be pruned without really pruning them.

 - Perhaps as an enhancement, "show -n" could show what tracking branches
   we have from the remote, even though the information may be stale.
   The scripted version did not do this, I think, and it would be an
   improvement.

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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
remote show/prune: strange -n(--dry-run) option., Olivier Marin, (Sat Jun 7, 8:54 pm)
[PATCH] remote show: fix the -n option, Olivier Marin, (Sun Jun 8, 8:48 pm)
[PATCH v2] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 11:58 am)
Re: [PATCH v2] remote show: fix the -n option, Johannes Schindelin, (Mon Jun 9, 12:35 pm)
Re: [PATCH v2] remote show: fix the -n option, Junio C Hamano, (Mon Jun 9, 9:10 pm)
[PATCH 0/4] remote show/prune improvement, Olivier Marin, (Tue Jun 10, 10:50 am)
Re: [PATCH 0/4] remote show/prune improvement, Jakub Narebski, (Tue Jun 10, 11:09 am)
Re: [PATCH 0/4] remote show/prune improvement, Olivier Marin, (Tue Jun 10, 12:10 pm)
Re: [PATCH 0/4] remote show/prune improvement, Jakub Narebski, (Tue Jun 10, 1:11 pm)
[PATCH 1/4] remote show: fix the -n option, Olivier Marin, (Tue Jun 10, 10:51 am)
Re: [PATCH v2] remote show: fix the -n option, Shawn O. Pearce, (Mon Jun 9, 9:19 pm)
Re: [PATCH v2] remote show: fix the -n option, Johannes Schindelin, (Mon Jun 9, 10:39 pm)
Re: [PATCH v2] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 12:58 pm)
Re: [PATCH v2] remote show: fix the -n option, Johannes Schindelin, (Mon Jun 9, 1:56 pm)
Re: [PATCH v2] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 2:37 pm)
[PATCH] builtin-remote: make reuse of code easier by not die..., Johannes Schindelin, (Mon Jun 9, 4:11 pm)
Re: [PATCH] remote show: fix the -n option, Johannes Schindelin, (Sun Jun 8, 9:16 pm)
Re: [PATCH] remote show: fix the -n option, Olivier Marin, (Sun Jun 8, 10:06 pm)
Re: [PATCH] remote show: fix the -n option, Johannes Schindelin, (Sun Jun 8, 10:35 pm)
Re: [PATCH] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 12:16 am)
Re: [PATCH] remote show: fix the -n option, Johannes Schindelin, (Mon Jun 9, 12:53 am)
Re: [PATCH] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 10:22 am)
Re: [PATCH] remote show: fix the -n option, Olivier Marin, (Mon Jun 9, 11:43 am)
Re: [PATCH] remote show: fix the -n option, Johannes Schindelin, (Mon Jun 9, 12:31 pm)