Does Git support more than 32 chars in filename in windows? - msysgit

We have a problem in cloning a repository created in unix in to a Windows box.
Git fails while checking out a lengthy file that has more than 32 characters in windows.
The file name is given below.
BaseFCS_x0020_OnLine_x0020_Identicheck_x0020_verification_x0020_serviceConsumer.java*
Is there a way to fix this issue in Git?

Try the version from cygwin (not msys).

This should also run with msys.
Just try to clone it to a shorter path like C:\Dev or so.

Related

Can't initialise git-flow with SourceTree

My problem
In the current project I'm working on, I'm not able to initialise gitflow with SourceTree. Can you help?
My version of SourceTree is 2.7.6.
Screenshots
If I try to do
then I have this dialog
But when I confirm, I have the error
I had exactly the same problem. I moved SourceTree to a different directory, and its path contained a space character from one of its parent directories.
As a result, the path to its internal getopt was stored by SourceTree in ~/.gitflow_export (and, indeed, rewritten at every launch) and contained that space without the required quotes.
Removing the space in the directory name solved the issue. If you move SourceTree around, make sure its path contains no space.
/bin/getopt: not a valid identifier suggests an issue with getopt. There were few reported to Attlassian e.g. Is git-flow broken in Sourcetree 2.7.1?
A possible workaround to install getopt by hand as per Post installation setup:
Install GNU getopt via Homebrew:
brew install gnu-getopt
Create a ~/.gitflow_export with the content export FLAGS_GETOPT_CMD="$(brew --prefix gnu-getopt)/bin/getopt".
For git-flow versions prior to 1.4.0-dev.28
Create a ~/.gitflow_export with the content alias getopt="$(brew --prefix gnu-getopt)/bin/getopt".
If you have installed GNU getopt through other means than Homebrew, substitute $(brew --prefix gnu-getopt)/bin/getopt with the location of the GNU getopt file.
Apologies in advance. Managed to resolve the issue for myself with a hack.
My solution was based on the above observations. (Which I tried)
The issue was the space in the name Sourcetree 3 (in my case)
In the Applications folder I selected the Icon for launching the application and removed the space. Gitflow is now working.
Sorry if you are horrified by my crude hack but it works and I do not have more time to invest into this issue.

Using Github repo's in LIght Table

Is there a way to use or 'import' Github clojure-projects in LightTable?
I am using Windows 7 64-bit. I tried something with leiningen but it gives me an error:
can not find C:\Program Files\Java\jre7\lib\amd64\jvm.cfg
actually, the real path is
C:\Program Files (x86)\Java\jre7\lib\i386\jvm.cfg
what should I do?
Modify your environment variable %JAVA_HOME% to
C:\Program Files (x86)\Java\jre7\
And it should do the trick.
About importing Github projects, I don't know what you're talking about...

Eclipse project.properties backslash paths considered harmful

I am working in a team that is developing Android software. Some team members use Windows, some use Macs, and I have been known to use Linux. Everyone uses Eclipse.
Eclipse writes a file called project.properties; here's an example. The important part is the last three lines, the android library reference paths.
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-17
android.library.reference.1=../private-code/lib/SomeLibrary
android.library.reference.2=../google-play-services_lib
android.library.reference.3=../FacebookSDK
The above is what the file looks like when Eclipse on Mac or Linux writes it. When Eclipse on Windows writes it, the library reference lines are written with backslashes.
Of course on Windows, backslashes are acceptable path separators. But on Mac and Linux such paths do not work. The thing is, on Windows, forward slashes work perfectly well. So, our policy now is always to commit the file with forward slashes, so that it will work for everyone.
But this is a pain for our Windows users, and it's a pain for the rest of us when the Windows users make a mistake, so I'm looking for a technical solution. I have two ideas:
Find a setting somewhere in Eclipse on Windows, telling it to use forward slashes when saving paths in files like project.properties. (Why the heck isn't that the default?!?)
We use Mercurial, so: install some sort of "hooks" that will solve the problem.
Install a commit hook on the Windows computers, so that the file is committed into the repository with the backslashes replaced by forward slashes.
Install a pull hook on the Mac and Linux computers; so if the file gets committed with backslashes, they get fixed up by the time the files are written.
The commit hook seems cleaner, so if both are available I'd take a commit hook over a pull hook.
I found a Mercurial extension that edits tabs to spaces, which is at least sort of similar to what I want. It's complex enough that I'm a bit leery of trying to modify it into what I need.
https://www.mercurial-scm.org/wiki/CheckFilesExtension
The other strategy is to add a hook that detects backslashes in the paths, and simply aborts the commit, forcing the Windows user to fix the file by hand before committing. That would be better than nothing.
I would keep both versions in the project (as project.properties.windows and project.properties.linux) and create a symbolic link pointing to the right file depending on the OS. Call this symbolic link project.properties and let it be ignored by the version control.
Obviously the disadvantage of this setup is that when windows users update their project.properties file (which points to project.properties.windows), the linux version must be updated manually, and vice-versa, but it doesn't sound like a big deal tho, I presume you don't update this file very often.
- To create the links -
Create a file make_link.sh to setup Linux environments, with the following command:
ln -s $(readlink -m project.properties.linux) $(readlink . -m)/project.properties
Create a file make_link.bat to setup Windows environments, with the following command:
mklink project.properties project.properties.windows
You can commit those scripts as well.
We faced the similar situation due to the path of the local library varies, so after searching a while we found that the best practice to use centralized repository tools (Git for us), "Remove all eclipse dependent/Specific settings files from Repository". And that works fine for us. This way, the change to eclipse settings file will not be effecting the central repository or get committed.

Can I use the embedded hg command line in SourceTree?

I'm really happy that SourceTree has Mercurial embedded. On the odd occasion I would like to run an hg command from the CLI, like
hg status
To which I get
hg: command not found
Can I make modifications to my environment path to get the command line working for the embedded version, or do I have to install and manage a separate instance of Mercurial if I want to accasionally use the command line?
I'm using SourceTree OS X version 1.7.2
(This might be a superuser question, but I thought this community has a better chance of knowing and responding.)
The binary lies within SourceTree's bundle, in the resources-folder and is called hg_local.
/Applications/SourceTree.app/Contents/Resources/mercurial_local
You might want to alias it somewhere else (like /usr/local/bin) and rename it on the go:
ln -s /Applications/SourceTree.app/Contents/Resources/mercurial_local /usr/local/bin
It might be a better idea to use some package manager and install mercurial from their repositories, eg. Homebrew. This can be done within few minutes and you gain easy access to lots of other command line tools you might want.
# First install homebrew, than run this command
brew install mercurial

Howto update Perl v5.8.8 for git?

I have following Problem.
I want to build Qt5 by my own, to be able to use it with Visual Studio 2012. I followed the instructions in the Qt Wiki.
My problem is that when I try to call init-repository
perl init-repository
I get following error:
Hint: Make sure that Perl is added to the path in front of git since that ships an outdated version (Perl 5.8), which will cause the scripts to fail.
This is because the with git shipped perl version is 5.8.8. It doesn't matter, that I have the newest version installed.
Can someone tell me how to update my perl version inside git, to be able to build Qt5?
Regards
It sounds like you are working on Windows, I assume with some recent version of msysgit.
If you are using the shell that comes with msysgit, then it is likely that the shell has modified your PATH variable to put /bin ahead of /c/path/to/new/perl. You can check this by opening the shell and running echo $PATH or even which perl.
To make the shell use you 'new' perl, you can try the following:
export PATH=/c/path/to/new/perl:$PATH