Git development
 help / color / mirror / Atom feed
From: Sylvain Beucler <beuc@gnu.org>
To: git@vger.kernel.org
Cc: savannah-hackers-public@gnu.org
Subject: Overwriting bare repositories' master
Date: Sun, 29 Oct 2006 22:03:33 +0100	[thread overview]
Message-ID: <20061029210333.GG12285@localhost.localdomain> (raw)

Hello,

I'm trying to setup a git hosting facility, such as repo.or.cz. The
facility provides a pre-initialized git repository only accessible
through git-shell.

The goal is to minimise the system admins' intervention, and I have a
question about a branch 'overwriting'. For example, let's say the user
makes an initial import to refs/heads/master for testing purposes,
then wants to start over and import the real project. Can he put a
wholy different git repository in place of the other one, at the same
destination?

I tried and I found something that doesn't seem to follow the
documentation:

repo_one$ git push Beuc@cvs.sv.gnu.org:/srv/git/sources/administration.git \
  master:refs/heads/master
# [OK]
repo_two$ git push --force Beuc@cvs.sv.gnu.org:/srv/git/administration.git \
  +refs/heads/master:refs/heads/master
updating 'refs/heads/master'
  from ee3bda653dfabaf0f78f2a9977abec180f2b19dc
  to   c9a726b610bafc82142a16af80b83d28375ca619
Generating pack...
Done counting 0 objects.
Total 0, written 0 (delta 0), reused 0 (delta 0)
Unpacking 0 objects
error: denying non-fast forward; you should pull first

From man git-push:
"If the optional plus + is used, the remote ref is updated even if it
does not result in a fast forward update."

This also makes one wonder how the 'pu' git branch is updated.


One the one hand, this means that sysadmin intervention is required to
reset such a repository, which is bad. One the other hand, this is
also a security because users cannot erase history, even if there a
cron job to prune&pack the git repositories, which is good.

Is this by design? Or should it work?

-- 

             reply	other threads:[~2006-10-29 21:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-29 21:03 Sylvain Beucler [this message]
2006-10-29 21:57 ` Overwriting bare repositories' master Sylvain Beucler
2006-10-29 22:05   ` Junio C Hamano
2006-10-29 21:59 ` Junio C Hamano
2006-10-29 22:21   ` Sylvain Beucler
2006-10-29 22:43   ` Johannes Schindelin

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=20061029210333.GG12285@localhost.localdomain \
    --to=beuc@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=savannah-hackers-public@gnu.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