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

Re: [PATCH] builtin-remote: make rm operation safer in mirrored repository

From
Jeff King <peff@peff.net>
Date
Feb 3, 2009, 07:24 UTC
Message-ID
<20090203072418.GD21367@sigill.intra.peff.net>
In-Reply-To
<1233600014-82346-1-git-send-email-jaysoffian@gmail.com>
On Mon, Feb 02, 2009 at 01:40:14PM -0500, Jay Soffian wrote:
> This version adds a test case. I also noticed that the check I'd added to
> add_branch_for_removal() was generating spurious warnings because I'd added it
> in the wrong place; this version moves the check below the
> remote_find_tracking() checks.
This version looks fine to me, and I would be OK with it being applied.

However, I have one small nit. The output produces long lines with a lot of repeated text (assuming you have multiple matched branches, which is likely if you have a mirrored setup). So maybe it would be nicer to have something like:

  warning: non-remote branches were not removed; you can delete them with:
          git branch -d master
          git branch -d next
          git branch -d topic

which is a little more obvious (to me, anyway), and allows you to cut and paste if you really did want to delete them.

But this should be a pretty seldom seen message, so it might not matter much. I just thought I would throw it out there.

-Peff
Previous: Jay SoffianNext: Junio C Hamano
Message 6 of 17 in “git remote rm considered harmful?”
  1. Jay SoffianFeb 1, 2009
  2. builtin-remote: make rm operation safer in mirrored repositoryJay Soffian, Feb 1, 2009
  3. Jeff KingFeb 2, 2009
  4. Jay SoffianFeb 2, 2009
  5. builtin-remote: make rm operation safer in mirrored repositoryJay Soffian, Feb 2, 2009
  6. Jeff KingFeb 3, 2009
  7. Junio C HamanoFeb 3, 2009
  8. Jay SoffianFeb 3, 2009
  9. Johannes SchindelinFeb 3, 2009
  10. 1/2 builtin-remote: make rm() use properly named variable to hold return valueJay Soffian, Feb 3, 2009
  11. 2/2 builtin-remote: make rm operation safer in mirrored repositoryJay Soffian, Feb 3, 2009
  12. Jeff KingFeb 4, 2009
  13. Jay SoffianFeb 4, 2009
  14. builtin-remote: make rm operation safer in mirrored repositoryJay Soffian, Feb 4, 2009
  15. Jeff KingFeb 4, 2009
  16. Jeff KingFeb 4, 2009
  17. Jeff KingFeb 4, 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.