git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git remote update: New option --prune (-p)

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 2, 2009, 18:06 UTC
Message-ID
<7vab6zexq7.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090402134414.GB26699@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> I think it makes sense under update as pruning is really just a
> different (and perhaps slightly more dangerous) form of update.
> Generally I would only want to run prune after having run update, so
> combining them makes sense from a workflow perspective.

I agree with you that "oh by the way please prune as well" makes perfect sense, but I actually would even go stronger than that---if we _were_ adding this command today, I would probably make "update" prune by default, perhaps with an option to skip the pruning step.

I gave the patch an only cursory look, so I wouldn't comment on the implementation; two things I would look at in the code would be if it makes two connections to the remote to learn the same information (which would be bad) and if it skips the pruning stage if the update stage failed (which would probably be a sane precaution).

Previous: demerphqNext: Finn Arne Gangstad
Message 9 of 15 in “git remote update: New option --prune (-p)”
  1. git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 2, 2009
  2. demerphqApr 2, 2009
  3. Jeff KingApr 2, 2009
  4. demerphqApr 2, 2009
  5. Jeff KingApr 2, 2009
  6. demerphqApr 2, 2009
  7. Jeff KingApr 2, 2009
  8. demerphqApr 2, 2009
  9. Junio C HamanoApr 2, 2009
  10. Finn Arne GangstadApr 2, 2009
  11. Junio C HamanoApr 2, 2009
  12. 0/2 git remote update: New option --prune (-p)Finn Arne Gangstad, Apr 3, 2009
  13. 1/2 builtin-remote.c: Split out prune_remote as a separate function.Finn Arne Gangstad, Apr 3, 2009
  14. 2/2 git remote update: New option --pruneFinn Arne Gangstad, Apr 3, 2009
  15. Junio C HamanoApr 5, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.