git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sam Watkins" <swatkins@fastmail.fm>
To: git@vger.kernel.org
Subject: Re: git-push hook to update remote working copy safely
Date: Sat, 24 Feb 2007 04:04:43 +1100	[thread overview]
Message-ID: <1172250283.5505.1176180417@webmail.messagingengine.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0702231737300.22628@wbgn013.biozentrum.uni-wuerzburg.de>


On Fri, 23 Feb 2007 17:40:02 +0100 (CET), "Johannes Schindelin"
<Johannes.Schindelin@gmx.de> 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

  reply	other threads:[~2007-02-23 17:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23  8:51 git-push hook to update remote working copy safely Sam Watkins
2007-02-23 11:00 ` Junio C Hamano
2007-02-23 16:35   ` Sam Watkins
2007-02-23 16:40     ` Johannes Schindelin
2007-02-23 17:04       ` Sam Watkins [this message]
2007-02-23 18:13         ` Johannes Schindelin
2007-02-23 18:32       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1172250283.5505.1176180417@webmail.messagingengine.com \
    --to=swatkins@fastmail.fm \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).