From: Jakub Narebski <jnareb@gmail.com>
To: "R. Tyler Ballance" <tyler@slide.com>
Cc: git@vger.kernel.org
Subject: Re: Removing options from build
Date: Tue, 13 Jan 2009 14:05:36 -0800 (PST) [thread overview]
Message-ID: <m3d4eqzwuc.fsf@localhost.localdomain> (raw)
In-Reply-To: <1231883002.14181.27.camel@starfruit>
"R. Tyler Ballance" <tyler@slide.com> writes:
> One of our developers "discovered" the --force option on `git push` and
> used it without taking the appropriate care and hosed one of the project
> branches we have running around in our central repository.
>
> Besides a vigorous flogging, we're looking at other ways to prevent this
> sort of thing from happening again; the option we've settled on is to
> remove the "--force" flag from our internal build of v1.6.1
>
> I'm wondering if somebody could point me in the right direction to
> remove "--force" (safely) from the builtin-push.c and removing the
> "rebase" command (we've got no use for it, and would prefer it gone).
First, the title (subject) of this email is misleading: it is about
your solution, and not about the problem you have (protecting against
"git push --force").
Second, there are two possible solutions: use receive.denyNonFastForwards
and perhaps also receive.denyDeletes (see git-config(1)) to forbid forced
pushes on server (target of push); removing '--force' is a client solution.
Or, better, use update or post-receive hook on server, forbidding
non-fastforward updates to selected set of 'stable' branches; you can
use contrib/hooks/update-paranoid for that.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2009-01-13 22:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-13 21:43 Removing options from build R. Tyler Ballance
2009-01-13 21:53 ` Thomas Rast
2009-01-13 21:56 ` Thomas Rast
2009-01-13 22:00 ` R. Tyler Ballance
2009-01-13 22:07 ` Björn Steinbrink
2009-01-13 22:10 ` Boyd Stephen Smith Jr.
2009-01-13 22:47 ` Daniel Barkalow
2009-01-13 21:55 ` Björn Steinbrink
2009-01-13 22:05 ` Jakub Narebski [this message]
2009-01-13 22:06 ` Boyd Stephen Smith Jr.
2009-01-13 22:18 ` R. Tyler Ballance
2009-01-13 22:34 ` Boyd Stephen Smith Jr.
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=m3d4eqzwuc.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=tyler@slide.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