Commit Graph

22262 Commits

Author SHA1 Message Date
Erik Faye-Lund
f8f3d66cc7 mingw: do not hide bare repositories
As reported in msysGit issue 450 the recent change to set the windows
hidden attribute on the .git directory is being applied to bare git
directories. This patch excludes bare repositories.

Tested-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
2010-04-28 16:25:00 +02:00
Pat Thoyts
bf5f382347 mingw: add tests for the hidden attribute on the git directory
With msysGit the .git directory is supposed to be hidden, unless it is
a bare git repository. Test this.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-04-28 16:25:00 +02:00
Pat Thoyts
2d3884a022 Report errors when failing to launch the html browser in mingw.
The mingw function to launch the system html browser is silent if the
target file does not exist leaving the user confused. Make it display
something.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
2010-04-28 16:24:59 +02:00
Pat Thoyts
3d665ed5e8 fix mingw stat() and lstat() implementations for handling symlinks
In msysGit the stat() function has been implemented using mingw_lstat
which sets the st_mode member to S_IFLNK when a symbolic links is found.
This causes the is_executable function to return when git attempts to
build a list of available commands in the help code and we end up missing
most git commands. (msysGit issue #445)

This patch modifies the implementation so that lstat() will return the link
flag but if we are called as stat() we read the size of the target and set
the mode to that of a regular file.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-04-28 16:24:59 +02:00
Sebastian Schuberth
594bac3e46 gitk: Second try to work around the command line limit on Windows
The first fix caused Tcl to fail to compile the regexp, see msysGit issue
427. Here is another fix without using regexp, and using a more relaxed
command line length limit to fix the original issue 387.

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-04-28 16:24:58 +02:00
Johannes Schindelin
f9c077789e gitk: work around ridiculous command line restriction on Windows
On Windows, there are dramatic problems when a command line grows
beyond PATH_MAX, which is restricted to 8191 characters on XP and
later (according to http://support.microsoft.com/kb/830473).

Work around this by just cutting off the command line at that length
(actually, at a space boundary) in the hope that only negative
refs are chucked: gitk will then do unnecessary work, but that is
still better than flashing the gitk window and exiting with exit
status 5 (which no Windows user is able to make sense of).

This fixes msysGit issue 387.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:24:58 +02:00
Pat Thoyts
959d8d90b7 git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
On Windows the Control-C binding is used to copy and is mapped to the Tk
virtual event <<Copy>>. In the initial git-gui dialog this is also bound
as an accelerator for the Clone menu item. The effect is that both bindings
run, copying the text but resetting the clone page or switching to the clone
page when the user tries to copy text from one of the entry fields.
This patch avoids this by using Control-L instead for Windows only.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-04-28 16:24:57 +02:00
Heiko Voigt
cff3d87005 git-gui: provide question helper for retry fallback on Windows
Make use of the new environment variable GIT_ASK_YESNO to support the
recently implemented fallback in case unlink, rename or rmdir fail for
files in use on Windows. The added dialog will present a yes/no question
to the the user which will currently be used by the windows compat layer
to let the user retry a failed file operation.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-04-28 16:23:58 +02:00
Heiko Voigt
5d5a2afa39 mingw: add fallback for rmdir in case directory is in use
The same logic as for unlink and rename also applies to rmdir. For
example in case you have a shell open in a git controlled folder. This
will easily fail. So lets be nice for such cases as well.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
2010-04-28 16:23:58 +02:00
Heiko Voigt
42e8a6b4e0 mingw: make failures to unlink or move raise a question
On Windows in case a program is accessing a file unlink or
move operations may fail. To give the user a chance to correct
this we simply wait until the user asks us to retry or fail.

This is useful because of the following use case which seem
to happen rarely but when it does it is a mess:

After making some changes the user realizes that he was on the
incorrect branch. When trying to change the branch some file
is still in use by some other process and git stops in the
middle of changing branches. Now the user has lots of files
with changes mixed with his own. This is especially confusing
on repositories that contain lots of files.

Although the recent implementation of automatic retry makes
this scenario much more unlikely lets provide a fallback as
a last resort.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-04-28 16:23:57 +02:00
Heiko Voigt
5ee2404b2e git-gui: fix shortcut creation on cygwin
When the user tried to create a desktop icon with git gui on cygwin
wscript was complaining about an unknown option and displaying the
non-native path as such.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:57 +02:00
Heiko Voigt
e04acb641d git-gui: fix PATH environment for mingw development environment
When creating a desktop shortcut from the gui the shortcut directly
starts wish with the git-gui script. In the msysgit development
environment some dll's reside in the mingw/bin directory which causes
that git can not start because libiconv2.dll is not found.

When using such a link the error is even more cryptic stating:
"child killed: unknown signal"

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:56 +02:00
Heiko Voigt
975b3c5346 git-gui: fix usage of _gitworktree when creating shortcut for windows
This fixes msysGit issue 425.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:56 +02:00
Markus Heidelberg
f1a176c7c4 git-gui: fix "Explore Working Copy" for Windows again
It has already been fixed in commit 454efb47 (git-gui (Win): make
"Explore Working Copy" more robust, 2009-04-01), but has been broken in
commit 21985a11 (git-gui: handle non-standard worktree locations,
2010-01-23) by accidentally replacing too much with a new variable.

The problem can be reproduced when starting git-gui from within a
subdirectory. The solution is to convert the path name, explorer.exe is
invoked with, to a platform native name.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
2010-04-28 16:23:55 +02:00
Heiko Voigt
2f63f8a6a6 git-gui: check whether systems nice command works or disable it
This fixes issue 394 from msysgit. It seems that the Gnuwin32 project
provides a nice command but it returns a "not implemented" error. To
help users we now try to execute once and disable it in case it fails.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-04-28 16:23:55 +02:00
Heiko Voigt
c5412ac15e git-gui: fix usage of themed widgets variable
There was one forgotten global so NS was not visible to the method
which resulted in an error.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-04-28 16:23:55 +02:00
Pat Thoyts
ef81f33467 Handle failure of core.worktree to identify the working directory.
Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts
to use either GIT_WORK_TREE or core.worktree to set the _gitworktree
variable but these may not be set which leads to a failure to launch
gitk to review history. Use _gitdir to set the location for a standard
git layout where the parent of the .git directory is the working tree.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-04-28 16:23:54 +02:00
Heiko Voigt
c34659ddff mingw: work around irregular failures of unlink on windows
If a file is opened by another process (e.g. indexing of an IDE) for
reading it is not allowed to be deleted. So in case unlink fails retry
after waiting for some time. This extends the workaround from 6ac6f878.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-04-28 16:23:54 +02:00
Heiko Voigt
4ca6bb2d6e mingw: move unlink wrapper to mingw.c
The next patch implements a workaround in case unlink fails on Windows.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-04-28 16:23:53 +02:00
Heiko Voigt
d8b06b7dc7 Revert "git-gui: set GIT_DIR and GIT_WORK_TREE after setup"
This reverts commit a9fa11fe5b.
2010-04-28 16:23:53 +02:00
Pat Thoyts
6e0ada73f6 Skip t1300.70 and 71 on msysGit.
These two tests fail on msysGit because /dev/null is an alias for nul on
Windows and when reading the value back from git config the alias does
not match the real filename. Also the HOME environment variable has a
unix-style path but git returns a native equivalent path for '~'.  As
these are platform-dependent equivalent results it seems simplest to
skip the test entirely.

Signed-off-by: Pat Thoyts <patthoyts <at> users.sourceforge.net>
2010-04-28 16:23:52 +02:00
Johannes Sixt
7978485a3d criss cross rename failure workaround
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:52 +02:00
Johannes Schindelin
a3729b64d5 When initializing .git/, record the current setting of core.hideDotFiles
This is on Windows only, of course.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:51 +02:00
Erik Faye-Lund
848f7c3eeb core.hidedotfiles: hide '.git' dir by default
At least for cross-platform projects, it makes sense to hide the
files starting with a dot, as this is the behavior on Unix/MacOSX.

However, at least Eclipse has problems interpreting the hidden flag
correctly, so the default is to hide only the .git/ directory.

The config setting core.hideDotFiles therefore supports not only
'true' and 'false', but also 'dotGitOnly'.

[jes: clarified the commit message, made git init respect the setting
by marking the .git/ directory only after reading the config, and added
documentation, and rebased on top of current junio/next]

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:51 +02:00
Sebastian Schuberth
021888175a MinGW: Add missing file mode bit defines
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2010-04-28 16:23:50 +02:00
Sebastian Schuberth
7696a10bbf MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
2010-04-28 16:23:50 +02:00
Johannes Schindelin
78c3851c21 Avoid TAGS/tags warning from GNU Make
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2010-04-28 16:23:49 +02:00
Junio C Hamano
9993c2261c Merge branch 'master' into next
* master:
  Git 1.7.1
  Documentation improvements for the description of short format.
2010-04-23 18:27:34 -07:00
Junio C Hamano
d599e0484f Git 1.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.1
2010-04-23 18:27:17 -07:00
Junio C Hamano
34c071aea4 Merge branch 'maint'
* maint:
  Documentation improvements for the description of short format.
2010-04-23 18:24:32 -07:00
Eric Raymond
e92e9cd3c3 Documentation improvements for the description of short format.
Incorporates the detailed explanation from Jeff King in
<20100410040959.GA11977@coredump.intra.peff.net> and fixes
the bug noted by Junio C Hamano in
<7vmxxc1i8g.fsf@alter.siamese.dyndns.org>.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-23 12:33:41 -07:00
Junio C Hamano
38e7ffe25b Merge branch 'master' into next
* master:
  Git 1.7.0.6
2010-04-22 23:05:57 -07:00
Junio C Hamano
08641d022d Sync with 1.7.0.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22 23:05:49 -07:00
Junio C Hamano
66cfd1026f Git 1.7.0.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.7.0.6
2010-04-22 23:04:21 -07:00
Junio C Hamano
5deb15e47e Merge branch 'mg/use-default-abbrev-length-in-rev-list' into maint
* mg/use-default-abbrev-length-in-rev-list:
  rev-list: use default abbrev length when abbrev-commit is in effect
2010-04-22 22:39:26 -07:00
Junio C Hamano
0737975d16 Merge branch 'wp/doc-filter-direction' into maint
* wp/doc-filter-direction:
  documentation: clarify direction of core.autocrlf
2010-04-22 22:29:50 -07:00
Junio C Hamano
4fd8145c0c Merge branch 'jk/maint-diffstat-overflow' into maint
* jk/maint-diffstat-overflow:
  diff: use large integers for diffstat calculations
2010-04-22 22:29:13 -07:00
Junio C Hamano
dd0c5133c6 Merge branch 'da/maint-python-startup' into maint
* da/maint-python-startup:
  Makefile: Remove usage of deprecated Python "has_key" method
2010-04-22 22:29:07 -07:00
Junio C Hamano
b2668a66f3 Merge branch 'jn/maint-bundle' into next
* jn/maint-bundle:
  fix "bundle --stdin" segfault
  t5704 (bundle): add tests for bundle --stdin
2010-04-22 00:06:24 -07:00
Junio C Hamano
f9de16ce8f Merge branch 'cb/maint-stash-orphaned-file' into next
* cb/maint-stash-orphaned-file:
  stash tests: stash can lose data in a file removed from the index
  stash: Don't overwrite files that have gone from the index
2010-04-22 00:06:24 -07:00
Junio C Hamano
5177f8b6eb Merge branch 'pb/patch-id-plus' into next
* pb/patch-id-plus:
  patch-id: Add support for mbox format
  patch-id: extract parsing one diff out of generate_id_list
2010-04-22 00:06:23 -07:00
Junio C Hamano
b5574747e6 Merge branch 'rr/doc-submitting' into next
* rr/doc-submitting:
  SubmittingPatches: Add new section about what to base work on
2010-04-22 00:06:23 -07:00
Junio C Hamano
358ea269a8 Merge branch 'jn/t7006-fixup' into next
* jn/t7006-fixup:
  t7006: guard cleanup with test_expect_success
2010-04-22 00:06:23 -07:00
Junio C Hamano
5d1338fc82 Merge branch 'js/maint-receive-pack-symref-alias' into next
* js/maint-receive-pack-symref-alias:
  t5516-fetch-push.sh: style cleanup
  receive-pack: detect aliased updates which can occur with symrefs
  receive-pack: switch global variable 'commands' to a parameter

Conflicts:
	t/t5516-fetch-push.sh
2010-04-22 00:06:23 -07:00
Junio C Hamano
c94f19ef20 Merge branch 'sp/maint-dumb-http-pack-reidx' into next
* sp/maint-dumb-http-pack-reidx:
  http.c::new_http_pack_request: do away with the temp variable filename
  http-fetch: Use temporary files for pack-*.idx until verified
  http-fetch: Use index-pack rather than verify-pack to check packs
  Allow parse_pack_index on temporary files
  Extract verify_pack_index for reuse from verify_pack
  Introduce close_pack_index to permit replacement
  http.c: Remove unnecessary strdup of sha1_to_hex result
  http.c: Don't store destination name in request structures
  http.c: Drop useless != NULL test in finish_http_pack_request
  http.c: Tiny refactoring of finish_http_pack_request
  t5550-http-fetch: Use subshell for repository operations
  http.c: Remove bad free of static block
2010-04-22 00:06:23 -07:00
Junio C Hamano
6d22343a1d Merge branch 'jn/submodule-basic-test' into next
* jn/submodule-basic-test:
  t7400: clarify submodule update tests
  t7400: clarify 'submodule add' tests
  t7400: split setup into multiple tests
2010-04-22 00:06:22 -07:00
Junio C Hamano
4135456070 Merge branch 'np/index-pack-memsave' into next
* np/index-pack-memsave:
  index-pack: smarter memory usage when appending objects
  index-pack: rationalize unpack_entry_data()
  index-pack: smarter memory usage when resolving deltas
2010-04-22 00:06:22 -07:00
Junio C Hamano
49959c8d7d Merge branch 'jc/am-3-show-corrupted-patch' into next
* jc/am-3-show-corrupted-patch:
  am -3: recover the diagnostic messages for corrupt patches
2010-04-22 00:06:22 -07:00
Junio C Hamano
bf9c927a16 Merge branch 'jc/maint-no-reflog-expire-unreach-for-head' into next
* jc/maint-no-reflog-expire-unreach-for-head:
  reflog --expire-unreachable: special case entries in "HEAD" reflog
  more war on "sleep" in tests
  Document gc.<pattern>.reflogexpire variables

Conflicts:
	Documentation/config.txt
2010-04-22 00:06:21 -07:00
Junio C Hamano
e990e5b50f Merge branch 'cw/maint-exec-defpath' into next
* cw/maint-exec-defpath:
  autoconf: Check if <paths.h> exists and set HAVE_PATHS_H
  exec_cmd.c: replace hard-coded path list with one from <paths.h>
2010-04-22 00:06:21 -07:00