From: "Carlos Martín Nieto" <cmn@elego.de>
To: Phil Hord <phil.hord@gmail.com>
Cc: Jeff King <peff@peff.net>,
"jonsmirl@gmail.com" <jonsmirl@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] push: don't guess at qualifying remote refs on deletion
Date: Thu, 05 Jul 2012 19:24:11 +0200 [thread overview]
Message-ID: <1341509051.10752.34.camel@flaca.cmartin.tk> (raw)
In-Reply-To: <CABURp0r8EfShHVE-Vycz3g8-WPXFzs1-WOT7LRwh-XOuWVYG+Q@mail.gmail.com>
On Thu, 2012-07-05 at 11:32 -0400, Phil Hord wrote:
>
> The possible enhancements to cover this I can think of are mostly in
> the form of enhanced help or advice. For example, I could imagine
> these:
>
> 1. Add a link to 'git push' on the 'git-branch' man page. I suspect
> this is where newbies would go to look for this feature, but I am only
> guessing. The git-branch help discusses deleting branches and even
> deleting remote-tracking branches. But it does not discuss deleting
> branches on a remote repository, even to say "this is not the command
> you want" for that action, but "see this other one instead".
Yeah, that seems like a good addition.
>
> 2. Add 'apropos' behavior for git help.
> $ git apropos delete
>
> Except I notice that the system 'apropos' does not turn up 'git-push'
> for either of these:
> $ apropos delete
> $ apropos branch
Huh, I don't think I've used apropos in years. I guess changing the
subject to include removing/deleting would be conceivable, but we still
have the issue that branches are a particular form of ref, which is what
push acts on.
>
> 3. Add a search feature for help. Currently this feature is provided
> instead by Google and StackOverflow.
> $ git help --find delete --and branch --and remote
> Except I don't expect this "advanced" form of help, if it existed, to
> be noticed by newbies early enough on the learning curve.
>
> 4. Add advice in appropriate locations.
> Instead of this:
> $ git remote rm origin/foo
> error: Could not remove config section 'remote.origin/foo'
Ugh, this is horrible. We should definitely do better than this error
message.
> $ git branch -d origin/foo
> error: branch 'origin/foo' not found.
>
> Do this:
> $ git remote rm origin/foo
> error: There is no remote named 'origin/foo'
> hint: Did you mean to remove the remote tracking branch 'origin/foo'?
> hint: Try "git branch --delete --remotes origin/foo" instead.
> hint: Did you mean to remove the branch 'foo' on the remote
> 'origin' repository?
> hint: Try "git push --delete origin foo" instead.
>
> $ git branch -d origin/foo
> error: branch 'origin/foo' not found.
> hint: To delete the remote-tracking branch origin/foo,
> hint: use git branch --delete --remotes origin/foo
>
> $ git branch -dr origin/foo
> Deleted remote branch origin/foo (was fadda12).
If we're changing error messages, this could probably do with an update
to say "remote-tracking" branch so it's clearer that it didn't affect
the branch on the remote.
> hint: This deleted your remote-tracking branch but
> hint: did not affect the branch on the remote server.
> hint: To remove the branch from the remote server,
> hint: use "git push". See '--delete' in "git help push" .
>
IMO these seem too verbose (but maybe I've just seen people post the old
'git pull' error message without even reading it too many times).
cmn
next prev parent reply other threads:[~2012-07-05 17:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 3:09 How do I delete a remote branch with a period in the name? jonsmirl
2012-07-03 4:14 ` Junio C Hamano
2012-07-03 11:42 ` jonsmirl
2012-07-03 18:04 ` [PATCH] push: don't guess at qualifying remote refs on deletion Jeff King
2012-07-03 18:34 ` jonsmirl
2012-07-03 18:40 ` Jeff King
2012-07-03 18:43 ` jonsmirl
2012-07-03 19:35 ` Jeff King
2012-07-04 7:21 ` Carlos Martín Nieto
[not found] ` <CABURp0rVPAvxP1sp_nmoNYd+F+OsvWeHgUAeo7-VTnQhdebFeg@mail.gmail.com>
2012-07-05 7:22 ` Carlos Martín Nieto
2012-07-05 15:32 ` Phil Hord
2012-07-05 17:24 ` Carlos Martín Nieto [this message]
2012-07-05 17:26 ` Junio C Hamano
2012-07-03 19:38 ` Junio C Hamano
2012-07-04 7:37 ` Jeff King
2012-07-03 7:56 ` How do I delete a remote branch with a period in the name? Andreas Schwab
2012-07-03 19:39 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341509051.10752.34.camel@flaca.cmartin.tk \
--to=cmn@elego.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jonsmirl@gmail.com \
--cc=peff@peff.net \
--cc=phil.hord@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).