Hi,
On 2015-07-28 01:28, Baldurien wrote:
> Le lundi 27 juillet 2015 20:52:03 UTC+2, Johannes Schindelin a écrit :
>
>> On 2015-07-24 01:10, Baldurien wrote:
>>
>> > - how can I test both without harming previous install of git-bash ?
>>
>> Use the portable Git available from
>>
https://github.com/git-for-windows/git/releases/latest
>
> Is setting $HOME to whatever I want sufficient to isolate setting of
> Git
> 1.9.5 from those of Git 2.4.6 ?
That is not necessary unless you you want to use different
$HOME/.gitconfig settings.
> Is it normal that by default it does not load ~/.bashrc ? (I tried a
> ~/_bashrc just to see if it was like vim and _vimrc, but did not work).
Yes:
https://github.com/git-for-windows/git/issues/191 Contributions
welcome!
>> > - which application will gain something from git-for-windows ? (I
>> > often
>> > use find, xargs and grep to lookup in a file).
>>
>> As stated above, the installer of Git for Windows will support Git's
>> own
>> scripts. If your scripts happen to work with those, you're in luck.
>>
> I think most users like me were happy to find some power tool along
> with
> GIT, especially when you know how the cmd.exe is.
> And that's exactly why I now tend to expect them from a *Git for
> Windows*
> update to still provide them, even if the gap is important (1.9.5 ->
> 2.4.6)
It is actually 1.9.5 -> 2.5.0 now.
> This is the problem when you bring some nice tool with other nicer tool
> ;)
> The people becomes greedy !
Well, I become greedy back: when do you start contributing? ;-)
> error: could not find zip in PATH.
> error: could not find unzip in PATH. <- present in git-1.9.5
It is true that it used to be in Git for Windows 1.9.5. It was added in
https://github.com/msysgit/msysgit/commit/e9b7f92b and it is very
unclear to me why it was added.
In general it would be a good idea to use MSys2 (or even Cygwin) if you
want to run general POSIX scripts on Windows (instead of abusing Git for
Windows for that purpose): they both come with proper package management
systems and many packages to choose from. If you must, you can also use
the Git SDK (which is essentially MSys2 pre-configured to build and
develop Git for Windows), but please note that the main purpose of the
Git SDK is really to support developers who want to contribute to Git
for Windows.
> I don't remember really using the zip/unzip command (I more often use
> 7-Zip
> GUI), but if I want them incorporated in my GIt for Windows env, do you
> confirm the proper way would be to:
>
> 1. Download Git SDK installer (see note below)
> 2. pacman -S whatever-package-contains-zip
You may want to run `pacman -Syu` before that to update the installed
packages and the package index.
> 3. Enjoy the whole.
> 4. Prepare an installer if I want to broadcast a copy on other post or
> use
> the portable stuff
Basically, yes.
> *Note:* while using the Git SDK installer, I ran into the following
> errors:
> SF download server are offline (?) ; it was fixed by providing new
> mirror
> URL (see issue #702
> <
https://github.com/Alexpux/MINGW-packages/issues/702>)
> The file in /etc/pacman.d needs to be update manually, before
> relauching
> the git-sdk-installer-1.0.0-rc-3-64.7z.exe, eventually cleaning the
> database lock before.
The git-sdk-installer version 1.0.0 already fixed the issue.
> By the way, in GIT 1.9.5 the VIM did not contain the runtime file
> {~9MiB),
> but there are now present in the portable
> PortableGit-2.4.6-5th-release-candidate-32-bit.7z.
> Is that intended or due to the MSys2 package ?
It is most likely due to the MSys2 package. But which file are you
talking about?
> Will it stays in future release ?
You tell me! ;-)
Seriously, in the course of addressing
https://github.com/git-for-windows/git/issues/262 I went so far as to
export from process monitor all files that were used during a complete
run of the test suite (which passed BTW), and of regular interactive
usage like using vim and pushing via SSH. If some ~9MB file would have
not shown up in that list of files, I would definitely have had a look,
I think ;-)
But I like to be proven wrong on such things.
>> > So I tested a little the portable version, as far as I could tell:
>> >
>> > - my prompt command no longer works ; probably because of bash 4
>> >
>> > [00:48:02] /
>> > $ echo $PS1
>> > \e[0;36m[\e[1;36m\t\e[0m\e[0;36m]\e[0m \e[0;33m\w\e[0m*$(__git_ps1 '
>> > \e[0;31m(\e[1;31m%s\e[0m\e[0;31m)\e[0m')*\n$
>> > bash: command substitution: line 1: syntax error near unexpected token
>> > `)'
>> > bash: command substitution: line 1: `__git_ps1 ' (%s)')'
>> >
>> > It seems specific to MSYS2
>> > :
http://stackoverflow.com/questions/21517281/ps1-command-substitution
>> > I did not try with backtick.
>>
>> Why don't you try with backtick?
>>
>
> Because I hate backticks :) on AZERTY keyboard, \$() is far easier to
> type
> than backtick (Alt Gr + 7, then Space .... and another Alt Gr + 8 for
> the
> backslash).
>
> Well, with backticks it works (but I still hate them) although I need
> to
> backslashes the twice .:
>
> git) ps1_bits+="*\`*__git_ps1
> '${space}\e[0;31m(\e[1;31m%s\e[0m\e[0;31m)\e[0m'*\`*" ;;
>
> Instead of:
>
> git) ps1_bits+="\$(__git_ps1
> '${space}\e[0;31m(\e[1;31m%s\e[0m\e[0;31m)\e[0m')" ;;
Good to know. This tip would probably make for a good addition to our
wiki.
>> > - vim also complains (due to Windows CRLF):
>> >
>> > line 3:
>> > E488: Trailing characters: number^M
>> > line 4:
>> > E488: Trailing characters: nowrap^M
>> > line 5:
>>
>> `dos2unix "$HOME/.vimrc"`
>>
>>
> Yes. While not using dos2unix, I've fixed this one.
>
> But I don't understand why vim suddenly restrict _vimrc line ending to
> LF
> only (while the "_vimrc" filename is specific to windows).
> That, and the fact it can open CRLF encoded file without errors, make
> this
> one quite stupid - like the whole line encoding problem.
It is MSys2's vim, it is possible that a patch we carried in msysGit
still wants to be ported over. It would require a little bit of work;
Yet another excellent opportunity for you to contribute...
>> > - find seems to be a lot faster than previously.
>>
>> Nice, although find(1) is not really what the Git project strives to
>> support explicitly.
>>
>
> For the fun facts: on my E:/git folder (a SSD), with 53415 files and
> 5.4GiO
> of data:
>
> time find (with Git 2.4.6)
> real 0m11.349s
> user 0m2.277s
> sys 0m3.244s
>
> time find (with Git 1.9.5)
> real 2m34.342s
> user 0m4.461s
> sys 0m12.277s
>
> As you can see, you gain ... something :)
Indeed!
Thank you for the feedback! I am looking forward to more contributions
from you ;-)
Ciao,
Johannes