threads / discuss / 21462

Common setting for interoperability repo across windows and unix?

Subject: Common setting for interoperability repo across windows and unix?

## tl;dr

7 messages between Nov 3, 2009 and Nov 4, 2009.

replies: 6people: 6as markdown or json

Dilip M· Nov 3, 2009, 15:09 UTC · lore
Hello,

I have repo in unix. The same repo is cloned onto windows.I have set "core.autocrlf=input" in both the repos.

When I do some change to a file in windows and push to unix repo, I get file deleted If I do "git status"?

What is the setting to be done if I want an repo to be access/push/pulled across windows and unix?

-- 
Dilip
Avery Pennarun· Nov 3, 2009, 15:33 UTC · re: Dilip M · lore

Re: Common setting for interoperability repo across windows and unix?

On Tue, Nov 3, 2009 at 11:09 AM, Dilip M <dilipm79@gmail.com> wrote:
Show 8 quoted lines
> I have repo in unix. The same repo is cloned onto windows.I have set
> "core.autocrlf=input" in both the repos.
>
> When I do some change to a file in windows and push to unix repo, I
> get file deleted If I do "git status"?
>
> What is the setting to be done if I want an repo to be
> access/push/pulled across windows and unix?

It sounds like you are pushing to the currently-checked-out branch of a non-bare repo.

If this is true, you should do one of the following:
- have a central "bare" repo (created with git init --bare) and
push/pull from that rather than directly
- pull, rather than push, when transferring data between repos.

You can pull from a Windows box by running git-daemon on that box from the command line. (It's easier than it sounds.)

Have fun,
Avery
Anthony W. Youngman· Nov 4, 2009, 21:45 UTC · re: Avery Pennarun · lore

Re: Common setting for interoperability repo across windows and unix?

In message <32541b130911030733i734b9f6doc366934873bf7713@mail.gmail.com>, Avery Pennarun <apenwarr@gmail.com> writes

>You can pull from a Windows box by running git-daemon on that box from
>the command line.  (It's easier than it sounds.)
That presumes you're running Cygwin ...

git-daemon doesn't (currently) work on msysgit. Currently I run git-daemon on my linpus netbook and pull/push from windows.

Cheers, Wol

-- 
Anthony W. Youngman - anthony@thewolery.demon.co.uk
Avery Pennarun· Nov 4, 2009, 22:59 UTC · re: Anthony W. Youngman · lore

Re: Common setting for interoperability repo across windows and unix?

On Wed, Nov 4, 2009 at 4:45 PM, Anthony W. Youngman <wol@thewolery.demon.co.uk> wrote:

Show 9 quoted lines
> In message <32541b130911030733i734b9f6doc366934873bf7713@mail.gmail.com>,
> Avery Pennarun <apenwarr@gmail.com> writes
>> You can pull from a Windows box by running git-daemon on that box from
>> the command line.  (It's easier than it sounds.)
>
> That presumes you're running Cygwin ...
>
> git-daemon doesn't (currently) work on msysgit. Currently I run git-daemon
> on my linpus netbook and pull/push from windows.

I didn't know that. Windows sockets are mercifully very nearly compatible with Linux ones, so hopefully this wouldn't be too hard to fix for someone that needs it. (Not me; I prefer cygwin over msys in all cases.)

Avery
Shawn O. Pearce· Nov 4, 2009, 23:01 UTC · re: Avery Pennarun · lore

Re: Common setting for interoperability repo across windows and unix?

Avery Pennarun <apenwarr@gmail.com> wrote:
Show 8 quoted lines
> >
> > git-daemon doesn't (currently) work on msysgit. Currently I run git-daemon
> > on my linpus netbook and pull/push from windows.
> 
> I didn't know that.  Windows sockets are mercifully very nearly
> compatible with Linux ones, so hopefully this wouldn't be too hard to
> fix for someone that needs it.  (Not me; I prefer cygwin over msys in
> all cases.)

git-daemon relies on fork, do work, then later exec. Windows lacks this concept. Making it hard to port.

-- 
Shawn.
Erik Faye-Lund· Nov 4, 2009, 23:10 UTC · re: Shawn O. Pearce · lore

Re: Common setting for interoperability repo across windows and unix?

On Thu, Nov 5, 2009 at 12:01 AM, Shawn O. Pearce <spearce@spearce.org> wrote:
Show 12 quoted lines
> Avery Pennarun <apenwarr@gmail.com> wrote:
>> >
>> > git-daemon doesn't (currently) work on msysgit. Currently I run git-daemon
>> > on my linpus netbook and pull/push from windows.
>>
>> I didn't know that.  Windows sockets are mercifully very nearly
>> compatible with Linux ones, so hopefully this wouldn't be too hard to
>> fix for someone that needs it.  (Not me; I prefer cygwin over msys in
>> all cases.)
>
> git-daemon relies on fork, do work, then later exec.  Windows lacks
> this concept.  Making it hard to port.

Before anyone starts hacking: I've got a working git-daemon on Windows, based on some old patches from Mike Pape, plus some extending of the start_async-api. It's still not ready for submission, but I think I've got the last important technical details nailed down now, all that is needed is a fair share of clean-up. Hopefully I'll have it ready for submission during the week-end some time.

-- 
Erik "kusma" Faye-Lund
Vietor Liu· Nov 4, 2009, 00:46 UTC · re: Dilip M · lore

Re: Common setting for interoperability repo across windows and unix?

On Tue, 2009-11-03 at 20:39 +0530, Dilip M wrote:
Show 13 quoted lines
> Hello,
> 
> I have repo in unix. The same repo is cloned onto windows.I have set
> "core.autocrlf=input" in both the repos.
> 
> When I do some change to a file in windows and push to unix repo, I
> get file deleted If I do "git status"?
> 
> What is the setting to be done if I want an repo to be
> access/push/pulled across windows and unix?
> 
> 
> 
msysgit, test:
 core.autocrlf=false

← back to recent threads