Subject: Re: git-push hook to update remote working copy safely

From: "Sam Watkins" <[email-masked]>
Date: Sat, 24 Feb 2007 04:04:43 +1100

On Fri, 23 Feb 2007 17:40:02 +0100 (CET), "Johannes Schindelin"
<[email-masked]> said:
> Hi,
>
> On Sat, 24 Feb 2007, Sam Watkins wrote:
>
> > it should merge the changes as if I'd run git-pull on the remote
> > box, and handle conflicts in the same way.
>
> But that leaves conflicts in the working directory! You _have_ to
> resolve them (or reset) before proceding.

hi Johannes,

I think it's ok for our application if the push+hook leaves conflicts in
the working directory, I just want to replicate the effect of running
git-pull remotely without actually having to go through ssh contortions
to achieve that. It might not be such a good idea to do that in the
normal usage of git, but we are using it in not a normal way, and that
is what I am trying to do, replicate the effect of running git-pull
remotely using git-push plus (unknown attempt-to-merge command or
whatever in the hook).

> Don't you have any user interaction? I.e. if the remote working
> directory is only ever changed by your hook, you can use what Junio
> sent. It is even overkill for that purpose.

no, the remote working directory can be edited just like the local
working directory. there's user interaction in the form of editing on
both ends. otherwise, the committing/syncing process is intended to be
non-interactive.

If we were using a central non-editable repository, we could use
"checkout -f" in the hook we did try that before.

thanks for your help :)

Sam