savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Savannah-hackers-public] Answer to a task in order to join Savannah


From: Bob Proulx
Subject: Re: [Savannah-hackers-public] Answer to a task in order to join Savannah Administration
Date: Wed, 6 Mar 2013 16:10:02 -0700
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Adrián,

Adrián wrote:
> following the indications published here[1], I chose the following task:

Thank you for picking up the task.

> task #12149: please delete master branch for FreeON project

  https://savannah.gnu.org/task/?12149
  I ran 'git filter-branch' because I grafted that branch onto previous
  history I converted from CVS. This changed all SHA commit tags, and
  makes it impossible for me to push my master to savannah. Please
  delete master so that I can push it.

I cannot tell from what is said here but I think that maybe more
history was added to the version history.  Usually when filter-branch
is used it is used to delete history.  But it is powerful and can do
many things.

Please ask for more details.  Was more history added?  Or was history
deleted?  Basically really try to understand what happened that is
causing a non-fast-forward.

I would ask them to upload the proposed master to a proposed-master
branch and then compare the history of the two branches.  Then you can
really know what they are wanting to do.  If they are fixing,
repairing, improving, the project history then I would help them do
it.  If they are deleting history then I would get a second opinion.

[Early in project's conversion there are often some missteps in
getting the git repository converted.  It sometimes happens that it
takes a few attempts before the right recipe is found.  If it is an
improvement to the conversion then I would definitely go ahead and
upload an improved master history.  I did this with another project
not too long ago.  If however history is being deleted then that would
need more thinking.  Because we don't condone deleting history as a
general statement.]

> (Note I chose this old task mainly because the others are quite
> similar).
>
> My answer will be:
> 
> ***************************************************
> 
> Hello Nico,
> 
> I am writing you concerning the Savannah administration task#12149 (I am
> helping with the tasks there).

Very nice.

> You have the required git instructions available here:
> 
> http://savannah.gnu.org/maintenance/UsingGit
> 
> -----
> *Removing a branch*
> 
> We don't really like this, but there's a way to remove remote
> branches. We don't like it because this allow project members to
> potentially remove free software from Savannah, willingly or by
> mistake. This is mitigated by the fact it is very easy to push back
> changes.
> 
> When removing a branch, only its reference is removed, and the commit
> are still reachable by their identifiers. However, Savannah may prune
> unreachable commits (git gc), so don't count on this.
> 
> To remove a branch:
> 
> git push origin :mybranch

As you respond, we don't really like that.  See the recent note about
an accidental deletion in another project.  I imagine that if we had
the technology written already that we would disallow this activity
for all branches.  It just happens to be allowed by default.

In any case this happens to work for any branch that is not "master".
But the master branch is special in that it is the default current
branch and it isn't possible to remove the master branch.  Therefore
the above instructions won't actually work when we are talking about
the master branch.  The master branch cannot be deleted.

If this action is to be done (dependent upon learning more about the
actual happening of the version history) then have them upload a
proposed-master branch.  Then as a savannah hacker rename the
branches.  I would move master to master-$DATE and move
proposed-master to master.  (If master-$DATE is really just trash then
I think it is okay to delete it.  But of course once it is no longer
the master branch the it can be deleted with the above.)

> git push origin :master (this will delete the master branch remotely)

That will fail because master is the current branch.  It will produce
a message like this one.  (I created a test repo in order to capture
the error.)

  remote: error: refusing to update checked out branch: refs/heads/master
  remote: error: By default, updating the current branch in a non-bare 
repository
  remote: error: is denied, because it will make the index and work tree 
inconsistent
  remote: error: with what you pushed, and will require 'git reset --hard' to 
match
  remote: error: the work tree to HEAD.
  remote: error: 
  remote: error: You can set 'receive.denyCurrentBranch' configuration variable 
to
  remote: error: 'ignore' or 'warn' in the remote repository to allow pushing 
into
  remote: error: its current branch; however, this is not recommended unless you
  remote: error: arranged to update its work tree to match what you pushed in 
some
  remote: error: other way.
  remote: error: 
  remote: error: To squelch this message and still keep the default behaviour, 
set
  remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
  To ...
   ! [remote rejected] master (branch is currently checked out)
  error: failed to push some refs to '...'

Hope this helps,
Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]