git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: auto-merge after push?

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 16, 2009, 08:01 UTC
Message-ID
<alpine.DEB.1.00.0907160953580.3155@pacific.mpi-cbg.de>
In-Reply-To
<20090715195718.GA12033@redhat.com>
Hi,
On Wed, 15 Jul 2009, Michael S. Tsirkin wrote:
Show 19 quoted lines
> On Wed, Jul 15, 2009 at 12:31:00PM -0700, Junio C Hamano wrote:
> > "Michael S. Tsirkin" <mst@redhat.com> writes:
> > 
> > > So, let me summarize the issues:
> > > - if the tree is pushed into while files are being actively read
> > >   (e.g. built from), the build will get an inconsistent state
> > > - even worse if one of the files is open for editing or is being written
> > >   into: the file will get corrupted
> > > - if there are uncommitted changes in the tree, the push is denied
> > >
> > > Are there others?
> > 
> >  - If you choose to detach-on-push, the user who _thought_ was advancing
> >    the history of a branch using the work tree will get very confusing
> >    results.  The branch will be advanced by the push, and the work tree
> >    user is required to notice the situation, later at some point merging
> >    the work done in the work tree that went to the detached HEAD state.
> 
> I never use detach on push. Let's remove that option for now?
I do not use it.  But I added it upon explicit request.
Show 5 quoted lines
> >  - What happens if the automerge gets conflict?
> 
> push is denied, unless you push with -f, then I think you get the new
> head.  Note that merge is not the right word here: only fast forward is
> done I think.  Right, Dscho?
Lemme look at that patch (it is pretty old by now...).

Actually, my patch has nothing to do with allowing only fast-forwards unless the push is forced.

The documentation states that a read-tree -u -m HEAD is performed. This can fail when a file is not up-to-date. As far as I can tell, read-tree -u -m HEAD refuses to update the index in such a situation.

So if there are files to be updated by the push which are dirty, the push will update the ref as requested, nevertheless error out, the index will be untouched, and so will be the working directory (unless I fscked up the patch, which is quite possible, as I was writing this just to get a quieter mailing list again).

One thing I got right, though, was the commit message.
Show 7 quoted lines
> > Having said that, I think it is a _wrong_ approach to try summarizing 
> > the issues along these lines, without stating the most fundamental 
> > restriction.
> 
> Sure. I am just trying to figure out all the details before I try to 
> write this up. The coordination issue is obviously the main thing, I was 
> trying to enumerate the less obvious ones.

Happily enough, it is the duty of the local guy to actually set the config variable. And to allow the other guy (who might be one and the same guy a la "I am schizophrenic and me too") is also the privilege of the local guy.

Ciao, Dscho

Previous: Michael S. TsirkinNext: Johannes Schindelin
Message 17 of 18 in “auto-merge after push?”
  1. Michael S. TsirkinMay 11, 2009
  2. Jakub NarebskiMay 11, 2009
  3. Johannes SchindelinMay 11, 2009
  4. Michael S. TsirkinMay 11, 2009
  5. Johannes SchindelinMay 11, 2009
  6. Michael S. TsirkinMay 11, 2009
  7. Johannes SchindelinMay 11, 2009
  8. Michael S. TsirkinMay 19, 2009
  9. Michael S. TsirkinJun 11, 2009
  10. Michael S. TsirkinJul 11, 2009
  11. Johannes SchindelinJul 12, 2009
  12. Junio C HamanoJul 12, 2009
  13. Johannes SchindelinJul 12, 2009
  14. Michael S. TsirkinJul 15, 2009
  15. Junio C HamanoJul 15, 2009
  16. Michael S. TsirkinJul 15, 2009
  17. Johannes SchindelinJul 16, 2009
  18. Johannes SchindelinMay 11, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.