Skip to content

Conversation

@gisphm
Copy link
Contributor

@gisphm gisphm commented Oct 19, 2015

  1. Reduce duplicate code in the previous two for loops and copy bash_completion.sh to where it should be installed as the makefile describes.
  2. Those commands in file need_git_repo actually don't need is-git-repo.

Reduce duplicate code in the previous two for loops and copy bash_completion.sh to where it should be installed as the makefile describes.
Those commands in file `need_git_repo` actually don't need `is-git-repo`. I think there may be something wrong in makefile.
@qw3rtman
Copy link
Collaborator

Has this been tested?

@gisphm
Copy link
Contributor Author

gisphm commented Dec 28, 2015

Yes, I am using it on my windows to update git-extras.

@qw3rtman
Copy link
Collaborator

@gisphm, what Git emulator are you using (cygwin, Git for Windows, msysgit)?

@gisphm
Copy link
Contributor Author

gisphm commented Dec 28, 2015

Git for windows 2.6.4 64bit

@gisphm
Copy link
Contributor Author

gisphm commented Dec 28, 2015

I have to say that this script is written for Git for Windows. It does not work with msysgit or cygwin.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It took me a while to understand what this does:

 +     >NUL FINDSTR /C:%%~ni %GITEXTRAS%\need_git_repo || (
 +      TYPE %GITEXTRAS%\helper\is-git-repo >> %PREFIX%\bin\%%~ni
 +  )

>NUL prevents output from the findstr. Funny that you can write the pipe before the actual command...

Could probably easier to understand if this is refactored to

FINDSTR /C:%%~ni %GITEXTRAS%\need_git_repo >NUL 
if %errorlevel% == 0 (...)

@jankatins
Copy link
Contributor

This needs a rebase... :-)

@gisphm
Copy link
Contributor Author

gisphm commented Jan 7, 2016

😓 @JanSchulz I am not good at batch programming...

@gisphm gisphm closed this Jan 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants