From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Patrick Steinhardt <ps@pks.im>, git@vger.kernel.org
Subject: Re: [PATCH 2/2] push: add '-d' as shorthand for '--delete'
Date: Wed, 16 Dec 2015 16:52:52 -0500 [thread overview]
Message-ID: <20151216215252.GA11615@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqr3imcf2l.fsf@gitster.mtv.corp.google.com>
On Wed, Dec 16, 2015 at 12:29:38PM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > At this point, it seems that "--delete" is useful, and nothing else has
> > been proposed for "-d" in the intervening years. It seems like a
> > reasonable use of the flag to me.
>
> I think there were two (and a half) reasons why we didn't let
> "--delete" use a short-and-sweet "-d", and I agree that "something
> else that is more useful did not come" removes one of them.
>
> The other reason was to avoid the chance of fat-fingering, because
> deleting is destructive, and it is even harder to recover from if
> the damage is done remotely (and the remaining one-half is that
> deleting is a rare event).
>
> Even though I do not think the need for the "safety" has been
> reduced over time to warrant this change, a similarity with "branch"
> that has "-d/--delete" would be a good enough argument to support
> this change.
Thanks for the input, I hadn't considered "safety" at all. We do have
safety measures on "git branch -d" that we don't have here. I guess we
could implement something similar (e.g., see if the to-be-deleted branch
is merged elsewhere; of course we might not have the objects locally at
all). On the other hand, you can already screw yourself pretty badly
with "push -f".
So I think it's probably OK to add "-d".
-Peff
prev parent reply other threads:[~2015-12-16 21:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 15:23 [PATCH 1/2] push: add '--delete' flag to synopsis Patrick Steinhardt
2015-12-14 15:23 ` [PATCH 2/2] push: add '-d' as shorthand for '--delete' Patrick Steinhardt
2015-12-14 19:18 ` Junio C Hamano
2015-12-15 9:22 ` Patrick Steinhardt
2015-12-14 21:18 ` Jeff King
2015-12-16 20:29 ` Junio C Hamano
2015-12-16 21:52 ` Jeff King [this message]
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=20151216215252.GA11615@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/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).