From: Junio C Hamano <gitster@pobox.com>
To: David Fries <david@fries.net>
Cc: git@vger.kernel.org, Scott Bronson <bronson@rinspin.com>
Subject: Re: [PATCH] (trivial) add helpful "use --soft" for bare reset
Date: Fri, 01 Jul 2011 09:39:50 -0700 [thread overview]
Message-ID: <7vei2aosyx.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20110630220843.GC26701@spacedout.fries.net> (David Fries's message of "Thu, 30 Jun 2011 17:08:43 -0500")
David Fries <david@fries.net> writes:
> But at work push -f no longer works, it's administratively denied from
> remote for certain branches, the kind that you generally never want to
> rewind. But on occasion we do. The options are to administratively
> change permissions, push -f, change back, or login to the server,
> clone, push -f, or manipulate the bare repository directly. Modifying
> the bare repository is the quickest and git-update-ref works, it just
> isn't in the porcelain commands, so less likely to be known.
That is expected. Whoever denies "administratively" a push that rewinds
the history would have the authority to grant exception to the policy, and
ability to help you rewind the history. You would need to work with
them. If "them" happens to be "you", then you are expected to have that
authority and ability, which may include to have direct write access to
the repository and to know update-ref.
> .... I'm not concerned about a user
> actually being in a bare repository thinking they're not, because
> resetting the index or working directory can loose information that
> you can't get back by looking at the ref-log until gc runs, and
> nothing woring on the index or working directory will work so they'll
> figure it out soon enough.
You may not be concerned, but I am; otherwise the message you are
responding to wouldn't have been written. And I would agree they'll figure
it out soon enough with the current error message, that does not have an
advice to look at update-ref, which is irrelevant. I am mostly worried
about the additional wrong (for their situation) advice throwing them off
track.
>> In such a scenario, the mistake is not that I used a wrong command "reset"
>> in an attempt to update the tip of the branch. The mistake is that I tried
>> to use the right command to update the index, but I did it in a wrong
>> place. "Did you mean to do that somewhere else?" would be a much more
>> appropriate advice in that case.
>
> Yes, your message would be appropriate in that case, but there's no
> way for git to guess that.
That is exactly my point. If we cannot guess reliably, I do not want to
see us giving an inappropriate advice that does not apply to the user's
situation, potentially leading the user in the wrong direction.
prev parent reply other threads:[~2011-07-01 16:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 22:14 [PATCH] (trivial) add helpful "use --soft" for bare reset David Fries
2011-06-30 17:21 ` Junio C Hamano
2011-06-30 19:06 ` David Fries
2011-06-30 20:06 ` Junio C Hamano
2011-06-30 22:08 ` David Fries
2011-07-01 16:39 ` Junio C Hamano [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=7vei2aosyx.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=bronson@rinspin.com \
--cc=david@fries.net \
--cc=git@vger.kernel.org \
/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).