1
0
mirror of https://github.com/git/git.git synced 2024-10-21 22:18:12 +02:00
Commit Graph

19112 Commits

Author SHA1 Message Date
Mike Hommey
0d5896e1cc http.c::http_fetch_ref(): use the new http API
The error message ("Unable to start request") has been removed, since
the http API already prints it.

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 11:03:10 -07:00
Mike Hommey
28307b99dd transport.c::get_refs_via_curl(): use the new http API
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 11:03:07 -07:00
Mike Hommey
e929cd20bb http.c: new functions for the http API
The new functions added are:
 - http_request() (internal function)
 - http_get_strbuf()
 - http_get_file()
 - http_error()

http_get_strbuf and http_get_file allow respectively to retrieve contents of
an URL to a strbuf or an opened file handle.

http_error prints out an error message containing the URL and the curl error
(in curl_errorstr).

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
5ace994f33 http: create function end_url_with_slash
The logic to append a slash to the url if necessary in quote_ref_url
(added in 113106e "http.c: use strbuf API in quote_ref_url") has been
moved to a new function, end_url_with_slash.

The method takes a strbuf, the URL, and the path to be appended to the
URL. It first adds the URL to the strbuf. It then appends a slash
if the URL does not end with a slash.

The check on ref in quote_ref_url for a slash at the beginning has been
removed as a result of using end_url_with_slash. This check is not
needed, because slashes will be quoted anyway.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
e917674597 http*: move common variables and macros to http.[ch]
Move RANGE_HEADER_SIZE to http.h.

Create no_pragma_header, the curl header list containing the header
"Pragma:" in http.[ch]. It is allocated in http_init, and freed in
http_cleanup. This replaces the no_pragma_header in http-push.c, and
the no_pragma_header member in walker_data in http-walker.c.

Create http_is_verbose. It is to be used by methods in http.c, and is
modified at the entry points of http.c's users, namely http-push.c
(when parsing options) and http-walker.c (in get_http_walker).

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Mike Hommey
df005219dd transport.c::get_refs_via_curl(): do not leak refs_url
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Mike Hommey
4277c6709d Don't expect verify_pack() callers to set pack_size
Since use_pack() will end up populating pack_size if it is not already set,
we can just adapt the code in verify_packfile() such that it doesn't require
pack_size to be set beforehand.

