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

Re: [wishlist] git branch -d -r remotename

From
Junio C Hamano <junkio@cox.net>
Date
Mar 18, 2007, 19:42 UTC
Message-ID
<7vvegyl4nt.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20070318113210.5843E13A382@magnus.utsl.gen.nz>
Sam Vilain <sam@vilain.net> writes:
Show 9 quoted lines
> One time again, this time with the call to porcelain command
> `git-branch` replaced with the plumbing command `symbolic-ref HEAD`
>
> I also changed the output to be a little less "Got here\n" style.
>
> Subject: [PATCH] git-remote: implement prune -c
>
> It would be nice to prune local refs which are irrelevant; add an
> option to git-remote prune, with documentation.

I do not understand what workflow you are assuming, so your use of the word "irrelevant" does not mean much to me. I suspect other readers of the patch and documentation wouldn't find it clear in what situation this option is useful.

Perhaps you are thinking about this scenario? I am only guessing because you are not clear enough:

	$ git clone
        ... time passes ...
        $ git checkout -b next origin/next
        ... build, install, have fun ...
	$ git checkout master
        ... time passes ...
        $ git branch
        ... notice that you do not hack on your copy of 'next'
        ... and want to remove it
	$ git remote prune -c

In any case, are you checking irrelevancy? What if your foo branch has more changes to be sent upstream? Even when the remote has a bit older version doesn't your code remove yours? For example, if you did this, instead of the above, what happens?

	$ git clone
        ... time passes ...
        $ git checkout -b next origin/next
        ... build, install, have fun ...
	... find an opportunity to improve ...
        $ edit
        $ git commit ;# on your 'next'.
        ... build, install, test ...
	$ git checkout master
        ... time passes ...
        $ git branch
        ... notice that you do not hack on your copy of 'next' anymore,
        ... and want to remove it
	$ git remote prune -c

If the above is the usage scenario you are trying to help, then wouldn't it be helpful if you could also help removing 'my-next' in this slightly altered example?

	$ git clone
        ... time passes ...
        $ git checkout -b my-next origin/next
        ... build, install, have fun ...
	$ git checkout master
        ... time passes ...
        $ git branch
        ... notice that you do not hack on your copy of 'next'
        ... which is 'my-next', and want to remove it
	$ git remote prune -c
Previous: Sam VilainNext: Sam Vilain
Message 4 of 8 in “[wishlist] git branch -d -r remotename”
  1. Sam VilainMar 18, 2007
  2. Sam VilainMar 18, 2007
  3. Sam VilainMar 18, 2007
  4. Junio C HamanoMar 18, 2007
  5. Sam VilainMar 18, 2007
  6. Junio C HamanoMar 19, 2007
  7. Junio C HamanoMar 19, 2007
  8. (unknown)Sam Vilain, Mar 19, 2007

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.