The function strip_path_suffix() will try to strip a given suffix from
a given path. The suffix must start at a directory boundary (i.e. "core"
is not a path suffix of "libexec/git-core", but "git-core" is).
Arbitrary runs of directory separators ("slashes") are assumed identical.
Example:
prefix = strip_path_suffix("C:\\msysgit/\\libexec\\git-core",
"libexec///git-core");
will set prefix to "C:\\msysgit".
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
On Windows, off_t is restricted to 32-bit, even if it is perfectly
capable of using 64-bit offsets; Force the use of 64-bit offsets
by overriding the declarations of off_t and lseek() with their 64-bit
counterparts.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In msysGit, the PATH contains the MSys paths before anything else,
so we can use "sort" (instead of "/usr/bin/sort"), just like git.git.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In the meantime, gitk's Makefile has learnt to detect the absence of
msgfmt and use the drop-in replacement in Tcl (which was developed
for msysGit, but has been adopted both by gitk and git-gui).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
We have our own msys-1.0.dll, which needs no more munging of the
ssh transport URLs. Besides, almost everything related to remotes
is builtin by now.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If we ever hope to use plain upstream git.git in msysGit, we need to
play nice with other platforms. So move the MinGW specific settings
where they do not affect anybody else.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
GCC has no problems with PRIuMAX with recent GCC versions, but these
versions do not like I64u any longer.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In bf788d7(Makefile: be nice when running in a path containing spaces),
the Makefile was changed so that the SHELL_PATH is quoted, but that is
actually not necessary, as we still have POSIX paths at that point, and
we use /bin/sh which has no space in it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Upstream Git learnt the trick from us, but decided to call it 'sample'
instead of 'noexec'.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* js/maint-remote-remove-mirror:
builtin-remote: make rm operation safer in mirrored repository
builtin-remote: make rm() use properly named variable to hold return value
* js/notes:
git-notes: fix printing of multi-line notes
notes: fix core.notesRef documentation
Add an expensive test for git-notes
Speed up git notes lookup
Add a script to edit/inspect notes
Introduce commit notes
Conflicts:
pretty.c
* rc/http-push:
http-push: wrap signature of get_remote_object_url
http-push: add back underscore separator before lock token
http-push.c: get_remote_object_url() is only used under USE_CURL_MULTI
http-push: refactor request url creation
* cb/mergetool:
mergetool: fix running mergetool in sub-directories
mergetool: Add a test for running mergetool in a sub-directory
mergetool: respect autocrlf by using checkout-index
With MinGW based Git, we must not use the POSIXified version of paths.
So we need to use 'pwd -W' instead of 'pwd' without options.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1) Instead of requesting OLD_ICONV on all Mac OS X versions except for 10.5
(which will break when 10.6 is released), exlicitly request it for versions
older than 10.5.
2) NO_STRLCPY is not needed since Mac OS X 10.2. Noticed by Benjamin Kramer.
Note that uname -r returns the underlying Darwin version, which can be mapped
to Mac OS X version at http://www.opensource.apple.com/darwinsource/
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The main Makefile defines gitexecdir and template_dir without trailing
slash. config.mak.in should do the same to be consistent.
Signed-off-by: Pascal Obry <pascal@obry.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The installation rules wanted to differentiate between a template_dir that
is given as an absolute path (e.g. /usr/share/git-core/templates) and a
relative one (e.g. share/git-core/templates) but it was done by checking
if $(abspath $(template_dir)) and $(template_dir) yield the same string.
This was wrong in at least two ways.
* The user can give template_dir with a trailing slash from the command
line to invoke make or from the included config.mak. A directory path
ought to mean the same thing with or without such a trailing slash but
use of $(abspath) means an absolute path with a trailing slash fails
the test.
* Versions of GNU make older than 3.81 do not have $(abspath) to begin
with.
This changes the detection logic to see if the given path begins with a
slash.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After the git-core package was renamed to git, git help -w was still looking
for files in /usr/share/doc/git-core-$VERSION instead of
/usr/share/doc/git-$VERSION.
Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git blame misaligns output if a author's name has a differing display width and
strlen; for instance, an accented Latin letter that takes two bytes to encode
will cause the rest of the line to be shifted to the left by one. To fix this,
use utf8_strwidth instead of strlen (and compute the padding ourselves, since
printf doesn't know about UTF-8).
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
I'm about to use this pattern more than once, so make it a common function.
Signed-off-by: Geoffrey Thomas <geofft@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This rewrites the example part of the bundle doucmentation to follow
the suggestion made by Junio during a recent discussion (gmane 108030).
Instead of just showing different ways to create and use bundles in a
disconnected fashion, the rewritten example first shows the simplest
"full cycle" of sneakernet workflow, and then introduces various
variations.
The words are mostly taken from Junio's outline. I only reformatted
them and proofread to make sure the end result flows naturally.
Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Add a tool 'git-resurrect.sh <branch>' that tries to find traces of
the <branch> in the HEAD reflog and, optionally, all merge commits in
the repository. It can then resurrect the branch, pointing it at the
most recent of all candidate commits found.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* maint:
urls.txt: document optional port specification in git URLS
builtin-mv.c: check for unversionned files before looking at the destination.
Add a testcase for "git mv -f" on untracked files.
Missing && in t/t7001.sh.
* maint-1.6.0:
builtin-mv.c: check for unversionned files before looking at the destination.
Add a testcase for "git mv -f" on untracked files.
Missing && in t/t7001.sh.
The previous code was failing in the case where one moves an
unversionned file to an existing destination, with mv -f: the
"existing destination" was checked first, and the error was cancelled
by the force flag.
We now check the unrecoverable error first, which fixes the bug.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this, the exit status is only the one of the last line.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>