Commit Graph

18670 Commits

Author SHA1 Message Date
Johannes Schindelin
96fd02ed68 Revert "MinGW: use off64_t and lseek64()"
This reverts commit 3cb35a31b0.

The fix was incorrect.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-03-05 18:35:25 +01:00
Johannes Sixt
fc8f39c0da strip_path_suffix(): fix comment
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-02-19 21:40:26 +01:00
Johannes Schindelin
047f0f01f2 system_path(): simplify using strip_path_suffix(), and add suffix "git"
At least for the author of this patch, the logic in system_path() was
too hard to understand.  Using the function strip_path_suffix() documents
the idea of the code better.

The real change is to add the suffix "git", so that a runtime prefix will
be computed correctly even when the executable was called in /git/ as is
the case in msysGit (Windows insists to search the current directory
before the PATH when looking for an executable).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-02-19 21:13:53 +01:00
Johannes Schindelin
b824fc9cef Introduce the function strip_path_suffix()
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>
2009-02-19 21:10:30 +01:00
Johannes Schindelin
3cb35a31b0 MinGW: use off64_t and lseek64()
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>
2009-02-19 20:32:47 +01:00
Johannes Schindelin
c09458c701 Remove hopelessly obsolete README.MinGW
Rather than letting it get even more stale, remove README.MinGW.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-02-19 20:29:49 +01:00
Johannes Schindelin
7cb52f1ebf No longer force use of /usr/bin/sort
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>
2009-02-19 20:28:26 +01:00
Johannes Schindelin
8d785de3c2 gitk: remove workaround for missing msgfmt
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>
2009-02-19 20:25:13 +01:00
Johannes Schindelin
5461f4e786 Undo MSys specific munging of ssh transport URLs
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>
2009-02-19 20:22:14 +01:00
Johannes Schindelin
85f2fd02bd Makefile: move the last MinGW specific settings to the appropriate place
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>
2009-02-19 20:12:41 +01:00
Johannes Schindelin
6d3e71d428 MinGW: only override PRIuMAX for GCC older than version 4
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>
2009-02-19 19:56:41 +01:00
Johannes Schindelin
e673e45f58 MinGW: use POSIXy signature of waitpid()
Git's source code expects waitpid() to return a signed int status.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2009-02-19 19:54:24 +01:00
Johannes Schindelin
eebdca3a65 Revert unnecessary quoting of SHELL_PATH
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>
2009-02-19 19:52:20 +01:00
Johannes Schindelin
89012a7916 Remove last remnant of NOEXECTEMPL
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>
2009-02-18 16:22:36 +01:00
Steffen Prohaska
ea81ef5fea builtin-receive-pack: Remove leftovers of old RUNTIME_PREFIX implementation 2009-02-07 00:06:48 +01:00
Steffen Prohaska
0fd2c03fc4 Merge commit 'junio/master' into devel
Conflicts:
	Makefile
2009-02-06 23:57:41 +01:00
Steffen Prohaska
29b3149725 Merge commit 'mingw/master' into devel
Conflicts:
	Makefile
	daemon.c
	exec_cmd.c
	exec_cmd.h
	fast-import.c
	git.c
	hash-object.c
	http-push.c
	imap-send.c
	index-pack.c
	merge-index.c
	merge-tree.c
	mktag.c
	mktree.c
	pack-redundant.c
	patch-id.c
	unpack-file.c
	update-server-info.c
	upload-pack.c
	var.c
2009-02-06 23:56:24 +01:00
Junio C Hamano
ba743d1b0c Merge branch 'js/maint-remote-remove-mirror'
* 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
2009-02-05 19:40:41 -08:00
Junio C Hamano
7b75b331f6 Merge branch 'js/notes'
* 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
2009-02-05 19:40:39 -08:00
Junio C Hamano
5d680a67d7 Merge branch 'jc/refuse-push-to-current'
* jc/refuse-push-to-current:
  receive-pack: explain what to do when push updates the current branch
2009-02-05 19:40:36 -08:00
Junio C Hamano
7aa4e736b2 Merge branch 'rc/http-push'
* 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
2009-02-05 19:40:36 -08:00
Junio C Hamano
9242431ca0 Merge branch 'gt/utf8-width'
* gt/utf8-width:
  builtin-blame.c: Use utf8_strwidth for author's names
  utf8: add utf8_strwidth()
2009-02-05 19:40:35 -08:00
Junio C Hamano
74b11bc3be Merge branch 'jk/head-symref'
* jk/head-symref:
  symbolic ref: refuse non-ref targets in HEAD
  validate_headref: tighten ref-matching to just branches
2009-02-05 19:40:35 -08:00
Junio C Hamano
b371922aa5 Merge branch 'cb/mergetool'
* 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
2009-02-05 19:40:35 -08:00
Junio C Hamano
84b96278cc Merge branch 'maint'
* maint:
  Fixed broken git help -w when installing from RPM
2009-02-05 19:40:25 -08:00
Junio C Hamano
919ab6429a Merge branch 'maint-1.6.0' into maint
* maint-1.6.0:
  Fixed broken git help -w when installing from RPM
