Users can still get this by copying our /etc/gitattributes.suggested
file into their repository or creating their own .gitattributes file.
But now they won't have to wonder why a whole bunch of line endings are
marked as changed after cloning a repository that was created without
normalization.
This file still lives in /etc/gitignore.suggested, and users can copy it
from there into their own repositories if desired. But now they won't
have to wonder why some files mysteriously aren't being tracked by Git.
When using rxvt the backspace key deletes the whole line because for
rxvt and the bash prompt the backspace key produces different input.
This patch ammends the handling of backspace/control-backspace for rxvt
so that it only deletes one char at a time. Normal bash prompt input
is left as before.
Reported-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
commit 006d11d (Help 'file' find its magic file) added the MAGIC
variable to /etc/profile. That makes sense in the msysgit development
envronment but not for the installed version (because 'file' doesn't
get installed).
This checks for the existence of the magic file before setting MAGIC.
That way it's possible to use another 'file', e.g. from Cygwin inside
the git bash.
Signed-off-by: Stefan Naewe <stefan.naewe@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
The 'file' utility is very useful, but unless you had the same setup
as this developer, your 'file' utility would not find its database
of file type fingerprints. Let's change that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Revert the change to copy-files.sh done in 678125b that was meant to fix the
MD5 comparison done for msys-1.0.dll in /etc/profile, which was broken due
to the way the file path is written since 42a6098.
Instead, do not do a plain text comparison of MD5 sums, but let md5sum
resolve the file path and do the comparison itself.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
At least it won't crash diff, untill we integrate unrtf (or something
similar) into msysgit distribution.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
As suggested by Consul on the list:
Is it possible to make the antiword handling Word templates (*.dot)
as well as documents (*.doc) by default?
It works fine, if I add
[diff "antiword"]
textconv = antiword -f
into the config file and
*.dot diff=antiword
into the attributes file, but this is repository specific.
Can we make this behavior default?
Suggested-by: Alex Ivanov <void@aleksoft.net>
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Acked-by Alex Ivanov <void@aleksoft.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is useful for users on both msys/mingw and cygwin, as it prevents
cygwin executables/libraries from "contaminating" operations on
msys/mingw, like compilation and execution.
[Sebastian Schuberth suggested a much shorter invocation as per
http://stackoverflow.com/questions/370047/ (we added proper handling of
the trailing separator), and to avoid unnecessary spawning, the call is
wrapped in a case...esac construct]
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We already do coloring for diff, but not for other commands. In my view,
status, branch and interactive are too used often, so it would be
logical to turn colors either on or off for the whole bundle. I vote for
on.
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
XXX at present bin/astextplain output encoding is hardcoded to UTF-8.
Even in such a state the service provided is more than useful, so let's
please merge the patch.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
The curl executable uses that file as a source for root certificates,
but running curl as a library does not do that automatically. So we
have to tell Git about that file.
Suggested by Bosko Ivanisevic.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When starting the Git Bash or Git GUI from the start menu or a quick
launch icon, we would like it to change the current working directory
to the user home, but at the same time, the shell should _not_ change
the current working directory when called from somewhere else.
Unfortunately, we cannot call bash without --login, and there is simply
no way to pass an option via the command line with that option, and
we cannot modify the environment in .lnk files.
But what we actually want to do is to set the current working directory,
which _can_ be done from .lnk files, even to paths specified by
environment variables.
So let's just set the current working directory to %HOMEDRIVE%%HOMEPATH%.
This is a slight change in behavior: if the user set the environment
variable HOME to something different, the initial current working
directory will not be what HOME says. We'll just have to live with that.
Thanks go to Sebastian Schuberth for help with the InnoSetup installer
and Heiko Voigt for pushing the issue forward.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is not meant to provide a safeguard against hackers, but a safeguard
against a stale msys-1.0.dll which was not updated when installing into
an existing Git setup.
If /etc/msys-1.0.dll.md5 exists and does not match the md5 sum of
/bin/msys-1.0.dll (traditionally the most likely not-correctly-updated
file), it will complain loudly, read: in red letters.
If the md5 sum matches, the file will be deleted because the check is no
longer necessary (or even misleading if it fails in the future).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Heiko Voigt changed msys-1.0.dll to leave HOMEDRIVE and HOMEPATH alone, so
we should actually use it, too.
While at it, use this default not only if the variable HOME is unset, but
also if it does not point to a directory.
This should finally take care of msysGit issue 108.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
By including the option '--show-control-chars' in the alias for 'ls',
Korean and accented characters will be shown correctly.
This fixes msysGit issue 188.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The user may want to override some settings of /etc/profile in ~/.bashrc,
so source this script at the end.
This fixes msysGit issue 255.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If the user has non-ASCII characters in her name, the variable $HOME
(being set to $USERPROFILE) will disagree with the encoding of the
actual path as it is on-disk.
The reason is that the environment variables adher to the current locale
(e.g. CP1252), but the file system stores file names in UTF-16.
As long as MSys is not modified to handle this case as the user would
expect, we fall back to setting HOME=/ (which is better than nothing).
This works around msysGit issue 108.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Plink can be configured to default to the telnet protocol, but of course,
there will never be a Git daemon listening on the telnet daemon. It has
been reported on the msysGit issue tracker that setting the environment
variable PLINK_PROTOCOL to 'ssh' would fix the issue.
Since it cannot hurt to set that environment variable, let's do it and
hope that it works as expected.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When I turned on the Git prompt, I overlooked the fact that we already
had a definition for PS1. So let's go back to the old version, but add
__git_ps1 instead.
Noticed by demodevil@gmail.com.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Actually, make sure that if no post-checkout hook is installed, that
the default post-checkout hook is installed, as one hook is better
than no hook at all.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Only "cd $HOME" when not called from the shell extension. We detect that
by checking if there is an environment variable starting with "!". That
should not happen when bash is started directly.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The command line prompt provided by the bash-completions is really useful
and nice; let's use it per default.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We used to switch directories only when Git was not yet built. Be
consistent and do it always.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Using HTML as the default help format is no longer hardcoded
into help.c. Instead, we now use the configuration variable
help.format provided by core git to choose the help format.
Official git recently learnt to warn about irreversible CRLF
conversions. So it is time to switch on core.autocrlf=true on
Windows. This commit modifies /etc/gitconfig accordingly.
Note, msysgit developers should override this changed default by
explicitly setting core.autocrlf=false in msysgit and
msysgit/git. Msysgit is not (yet) a real cross-platform project
but more like a Unix project.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Since WinGit bundles /etc/gitconfig, we better track it. Also, this
allows us to set sensible defaults, such as symlinks = false and
packSizeLimit = 2g.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
vim ignores /etc/vimrc. The real location for this file is
/usr/share/vim/vimrc (which exists already...).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
HOME is expected to be there. Either HOME is automatically
set to USERPROFILE or it was set present in the environment.
There's no need to create the directory. If it is missing
there's something fundamentally wrong. Hence, we report an
error and quit.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit normalizes the HOME to match the expectation of
Unix programs. All backslashes are converted to slashes. At
least ssh is know to fail to locate its configuration files
if HOME contains backslashes.
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
If /cmd is already in the PATH, no need to show the message.
While at it, check for a message-of-the-day, and display it if there is one.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Package only bootstrap into GitMe.exe. Bootstrap then fetches installer
(the whole /share/GitMe/Installer directory from msysgit.git) and runs
setup-msysgit.sh that must be there.
Installer directory can also contain additional files to put into existing
bootstrapper directories (such as /bin or /etc) or even new directories.
This way we will not have to rebuild GitMe.exe every time we integrate devel->master.
Signed-off-by: Dmitry Kakurin <Dmitry.Kakurin@gmail.com>
Kills the annoying bell, and handles keys better.
(Might even help with Johannes' problem with RXVT)
Signed-off-by: Marius Storm-Olsen <mstormo_git@storm-olsen.com>
For some strange reason, the code in pager.c is not sufficient. But now
you can set diff.core = auto...
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Now that we decided that GitMe, AKA Net installer (a minimal system which has
just enough to clone msysgit.git and mingw/4msysgit.git, and will then build git)
and a snapshot installer, which comes with all sources, but does not set up the
repositories, /etc/profile is not the right place to do the cloning anymore.
Sidenote: We plan to have three installers:
1) GitMe, AKA Net installer (minimal system to clone all)
2) msysGit, AKA full installer (full system, does not clone)
3) msysGitSnapshot (contains the build env, the sources, but no .git/)
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This initializes an independent branch, the way it should have been, with
git/ as a subproject.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>