Re: Working copy revision and push pain

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jonathan Watt
Date: Sunday, March 23, 2008 - 8:25 am

Johannes Schindelin wrote:

If you push to the current branch of a non-bare repository, then as things
stand, whatever was pushed to the current branch will be reverted on the next
commit(!). Push hasn't just pushed changesets to the repository, it's
essentially screwed up the working copy. I personally can't see how this
behavior is useful or in any way "right", or why you'd want it that way. On the
other hand detaching HEAD makes sure that all push has done is push changesets,
and you've essentially created a branch. To me that seems like the only correct
thing to do. (It also happens to be the way Mercurial behaves.)

I'd venture that if you're pushing into a non-bare repository then you know the
state of the working copy, and you know if you're going to cause pain. (And it's
probably local.) If it's a shared repository, why is there a working copy? If
it's someone else's repository, the two of you probably know what you're doing.
These two seem like relative edge cases though, and even then, detaching HEAD
seems like the right think to me.


As I said, I don't want to update the files in the working copy. Seems like a
different issue to me.

Jonathan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 5:39 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 6:02 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 6:19 am)
Re: Working copy revision and push pain, Elijah Newren, (Sun Mar 23, 6:45 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 6:54 am)
Re: Working copy revision and push pain, Elijah Newren, (Sun Mar 23, 7:06 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 7:11 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 7:22 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 7:27 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 7:34 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 7:35 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 7:48 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 7:56 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 8:25 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 9:00 am)
Re: Working copy revision and push pain, Johan Herland, (Sun Mar 23, 9:20 am)
Re: Working copy revision and push pain, Jonathan Watt, (Sun Mar 23, 10:24 am)
Re: Working copy revision and push pain, Junio C Hamano, (Sun Mar 23, 11:21 am)
Re: Working copy revision and push pain, Johannes Schindelin, (Sun Mar 23, 11:23 am)
Re: Working copy revision and push pain, Junio C Hamano, (Sun Mar 23, 12:42 pm)
Re: Working copy revision and push pain, Elijah Newren, (Sun Mar 23, 12:48 pm)
Re: Working copy revision and push pain, Johannes Schindelin, (Mon Mar 24, 8:22 am)
Re: Working copy revision and push pain, Johan Herland, (Mon Mar 24, 11:00 am)
Re: Auto detaching head options (Re: Working copy revision ..., Johannes Schindelin, (Tue Mar 25, 12:58 pm)