login
Header Space

 
 

Re: git push to a non-bare repository

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Theodore Tso <tytso@...>
Cc: Junio C Hamano <junkio@...>, git <git@...>
Date: Sunday, March 18, 2007 - 11:47 pm

Theodore Tso <tytso@mit.edu> wrote:

Ah, my bad, it defaults to false:

  static int deny_non_fast_forwards = 0;

I should have known better, as I run a 1.5.x (aka 'next') server
for a workgroup and I never have that set, but use instead a complex
update hook that decides if a fast-forward is required or not.
 

  git-diff $old $new | git-apply --index ?

If the patch does not apply, nothing gets updated.  If it does apply,
the index is also updated and stat data updated.

OK, it doesn't quite handle every case, as sometimes a patch will
reject but the internal 3-way merge from xdiff that is called by
merge-recursive will succeed, but this does protect your working
tree and doesn't require making a temporary copy.


Of course another possible approach is to stuff the entire working
directory into a temporary tree, and then merge.  If the merge
doesn't work, you can reset to the temporary tree.  Unfortunately the
working directory is "in flux" during that process... its not atomic.

-- 
Shawn.
-
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:
git push to a non-bare repository, Matthieu Moy, (Sun Mar 18, 1:31 pm)
Re: git push to a non-bare repository, Theodore Tso, (Sun Mar 18, 10:00 pm)
Re: git push to a non-bare repository, Matthieu Moy, (Mon Mar 19, 5:19 am)
Re: git push to a non-bare repository, Junio C Hamano, (Sun Mar 18, 9:55 pm)
Re: git push to a non-bare repository, Shawn O. Pearce, (Sun Mar 18, 10:21 pm)
Re: git push to a non-bare repository, Theodore Tso, (Sun Mar 18, 10:47 pm)
Re: git push to a non-bare repository, Shawn O. Pearce, (Sun Mar 18, 10:56 pm)
Re: git push to a non-bare repository, Theodore Tso, (Sun Mar 18, 11:33 pm)
Re: git push to a non-bare repository, Shawn O. Pearce, (Sun Mar 18, 11:47 pm)
Re: git push to a non-bare repository, Junio C Hamano, (Mon Mar 19, 12:14 am)
Re: git push to a non-bare repository, Theodore Tso, (Sun Mar 18, 11:21 pm)
Re: git push to a non-bare repository, Shawn O. Pearce, (Sun Mar 18, 11:53 pm)
Re: git push to a non-bare repository, Sam Vilain, (Mon Mar 19, 7:58 pm)
Re: git push to a non-bare repository, Junio C Hamano, (Mon Mar 19, 8:49 pm)
Re: git push to a non-bare repository, Junio C Hamano, (Mon Mar 19, 8:54 pm)
Re: git push to a non-bare repository, Nicolas Pitre, (Mon Mar 19, 12:08 am)
Re: git push to a non-bare repository, Theodore Tso, (Mon Mar 19, 2:25 am)
Re: git push to a non-bare repository, Nicolas Pitre, (Mon Mar 19, 11:16 am)
Re: git push to a non-bare repository, Junio C Hamano, (Mon Mar 19, 2:44 am)
Re: git push to a non-bare repository, Nicolas Pitre, (Mon Mar 19, 11:20 am)
Re: git push to a non-bare repository, Junio C Hamano, (Sun Mar 18, 3:47 pm)
Re: git push to a non-bare repository, Sam Vilain, (Sun Mar 18, 5:51 pm)
Re: git push to a non-bare repository, Junio C Hamano, (Sun Mar 18, 6:18 pm)
speck-geostationary