2009-02-05 19:38:58 -08:00
Junio C Hamano
c7893501e8 Merge branch 'jc/maint-apply-fix' into maint
* jc/maint-apply-fix:
  builtin-apply.c: do not set bogus mode in check_preimage() for deleted path
2009-02-05 18:06:11 -08:00
Junio C Hamano
7b261711a6 Merge branch 'am/maint-push-doc' into maint
* am/maint-push-doc:
  Documentation: rework src/dst description in git push
  Documentation: more git push examples
  Documentation: simplify refspec format description
2009-02-05 18:06:03 -08:00
Junio C Hamano
f20408dadb Merge branch 'sg/maint-gitdir-in-subdir' into maint
* sg/maint-gitdir-in-subdir:
  Fix gitdir detection when in subdir of gitdir
2009-02-05 18:05:43 -08:00
Junio C Hamano
141b6b83d7 Merge branch 'lt/maint-wrap-zlib' into maint
* lt/maint-wrap-zlib:
  Wrap inflate and other zlib routines for better error reporting

Conflicts:
	http-push.c
	http-walker.c
	sha1_file.c
2009-02-05 18:01:00 -08:00
Junio C Hamano
cc91e1bd05 Merge branch 'jc/maint-split-diff-metainfo' into maint
* jc/maint-split-diff-metainfo:
  diff.c: output correct index lines for a split diff
2009-02-05 17:54:17 -08:00
Junio C Hamano
8abc61880d Merge branch 'js/maint-all-implies-HEAD' into maint
* js/maint-all-implies-HEAD:
  bundle: allow the same ref to be given more than once
  revision walker: include a detached HEAD in --all
2009-02-05 17:54:12 -08:00
Junio C Hamano
8c4c286c39 Merge branch 'kc/maint-diff-bwi-fix' into maint
* kc/maint-diff-bwi-fix:
  Fix combined use of whitespace ignore options to diff
  test more combinations of ignore-whitespace options to diff
2009-02-05 17:52:22 -08:00
Johannes Schindelin
db75811cfa MinGW tests: override 'pwd', too
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>
2009-02-05 17:15:31 +01:00
Jay Soffian
7233d221ad Makefile: minor improvements for Mac OS X (Darwin)
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>
2009-02-05 00:33:40 -08:00
Pascal Obry
98bb1ff83c config.mak.in: define paths without trailing slash
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>
2009-02-05 00:29:23 -08:00
Junio C Hamano
0c0ead7e79 Makefile: fix misdetection of relative pathnames
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>
2009-02-05 00:28:43 -08:00
David J. Mellor
ab2fdb3b62 Fixed broken git help -w when installing from RPM
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>
2009-02-04 22:00:49 -08:00
Junio C Hamano
88ccb9f974 Merge branch 'jc/fsck' (early part)
* 'jc/fsck' (early part):
  fsck: check loose objects from alternate object stores by default
  fsck: HEAD is part of refs
2009-02-04 16:40:15 -08:00
Geoffrey Thomas
ffaf9cc0ff builtin-blame.c: Use utf8_strwidth for author's names
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>
2009-02-04 16:30:45 -08:00
Geoffrey Thomas
8a9391e944 utf8: add utf8_strwidth()
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>
2009-02-04 16:30:43 -08:00
Nanako Shiraishi
8aa7eebfb3 git-bundle doc: update examples
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>
2009-02-04 15:16:35 -08:00
Alexander Potashev
34263de026 Replace deprecated dashed git commands in usage
Signed-off-by: Alexander Potashev <aspotashev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-04 15:08:49 -08:00
jidanni@jidanni.org
5c7eee03da git-show-branch doc: show -g as synonym to --reflog in the list
Signed-off-by: jidanni <jidanni@jidanni.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-04 15:08:08 -08:00
Thomas Rast
e1ff064e1b contrib git-resurrect: find traces of a branch name and resurrect it
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>
2009-02-04 15:07:49 -08:00
Junio C Hamano
de8139005f Merge branch 'maint'
* 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.
2009-02-04 13:07:09 -08:00
Junio C Hamano
d3f552b674 Merge branch 'wp/add-patch-find'
* wp/add-patch-find:
  add -p: trap Ctrl-D in 'goto' mode
  add -p: change prompt separator for 'g'
  In add --patch, Handle K,k,J,j slightly more gracefully.
  Add / command in add --patch
  git-add -i/-p: Change prompt separater from slash to comma
2009-02-04 13:07:06 -08:00
Junio C Hamano
a4f004bffc Merge branch 'ns/am-slacker'
* ns/am-slacker:
  git-am: Add --ignore-date option
  am: Add --committer-date-is-author-date option

Conflicts:
	git-am.sh
2009-02-04 13:07:02 -08:00
Stefan Naewe
f26b5dc9ef urls.txt: document optional port specification in git URLS
Signed-off-by: Stefan Naewe <stefan.naewe+git@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-02-04 13:06:06 -08:00
Junio C Hamano
745bc77604 Merge branch 'maint-1.6.0' into maint
* 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.
2009-02-04 11:49:07 -08:00