threads / discuss / 7994

Anyone running GIT on native Windows

Subject: Anyone running GIT on native Windows

## tl;dr

23 messages between May 6, 2007 and May 12, 2007.

replies: 22people: 11as markdown or json

Aaron Gray· May 6, 2007, 06:50 UTC · lore
I want to use GIT on Windows without Cygwin or MinGW.
Has anyone tried this with GNU sh and utils compiled under Windows ?
I looked for a sh to c converter but no such luck :(
Aaron
Junio C Hamano· May 6, 2007, 07:19 UTC · re: Aaron Gray · lore

Re: Anyone running GIT on native Windows

"Aaron Gray" <angray@beeb.net> writes:
> I want to use GIT on Windows without Cygwin or MinGW.
>
> Has anyone tried this with GNU sh and utils compiled under Windows ?

Call me Windoze uninitiated, but isn't that pretty much what MinGW is about?

Aaron Gray· May 6, 2007, 07:39 UTC · re: Junio C Hamano · lore

Re: Anyone running GIT on native Windows

Show 8 quoted lines
> "Aaron Gray" <angray@beeb.net> writes:
>
>> I want to use GIT on Windows without Cygwin or MinGW.
>>
>> Has anyone tried this with GNU sh and utils compiled under Windows ?
>
> Call me Windoze uninitiated, but isn't that pretty much what
> MinGW is about?
MinGW still runs in its own directory tree and uses Unix paths.

What I want is to be able to work in Windows CMD and envoke .sh scripts by association (unfortunately you have to add the .sh on the command name though).

Ideally the .sh scripts would be converted or rewritten in C, this would be the best solution.

Anyway best to get someone else take on the problem.
Aaron
Johannes Sixt· May 7, 2007, 07:02 UTC · re: Aaron Gray · lore

Re: Anyone running GIT on native Windows

Aaron Gray wrote:
> What I want is to be able to work in Windows CMD and envoke .sh scripts by
> association (unfortunately you have to add the .sh on the command name
> though).

I run the mingw port exclusively from CMD without a .sh association. So exclusively that I don't even know whether any other way of using the tools even works. Of course, you have to get used to

  git status
  git fetch
  git commit
  git rebase
etc. instead of
  git-status
  git-fetch
  git-commit
  git-rebase

and I also use CMD's tab completion frequently, with leaves \ instead of / in the paths. I also quite often do

  git clone p:\public\repos\foo.git
and
  git clone p:/public/repos/foo.git
without a hitch.

Sure, you need a set of Posix tools (sed, grep, cat, wc, sort, ...) including a Bourne shell that knows how to invoke other scripts by parsing the interpreter from the first line (#!/bin/sh). (But the perl scripts (git-remote) will probably work only with MinGW's perl.)

-- Hannes
Marco Costalba· May 7, 2007, 11:48 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

On 5/7/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
Show 9 quoted lines
> Aaron Gray wrote:
> > What I want is to be able to work in Windows CMD and envoke .sh scripts by
> > association (unfortunately you have to add the .sh on the command name
> > though).
>
> I run the mingw port exclusively from CMD without a .sh association. So
> exclusively that I don't even know whether any other way of using the
> tools even works. Of course, you have to get used to
>
Is it public available?

I see this as the long term solution to bring git under Windows (Cygwin is just a temporary shortcut although very useful).

Why to port git under Windows?
Simply, to have better possibility to be chosen by the big projects under Linux!

See Mozilla-Firefox, as example, but not only, some of the biggest projects under Linux are already ported or are being ported under Windows (Apache, MySQL, OpenOffice, etc..) and in the future KDE.

Adopting a SCM that has a native porting under Windows is more and more a sensible choice for the Linux big players.

The problem is that you don't chose an SCM each week, so when the choice is made you have to wait years to have another opportunity (see again Mozilla-Firefox thread on this subject), so not only git native on Windows is the way to go, but also possibly quickly.

  Marco
Johannes Sixt· May 7, 2007, 12:01 UTC · re: Marco Costalba · lore

Re: Anyone running GIT on native Windows

Marco Costalba wrote:
Show 13 quoted lines
> 
> On 5/7/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> > Aaron Gray wrote:
> > > What I want is to be able to work in Windows CMD and envoke .sh scripts by
> > > association (unfortunately you have to add the .sh on the command name
> > > though).
> >
> > I run the mingw port exclusively from CMD without a .sh association. So
> > exclusively that I don't even know whether any other way of using the
> > tools even works. Of course, you have to get used to
> >
> 
> Is it public available?

gitweb: http://repo.or.cz/w/git/mingw.git clone: git://repo.or.cz/git/mingw.git

I only have either time to hack on mingw.git or a Windows installation, but not both at the same time. Therefore, the port is now a bit falling back (it's still at 1.5.1). I hope to be able to change this in a few weeks.

The next big thing to think about is an installer. Does anyone have a suggestion for a free installer tool? I only know about Microsoft's WiX (wix.sf.net), but it requires .NET (for the developer, not the user).

-- Hannes
A.S. Bradbury· May 7, 2007, 12:38 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

On 5/7/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> The next big thing to think about is an installer. Does anyone have a
> suggestion for a free installer tool? I only know about Microsoft's WiX
> (wix.sf.net), but it requires .NET (for the developer, not the user).

This is outside my normal realm of expertise, but I think NSIS (http://nsis.sourceforge.net) is where it's at - notable users include Firefox 2.0, OOo, VLC etc etc...

Alex
Aaron Gray· May 7, 2007, 13:51 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

Show 22 quoted lines
>> On 5/7/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
>> > Aaron Gray wrote:
>> > > What I want is to be able to work in Windows CMD and envoke .sh 
>> > > scripts by
>> > > association (unfortunately you have to add the .sh on the command 
>> > > name
>> > > though).
>> >
>> > I run the mingw port exclusively from CMD without a .sh association. So
>> > exclusively that I don't even know whether any other way of using the
>> > tools even works. Of course, you have to get used to
>> >
>>
>> Is it public available?
>
> gitweb: http://repo.or.cz/w/git/mingw.git
> clone:  git://repo.or.cz/git/mingw.git
>
> I only have either time to hack on mingw.git or a Windows installation,
> but not both at the same time. Therefore, the port is now a bit falling
> back (it's still at 1.5.1). I hope to be able to change this in a few
> weeks.
Great I will check this out when I get some time.

An .sh to c converter would be the best solution. I will be looking into how hard this would be to do.

> The next big thing to think about is an installer. Does anyone have a
> suggestion for a free installer tool? I only know about Microsoft's WiX
> (wix.sf.net), but it requires .NET (for the developer, not the user).
I suggest Nullsoft :-
        http://nsis.sourceforge.net/Main_Page
This is used by several open source projects.
Aaron
Johannes Schindelin· May 7, 2007, 14:24 UTC · re: Aaron Gray · lore

Re: Anyone running GIT on native Windows

Hi,
On Mon, 7 May 2007, Aaron Gray wrote:
Show 25 quoted lines
> > > On 5/7/07, Johannes Sixt <J.Sixt@eudaptics.com> wrote:
> > > > Aaron Gray wrote:
> > > > > What I want is to be able to work in Windows CMD and envoke .sh 
> > > > > scripts by association (unfortunately you have to add the .sh on 
> > > > > the command name though).
> > > >
> > > > I run the mingw port exclusively from CMD without a .sh 
> > > > association. So exclusively that I don't even know whether any 
> > > > other way of using the tools even works. Of course, you have to 
> > > > get used to
> > > 
> > > Is it public available?
> > 
> > gitweb: http://repo.or.cz/w/git/mingw.git
> > clone:  git://repo.or.cz/git/mingw.git
> > 
> > I only have either time to hack on mingw.git or a Windows 
> > installation, but not both at the same time. Therefore, the port is 
> > now a bit falling back (it's still at 1.5.1). I hope to be able to 
> > change this in a few weeks.
> 
> Great I will check this out when I get some time.
> 
> An .sh to c converter would be the best solution. I will be looking into 
> how hard this would be to do.
NACK.

A stupid .sh to c converter will almost certainly result in slow and hard-to-debug code.

If you had bothered to check, you'd know that there are ongoing efforts to do the ports properly.

Ciao, Dscho

Aaron Gray· May 7, 2007, 16:39 UTC · re: Johannes Schindelin · lore

Re: Anyone running GIT on native Windows

Hi,
Show 7 quoted lines
>> An .sh to c converter would be the best solution. I will be looking into
>> how hard this would be to do.
>
> NACK.
>
> A stupid .sh to c converter will almost certainly result in slow and
> hard-to-debug code.

I had presumed you do not have to really look at the code if the tanslator is sound.

> If you had bothered to check, you'd know that there are ongoing efforts to
> do the ports properly.
This is good. So the shell code is being migrated to C ?
Could you give me a link or refernce please ?
Aaron
Johannes Schindelin· May 7, 2007, 17:45 UTC · re: Aaron Gray · lore

Re: Anyone running GIT on native Windows

Hi,
On Mon, 7 May 2007, Aaron Gray wrote:
Show 10 quoted lines
> > > An .sh to c converter would be the best solution. I will be looking 
> > > into how hard this would be to do.
> > 
> > NACK.
> > 
> > A stupid .sh to c converter will almost certainly result in slow and
> > hard-to-debug code.
> 
> I had presumed you do not have to really look at the code if the 
> tanslator is sound.

IMHO no automatic shell->C converter can be sound. Besides, you are missing that we are dealing with the opposite of POSIX here. After all, your target platform is Windows, right? That makes a sensible sh->C converter all the more difficult.

Show 6 quoted lines
> > If you had bothered to check, you'd know that there are ongoing 
> > efforts to do the ports properly.
> 
> This is good. So the shell code is being migrated to C ?
> 
> Could you give me a link or refernce please ?
You can see a lot in Git's history itself:
	git log --grep="[Mmake].*builtin" --no-merges builtin.h
The Google Summer of Code projects' home page is
	http://git.or.cz/gitwiki/SoC2007Projects
The ongoing progress for this particular project can be seen here:
	http://repo.or.cz/w/git/builtin-gsoc.git

Hth, Dscho

Asger Ottar Alstrup· May 8, 2007, 18:21 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

Johannes Sixt wrote:
> The next big thing to think about is an installer. Does anyone have a
> suggestion for a free installer tool? I only know about Microsoft's WiX
> (wix.sf.net), but it requires .NET (for the developer, not the user).
The relevant choices are:
- WiX - http://wix.sourceforge.net/
- NSIS - http://nsis.sourceforge.net/
- Inno Setup - http://www.jrsoftware.org/isinfo.php

NSIS is very low level, and thus has a pretty steep learning curve. You are more or less programming machine code. However, if you invest the time and energy, the NSIS installers are best of class: fast, small and it can do anything you want.

WiX is based on .MSI technology, which is somewhat slow, but of course it works, since it's the "official" Microsoft installation format.

Inno Setup is worth a second look. I think this might be the best choice for you: relatively simple to approach, and the installers are good.

Regards, Asger Ottar Alstrup

Han-Wen Nienhuys· May 9, 2007, 04:41 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

Johannes Sixt escreveu:
> The next big thing to think about is an installer. Does anyone have a
> suggestion for a free installer tool? I only know about Microsoft's WiX
> (wix.sf.net), but it requires .NET (for the developer, not the user).
I packaged Mingw GIT using NSIS some time ago; see 
  http://lilypond.org/git/binaries/mingw/

Due various personal reasons, I haven't been able to update this, but I will package a new version soon. Please try it to see whether there are any rough edges.

-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Johannes Sixt· May 9, 2007, 07:08 UTC · re: Han-Wen Nienhuys · lore

Re: Anyone running GIT on native Windows

Han-Wen Nienhuys wrote:
Show 7 quoted lines
> I packaged Mingw GIT using NSIS some time ago; see
> 
>   http://lilypond.org/git/binaries/mingw/
> 
> Due various personal reasons, I haven't been able to update this, but I
> will package a new version soon. Please try it to see whether there are
> any rough edges.

I've tried this shortly after you released it. But it did not work as expected. The symtom was (IIRC) that a simple

   git init
said that 'init' is not a git-command. I tried this from CMD, not rxvt.

There are meanwhile a number of improvements in the port that support relocation (i.e. an arbitrary installation directory). Could you please package the latest version from the 'devel' branch?

  git://repo.or.cz/git/mingw.git
-- Hannes
Han-Wen Nienhuys· May 11, 2007, 04:00 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

Johannes Sixt escreveu:
Show 15 quoted lines
> Han-Wen Nienhuys wrote:
>> I packaged Mingw GIT using NSIS some time ago; see
>>
>>   http://lilypond.org/git/binaries/mingw/
>>
>> Due various personal reasons, I haven't been able to update this, but I
>> will package a new version soon. Please try it to see whether there are
>> any rough edges.
> 
> I've tried this shortly after you released it. But it did not work as
> expected. The symtom was (IIRC) that a simple
> 
>    git init
> 
> said that 'init' is not a git-command. I tried this from CMD, not rxvt.

I don't know; I've tested it with Wine under Linux only. Maybe it couldn't find the git-init.exe binary, have you checked that c:/Program Files/Git/usr/bin/ was in the path?

> relocation (i.e. an arbitrary installation directory). Could you please
> package the latest version from the 'devel' branch?
> 
>   git://repo.or.cz/git/mingw.git
http://lilypond.org/git/binaries/mingw/git-1.5.1-1.mingw.exe
-- 
 Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Johannes Sixt· May 11, 2007, 16:34 UTC · re: Han-Wen Nienhuys · lore

Re: Anyone running GIT on native Windows

Han-Wen Nienhuys wrote:
> http://lilypond.org/git/binaries/mingw/git-1.5.1-1.mingw.exe

This resulted in a mostly working git toolset after I've done this in addition to installing it:

- Installed MSYS (of course ;)
- Install libiconv-2.dll, which can be found in
diffutils-2.8.7-1-dep.zip from
http://sourceforge.net/project/showfiles.php?group_id=2435 (available in
Section Snapshot->MSYS) (rename libiconv2.dll to libiconv-2.dll)
- Set the path to MSYS and Git manually.

For extra bonus points, I should also have installed bash-3.1-MSYS-1.0.11-snapshot.tar.bz2 (without which 'git am' fails) and msysDTK-1.0.1.exe for ssh and perl, but I haven't.

gitk and git-gui are untested; they need tcltk-8.4.1-1.exe, of course.
-- Hannes
Han-Wen Nienhuys· May 11, 2007, 17:35 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

2007/5/11, Johannes Sixt <J.Sixt@eudaptics.com>:
Show 9 quoted lines
> Han-Wen Nienhuys wrote:
> > http://lilypond.org/git/binaries/mingw/git-1.5.1-1.mingw.exe
>
> This resulted in a mostly working git toolset after I've done this in
> addition to installing it:
>
> - Installed MSYS (of course ;)
> - Install libiconv-2.dll, which can be found in
> diffutils-2.8.7-1-dep.zip from
Can you be more specific? Which files required this?

It is entirely coincidental that another DLL from another package works, and it's a bug in our packaging.

The path to Git should also have been set automatically. I will look into this.

-- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

Johannes Sixt· May 11, 2007, 20:07 UTC · re: Han-Wen Nienhuys · lore

Re: Anyone running GIT on native Windows

On Friday 11 May 2007 19:35, Han-Wen Nienhuys wrote:
Show 12 quoted lines
> 2007/5/11, Johannes Sixt <J.Sixt@eudaptics.com>:
> > Han-Wen Nienhuys wrote:
> > > http://lilypond.org/git/binaries/mingw/git-1.5.1-1.mingw.exe
> >
> > This resulted in a mostly working git toolset after I've done this in
> > addition to installing it:
> >
> > - Installed MSYS (of course ;)
> > - Install libiconv-2.dll, which can be found in
> > diffutils-2.8.7-1-dep.zip from
>
> Can you be more specific? Which files required this?
git.exe, for example, hence, at least all builtins.
> It is entirely coincidental that another DLL from another package
> works, and it's a bug in our packaging.
Why should this not work? The diffutils package I mentioned is from MinGW.

Anyway, I think we should not link against libiconv*.dll at all because it slows down the startup too much.

> The path to Git should also have been set automatically. I will look into
> this.

Well, I did not reboot, or log out and in again. I just opened a CMD after the installation was complete. Usually, CMD picks up new PATHs if they have been modified via the Settings->System->Advanced (or whatsitcalled) tool. So, I thought it would be the same with installations.

-- Hannes
Han-Wen Nienhuys· May 11, 2007, 22:08 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

2007/5/11, Johannes Sixt <J.Sixt@eudaptics.com>:
Show 9 quoted lines
> >
> > Can you be more specific? Which files required this?
>
> git.exe, for example, hence, at least all builtins.
>
> > It is entirely coincidental that another DLL from another package
> > works, and it's a bug in our packaging.
>
> Why should this not work? The diffutils package I mentioned is from MinGW.

Because libintl.dll is actually generated in the cross-compile (as part of the LilyPond), and might be a different version than the one you randomly downloaded.

-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Aaron Gray· May 12, 2007, 02:23 UTC · re: Johannes Sixt · lore

Re: Anyone running GIT on native Windows

Show 12 quoted lines
> Han-Wen Nienhuys wrote:
>> http://lilypond.org/git/binaries/mingw/git-1.5.1-1.mingw.exe
>
> This resulted in a mostly working git toolset after I've done this in
> addition to installing it:
>
> - Installed MSYS (of course ;)
> - Install libiconv-2.dll, which can be found in
> diffutils-2.8.7-1-dep.zip from
> http://sourceforge.net/project/showfiles.php?group_id=2435 (available in
> Section Snapshot->MSYS) (rename libiconv2.dll to libiconv-2.dll)
> - Set the path to MSYS and Git manually.

This direct link is better. The above link does not take you to the correct place.

http://sourceforge.net/project/downloading.php?group_id=23617&use_mirror=kent&filename=diffutils-2.8.7-1-dep.zip&19135304
Show 5 quoted lines
> For extra bonus points, I should also have installed
> bash-3.1-MSYS-1.0.11-snapshot.tar.bz2 (without which 'git am' fails) and
> msysDTK-1.0.1.exe for ssh and perl, but I haven't.
>
> gitk and git-gui are untested; they need tcltk-8.4.1-1.exe, of course.
Got GIT :)
Cheers,
Aaron
Jan Hudec· May 9, 2007, 18:31 UTC · re: Han-Wen Nienhuys · lore

Re: Anyone running GIT on native Windows

On Wed, May 09, 2007 at 01:41:42 -0300, Han-Wen Nienhuys wrote:
Show 12 quoted lines
> Johannes Sixt escreveu:
> > The next big thing to think about is an installer. Does anyone have a
> > suggestion for a free installer tool? I only know about Microsoft's WiX
> > (wix.sf.net), but it requires .NET (for the developer, not the user).
> 
> I packaged Mingw GIT using NSIS some time ago; see 
> 
>   http://lilypond.org/git/binaries/mingw/
> 
> Due various personal reasons, I haven't been able to update this, but I 
> will package a new version soon. Please try it to see whether there are 
> any rough edges. 

Would you care to share the installer scripts? Maybe you can find someone to help.

-- 
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Han-Wen Nienhuys· May 9, 2007, 18:40 UTC · re: Jan Hudec · lore

Re: Anyone running GIT on native Windows

2007/5/9, Jan Hudec <bulb@ucw.cz>:
Show 14 quoted lines
> > > The next big thing to think about is an installer. Does anyone have a
> > > suggestion for a free installer tool? I only know about Microsoft's WiX
> > > (wix.sf.net), but it requires .NET (for the developer, not the user).
> >
> > I packaged Mingw GIT using NSIS some time ago; see
> >
> >   http://lilypond.org/git/binaries/mingw/
> >
> > Due various personal reasons, I haven't been able to update this, but I
> > will package a new version soon. Please try it to see whether there are
> > any rough edges.
>
> Would you care to share the installer scripts? Maybe you can find someone to
> help.
see
http://git.sv.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=gub

there is a mingit.make which has the targets for the MinGW git version. Unfortunately, the last successful compile was some months ago. It's likely to be broken due to the frantic hacking that occurred in the last months, but it should be

 make -f mingit.make bootstrap
 make -f mingit.make mingw
-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen

← back to recent threads