This allows callers not to have to set pack_size themselves, and we can thus
revert changes from 1c23d794 (Don't die in git-http-fetch when fetching packs).

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
1b1b7b235b http-push: do not SEGV after fetching a bad pack idx file
In a70c232 ("http-fetch: do not SEGV after fetching a bad pack idx
file"), changes were made to the setup_index method in http-fetch.c
(known in its present form as http-walker.c after 30ae764 ("Modularize
commit-walker")). Since http-push.c has similar similar code for
processing index files, these changes should apply to http-push.c's
implementation of setup_index as well.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
20cfb3aa71 http*: copy string returned by sha1_to_hex
In the fetch_index implementations in http-push.c and http-walker.c,
the string returned by sha1_to_hex is assumed to stay immutable.

This patch ensures that hex stays immutable by copying the string
returned by sha1_to_hex (via xstrdup) and frees it subsequently. It
also refactors free()'s and fclose()'s with labels.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
48188c259a http-walker: verify remote packs
In c17fb6e ("Verify remote packs, speed up pending request queue"),
changes were made to index fetching in http-push.c, particularly the
methods fetch_index and setup_index. Since http-walker.c has similar
code for index fetching, these improvements should apply to
http-walker.c's fetch_index and setup_index.

Invocations of free() of string memory are reproduced as well.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
4c42aa1a13 http-push, http-walker: style fixes
- Use tabs to indent, instead of spaces.

- Do not use curly-braces around a single statement body in
  if/while statement;

- Do not start multi-line comment with description on the first
  line after "/*", i.e.

  /*
   * We prefer this over...
   */

  /* comments like
   * this (notice the first line)
   */

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
96a4f18735 t5550-http-fetch: test fetching of packed objects
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
68862a3152 http-push: fix missing "#ifdef USE_CURL_MULTI" around "is_running_queue"
As it is breaking the build when USE_CURL_MULTI is not defined.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
4f66250df6 http-push: send out fetch requests on queue
Previously, requests for remote files were simply added to the queue
(pointed to by request_queue_head) and no transfer actually takes
place (the fill function add_fill_function() is not added until line
2441), even though code that followed may rely on these remote files to
be present (eg. the setup_revisions invocation).

The code that sends out the requests on the request queue is refactored
into the method run_request_queue.

After the get_dav_remote_heads invocation (ie. after fetch requests are
added to the queue), the requests on the queue are sent out through an
invocation to run_request_queue.

This invocation to run_request_queue entails adding a fill function
before pushing checks take place, which may lead to accidental,
unwanted pushes previously.

The flag is_running_queue is introduced to prevent this from occurring.
fill_active_slot is made to check the flag is_running_queue before
the sending of the requests proceeds.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
86d99f6d5c t5540-http-push: test fetching of packed objects
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Tay Ray Chuan
242a90778b t5540-http-push: test fetching of loose objects
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:56:27 -07:00
Junio C Hamano
8607987223 Merge branch 'rc/maint-http-local-slot-fix' into rc/http-push
* rc/maint-http-local-slot-fix:
  http*: cleanup slot->local after fclose
2009-06-06 10:56:17 -07:00
Tay Ray Chuan
16493eb0d0 http*: cleanup slot->local after fclose
Set slot->local to NULL after doing a fclose() on the file it points
to. This prevents the passing of a FILE* pointer to a fclose()'d file
to ftell() in http.c::run_active_slot().

This issue was raised by Clemens Buchacher on 30th May 2009:

  http://www.spinics.net/lists/git/msg104623.html

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-06 10:30:16 -07:00
Junio C Hamano
6096d75980 Documentation/git.txt: update links to release notes
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 22:52:37 -07:00
Junio C Hamano
9831b370b5 Merge branch 'maint' to sync with 1.6.3.2 2009-06-03 22:51:56 -07:00
Junio C Hamano
6c7f58d6f6 GIT 1.6.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
v1.6.3.2
2009-06-03 22:47:48 -07:00
Daniel Trstenjak
2414b45ce0 Show presence of stashed changes in bash prompt.
Add a '$' in the __git_ps1 output to show stashed changes are present,
when GIT_PS1_SHOWSTASHSTATE is set to a nonempty value.

The code for checking if the stash has entries is taken from
'git-stash.sh'.

Signed-off-by: Daniel Trstenjak <daniel.trstenjak@online.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 22:38:17 -07:00
René Scharfe
84201eae77 grep: fix empty word-regexp matches
The command "git grep -w ''" dies as soon as it encounters an empty line,
reporting (wrongly) that "regexp returned nonsense".  The first hunk of
this patch relaxes the sanity check that is responsible for that,
allowing matches to start at the end.

The second hunk complements it by making sure that empty matches are
rejected if -w was specified, as they are not really words.

GNU grep does the same:

	$ echo foo | grep -c ''
	1
	$ echo foo | grep -c -w ''
	0

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 11:32:29 -07:00
Junio C Hamano
b11cf09043 Merge branch 'da/pretty-tempname'
* da/pretty-tempname:
  diff: generate pretty filenames in prep_temp_blob()
  compat: add a basename() compatibility function
  compat: add a mkstemps() compatibility function

Conflicts:
	Makefile
2009-06-03 00:50:05 -07:00
Linus Torvalds
ceff8e7ade Clean up and simplify rev_compare_tree()
This simplifies the logic of rev_compare_tree() by removing a special
case.

It does so by turning the special case of finding a diff to be "all new
files" into a more generic case of "all new" vs "all removed" vs "mixed
changes", so now the code is actually more powerful and more generic, and
the added symmetry actually makes it simpler too.

This makes no changes to any existing behavior, but apart from the
simplification it does make it possible to some day care about whether all
changes were just deletions if we want to. Which we may well want to for
merge handling.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 00:49:50 -07:00
Junio C Hamano
433e972aeb Merge branch 'maint'
* maint:
  blame: correctly handle a path that used to be a directory
  add -i: do not dump patch during application
  Update draft release notes for 1.6.3.2
  grep: fix colouring of matches with zero length
  Documentation: teach stash/pop workflow instead of stash/apply
  Change xdl_merge to generate output even for null merges
  t6023: merge-file fails to output anything for a degenerate merge
2009-06-03 00:49:40 -07:00
Junio C Hamano
a9b2d42486 blame: correctly handle a path that used to be a directory
When trying to see if the same path exists in the parent, we ran
"diff-tree" with pathspec set to the path we are interested in with the
parent, and expect either to have exactly one resulting filepair (either
"changed from the parent", "created when there was none") or nothing (when
there is no change from the parent).

If the path used to be a directory, however, we will also see unbounded
number of entries that talk about the files that used to exist underneath
the directory in question.  Correctly pick only the entry that describes
the path we are interested in in such a case (namely, the creation of the
path as a regular file).

Noticed by Ben Willard.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 00:49:34 -07:00
Thomas Rast
8dc3a47c3e add -i: do not dump patch during application
Remove a debugging print that snuck in at 7a26e65 (Revert
"git-add--interactive: remove hunk coalescing", 2009-05-16).

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 00:11:15 -07:00
Johan Herland
42b4917862 git-submodule: add support for --merge.
'git submodule update --merge' merges the commit referenced by the
superproject into your local branch, instead of checking it out on
a detached HEAD.

As evidenced by the addition of "git submodule update --rebase", it
is useful to provide alternatives to the default 'checkout' behaviour
of "git submodule update". One such alternative is, when updating a
submodule to a new commit, to merge that commit into the current
local branch in that submodule. This is useful in workflows where
you want to update your submodule from its upstream, but you cannot
use --rebase, because you have downstream people working on top of
your submodule branch, and you don't want to disrupt their work.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 00:09:16 -07:00
Johan Herland
329484256e Rename submodule.<name>.rebase to submodule.<name>.update
The addition of "submodule.<name>.rebase" demonstrates the usefulness of
alternatives to the default behaviour of "git submodule update". However,
by naming the config variable "submodule.<name>.rebase", and making it a
boolean choice, we are artificially constraining future git versions that
may want to add _more_ alternatives than just "rebase".

Therefore, while "submodule.<name>.rebase" is not yet in a stable git
release, future-proof it, by changing it from

  submodule.<name>.rebase = true/false

to

  submodule.<name>.update = rebase/checkout

where "checkout" specifies the default behaviour of "git submodule update"
(checking out the new commit to a detached HEAD), and "rebase" specifies
the --rebase behaviour (where the current local branch in the submodule is
rebase onto the new commit). Thus .update == checkout is equivalent to
.rebase == false, and .update == rebase is equivalent to .rebase == true.
Finally, leaving .update unset is equivalent to leaving .rebase unset.

In future git versions, other alternatives to "git submodule update"
behaviour can be included by adding them to the list of allowable values
for the submodule.<name>.update variable.

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-03 00:04:52 -07:00
Junio C Hamano
40bad52d7d Update draft release notes for 1.6.3.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-02 08:11:30 -07:00
Junio C Hamano
456cb4cf3e Merge branch 'cb/maint-1.6.0-xdl-merge-fix' into maint
* cb/maint-1.6.0-xdl-merge-fix:
  Change xdl_merge to generate output even for null merges
  t6023: merge-file fails to output anything for a degenerate merge

Conflicts:
	xdiff/xmerge.c
2009-06-02 07:48:44 -07:00
Junio C Hamano
3489428367 Merge branch 'rs/maint-grep-word-regexp-fix' into maint
* rs/maint-grep-word-regexp-fix:
  grep: fix colouring of matches with zero length
  grep: fix word-regexp at the beginning of lines
2009-06-02 07:48:09 -07:00
Junio C Hamano
b91ffd37d5 Merge branch 'sb/maint-1.6.2-opt-filename-fix' into maint
* sb/maint-1.6.2-opt-filename-fix:
  apply, fmt-merge-msg: use relative filenames
  commit: -F overrides -t
2009-06-02 07:47:03 -07:00
Junio C Hamano
f2823263bd Merge branch 'jc/maint-add-p-coalesce-fix' into maint
* jc/maint-add-p-coalesce-fix:
  t3701: ensure correctly set up repository after skipped tests
  Revert "git-add--interactive: remove hunk coalescing"
  Splitting a hunk that adds a line at the top fails in "add -p"
2009-06-02 07:46:52 -07:00
Junio C Hamano
db8af4b5ea Merge branch 'tr/maint-doc-stash-pop' into maint
* tr/maint-doc-stash-pop:
  Documentation: teach stash/pop workflow instead of stash/apply
2009-06-02 07:43:45 -07:00
Clemens Buchacher
a5adcbe377 test-lib: fix http exit codes
Previously, die() would report the exit code of stop_httpd. Instead,
save and reset the exit code before dying.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 22:45:01 -07:00
Clemens Buchacher
6e7b5aaf40 test-lib: allow exit trap to be used for cleanup by tests
Exit trap should not be removed in case tests require cleanup code. This
is especially important if tests are executed with the --immediate option.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 22:44:54 -07:00
Clemens Buchacher
1f729dca93 test-lib: fail if invalid options are passed
Previously, unknown options would be ignored, including any subsequent
valid options.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 22:44:51 -07:00
René Scharfe
1f5b9cc40e grep: fix colouring of matches with zero length
If a zero-length match is encountered, break out of loop and show the rest
of the line uncoloured.  Otherwise we'd be looping forever, trying to make
progress by advancing the pointer by zero characters.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 22:30:39 -07:00
Clemens Buchacher
c8c562a238 refuse to merge during a merge
The following is an easy mistake to make for users coming from version
control systems with an "update and commit"-style workflow.

        1. git pull
        2. resolve conflicts
        3. git pull

Step 3 overrides MERGE_HEAD, starting a new merge with dirty index.
IOW, probably not what the user intended. Instead, refuse to merge
again if a merge is in progress.

Reported-by: Dave Olszewski <cxreg@pobox.com>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 19:42:17 -07:00
Clemens Buchacher
6d2bf96e55 match_refs: search ref list tail internally
Avoid code duplication by moving list tail search to match_refs().

This does not change the semantics, except for http-push, which now inserts
to the front of the ref list in order to get rid of the global remote_tail.

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 19:41:24 -07:00
Stephen Boyd
b3f298ab03 git-show-branch.txt: document --date-order option
Copy the description of date-order from rev-list-options.txt, and then
reword it to be commit specific. While we're at it, put <rev> <glob>...
on a new line to not exceed 80 characters.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:41:58 -07:00
Marius Storm-Olsen
f0ed8226c9 Add custom memory allocator to MinGW and MacOS builds
The standard allocator on Windows is pretty bad prior
to Windows Vista, and nedmalloc is better than the
modified dlmalloc provided with newer versions of the
MinGW libc.

NedMalloc stats in Git
----------------------
  All results are the best result out of 3 runs. The
  benchmarks have been done on different hardware, so
  the repack times are not comparable.

  These benchmarks are all based on 'git repack -adf'
  on the Linux kernel.

  XP
  -----------------------------------------------
  MinGW               Threads  Total Time   Speed
  -----------------------------------------------
  3.4.2                  (1T)  00:12:28.422
  3.4.2     + nedmalloc  (1T)  00:07:25.437 1.68x

  3.4.5                  (1T)  00:12:20.718
  3.4.5     + nedmalloc  (1T)  00:07:24.809 1.67x

  4.3.3-tdm              (1T)  00:12:01.843
  4.3.3-tdm + nedmalloc  (1T)  00:07:16.468 1.65x

  4.3.3-tdm              (2T)  00:07:35.062
  4.3.3-tdm + nedmalloc  (2T)  00:04:57.874 1.54x

  Vista
  -----------------------------------------------
  MinGW               Threads  Total Time   Speed
  -----------------------------------------------
  4.3.3-tdm              (1T)  00:07:40.844
  4.3.3-tdm + nedmalloc  (1T)  00:07:17.548 1.05x

  4.3.3-tdm              (2T)  00:05:33.746
  4.3.3-tdm + nedmalloc  (2T)  00:05:27.334 1.02x

  Mac Mini
  -----------------------------------------------
  GCC                 Threads  Total Time   Speed
  -----------------------------------------------
  i686-darwin9-4.0.1     (2T)  00:09:57.346
  i686-darwin9-4.0.1+ned (2T)  00:08:51.072 1.12x

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:27:39 -07:00
Marius Storm-Olsen
e16c60d9f9 MinGW readdir reimplementation to support d_type
The original readdir implementation was fast, but didn't
support the d_type. This means that git would do additional
lstats for each entry, to figure out if the entry was a
directory or not. This unneedingly slowed down many
operations, since Windows API provides this information
directly when walking the directories.

By running this implementation on Moe's repo structure:
  mkdir bummer && cd bummer; for ((i=0;i<100;i++)); do
    mkdir $i && pushd $i;
      for ((j=0;j<1000;j++)); do echo "$j" >$j; done;
    popd;
  done

We see the following speedups:
  git add .
  -------------------
  old: 00:00:23(.087)
  new: 00:00:21(.512) 1.07x

  git status
  -------------------
  old: 00:00:03(.306)
  new: 00:00:01(.684) 1.96x

  git clean -dxf
  -------------------
  old: 00:00:01(.918)
  new: 00:00:00(.295) 6.50x

Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:25:54 -07:00
Edward Z. Yang
36ad53ffee connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows
OpenSSH uses -p to specify custom ports, while PuTTY plink and
TortoisePlink use -P. Git now detects if plink is in GIT_SSH and
modify its flags as necessary.

We call plink with -batch, so that it will error out with an error
message instead of waiting for user input.  As reported in msysGit
issue 96, plink wants to interact with the user asking if a host
key should be accepted, but this just blocks the terminal, since
plink tries to get the answer from stdin.  However, stdin is
already connected to Git that wants to send input to the remote
command.

But we do not pass -batch to TortoisePlink, because TortoisePlink
uses a GUI to communicate with the user, and it does not understand
-batch.

Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:25:11 -07:00
Pat Thoyts
7b66da2762 git: browsing paths with spaces when using the start command
msysGit issue 258 tracks a problem opening a browser onto file
paths that contain spaces or parentheses when calling the
web--browse script. This patch modifies how the start command is
called to solve this.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:22:01 -07:00
Johannes Schindelin
28a559c0b5 MinGW: fix warning about implicit declaration of _getch()
conio.h provides the declaration.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:20:57 -07:00
Johannes Schindelin
d9b2633385 test-chmtime: work around Windows limitation
Windows has problems changing the mtime when the file is write protected,
even by the owner of said file.

Add a Windows-only workaround to change the mode if necessary before
trying to change the mtime.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:10:08 -07:00
Johannes Schindelin
492f70913e Work around a regression in Windows 7, causing erase_in_line() to crash sometimes
The function FillConsoleOutputCharacterA() was pretty content in XP to take a NULL
pointer if we did not want to store the number of written columns.  In Windows 7,
it crashes, but only when called from within Git Bash, not from within cmd.exe.
Go figure.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-06-01 00:08:54 -07:00