]> asedeno.scripts.mit.edu Git - git.git/log
git.git
15 years agoMerge branch 'cc/bisect' (early part)
Junio C Hamano [Sat, 13 Jun 2009 19:53:06 +0000 (12:53 -0700)]
Merge branch 'cc/bisect' (early part)

* 'cc/bisect' (early part):
  t6030: test skipping away from an already skipped commit
  bisect: when skipping, choose a commit away from a skipped commit
  bisect: add parameters to "filter_skipped"
  bisect: display first bad commit without forking a new process
  bisect: drop unparse_commit() and use clear_commit_marks()

15 years agoMerge branch 'rc/maint-http-local-slot-fix'
Junio C Hamano [Sat, 13 Jun 2009 19:51:09 +0000 (12:51 -0700)]
Merge branch 'rc/maint-http-local-slot-fix'

* rc/maint-http-local-slot-fix:
  http*: cleanup slot->local after fclose

15 years agoMerge branch 'sp/msysgit'
Junio C Hamano [Sat, 13 Jun 2009 19:50:42 +0000 (12:50 -0700)]
Merge branch 'sp/msysgit'

* sp/msysgit:
  compat/ has subdirectories: do not omit them in 'make clean'
  Fix typo in nedmalloc warning fix
  MinGW: Teach Makefile to detect msysgit and apply specific settings
  Fix warnings in nedmalloc when compiling with GCC 4.4.0
  Add custom memory allocator to MinGW and MacOS builds
  MinGW readdir reimplementation to support d_type
  connect.c: Support PuTTY plink and TortoisePlink as SSH on Windows
  git: browsing paths with spaces when using the start command
  MinGW: fix warning about implicit declaration of _getch()
  test-chmtime: work around Windows limitation
  Work around a regression in Windows 7, causing erase_in_line() to crash sometimes
  Quiet make: do not leave Windows behind
  MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore

Conflicts:
Makefile

15 years agoMerge branch 'cb/maint-no-double-merge'
Junio C Hamano [Sat, 13 Jun 2009 19:50:22 +0000 (12:50 -0700)]
Merge branch 'cb/maint-no-double-merge'

* cb/maint-no-double-merge:
  refuse to merge during a merge

15 years agoMerge branch 'ph/submodule-rebase' (early part)
Junio C Hamano [Sat, 13 Jun 2009 19:49:50 +0000 (12:49 -0700)]
Merge branch 'ph/submodule-rebase' (early part)

* 'ph/submodule-rebase' (early part):
  Rename submodule.<name>.rebase to submodule.<name>.update
  git-submodule: add support for --rebase.

Conflicts:
Documentation/git-submodule.txt
git-submodule.sh

15 years agoMerge branch 'bc/solaris'
Junio C Hamano [Sat, 13 Jun 2009 19:48:34 +0000 (12:48 -0700)]
Merge branch 'bc/solaris'

* bc/solaris:
  configure: test whether -lresolv is needed
  Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
  git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
  Makefile: add section for SunOS 5.7
  Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
  Makefile: define __sun__ on SunOS
  git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
  On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
  Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
  Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall

Conflicts:
Makefile

15 years agoMerge branch 'cb/match_refs_internal_tail'
Junio C Hamano [Sat, 13 Jun 2009 19:47:52 +0000 (12:47 -0700)]
Merge branch 'cb/match_refs_internal_tail'

* cb/match_refs_internal_tail:
  match_refs: search ref list tail internally

15 years agoMerge branch 'nw/maint-cvsexportcommit'
Junio C Hamano [Sat, 13 Jun 2009 19:47:47 +0000 (12:47 -0700)]
Merge branch 'nw/maint-cvsexportcommit'

* nw/maint-cvsexportcommit:
  git-cvsexportcommit can't commit files which have been removed from CVS

15 years agoMerge branch 'da/araxis-mergetool'
Junio C Hamano [Sat, 13 Jun 2009 19:47:08 +0000 (12:47 -0700)]
Merge branch 'da/araxis-mergetool'

* da/araxis-mergetool:
  mergetool--lib: add support for araxis merge

15 years agoMerge branch 'maint'
Junio C Hamano [Fri, 12 Jun 2009 06:35:46 +0000 (23:35 -0700)]
Merge branch 'maint'

* maint:
  Documentation: git-send-mail can take rev-list arg to drive format-patch
  rebase--interactive: remote stray closing parenthesis

15 years agoDocumentation: git-send-mail can take rev-list arg to drive format-patch
Paolo Bonzini [Thu, 11 Jun 2009 07:30:27 +0000 (09:30 +0200)]
Documentation: git-send-mail can take rev-list arg to drive format-patch

The git-send-email docs do not mention except in the usage lines
the combined patch formatting/sending ability of git-send-email.
This patch expands on the possible arguments to git-send-email
and explains the meaning of the rev-list argument.

Signed-off-by: Paolo Bonzini <bonzini@gnu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompat/ has subdirectories: do not omit them in 'make clean'
Johannes Sixt [Thu, 11 Jun 2009 20:56:12 +0000 (22:56 +0200)]
compat/ has subdirectories: do not omit them in 'make clean'

[1. text/plain]

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix typo in nedmalloc warning fix
Johannes Sixt [Thu, 11 Jun 2009 20:52:56 +0000 (22:52 +0200)]
Fix typo in nedmalloc warning fix

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'uk/maint-1.5.3-rebase-i-reflog' into maint
Junio C Hamano [Thu, 11 Jun 2009 21:14:00 +0000 (14:14 -0700)]
Merge branch 'uk/maint-1.5.3-rebase-i-reflog' into maint

* uk/maint-1.5.3-rebase-i-reflog:
  rebase--interactive: remote stray closing parenthesis

Conflicts:
git-rebase--interactive.sh

15 years agorebase--interactive: remote stray closing parenthesis
Uwe Kleine-König [Thu, 11 Jun 2009 20:27:55 +0000 (22:27 +0200)]
rebase--interactive: remote stray closing parenthesis

it was introduced in 68a163c9b483ae352fcfee8c4505d113213daa73

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jöhännës "Dschö" Schindëlin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoparse-options: add parse_options_check to validate option specs.
Pierre Habouzit [Tue, 9 Jun 2009 08:23:44 +0000 (10:23 +0200)]
parse-options: add parse_options_check to validate option specs.

It only searches for now for the dreaded LASTARG_DEFAULT | OPTARG
combination, but can be extended to check for any other forbidden
combination.

Options are checked each time we call parse_options_start.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoconfigure: test whether -lresolv is needed
Ralf Wildenhues [Sun, 7 Jun 2009 05:40:29 +0000 (07:40 +0200)]
configure: test whether -lresolv is needed

Check if -lresolv is needed for hstrerror; set NEEDS_RESOLV
accordingly, and substitute in config.mak.in.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin
Junio C Hamano [Mon, 8 Jun 2009 16:41:49 +0000 (09:41 -0700)]
Makefile: insert SANE_TOOL_PATH to PATH before /bin or /usr/bin

In an earlier patch, we introduced SANE_TOOL_PATH that is prepended to
user's PATH.  This had an unintended consequence of overriding user's
private binary directory that typically comes earlier in the PATH to holds
even saner commands than whatever comes with the system.

For example, a user may have ~/bin that is early in the path and contains
a shell script "vi" that launches system's /bin/vi with specific options.
Prepending SANE_TOOL_PATH to the PATH that happens to have "vi" in it
defeats such customization.

This fixes the issue by inserting SANE_TOOL_PATH just before /bin or
/usr/bin appears on the PATH.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-repack.txt: Clarify implications of -a for dumb protocols
Michael J Gruber [Tue, 9 Jun 2009 16:15:47 +0000 (18:15 +0200)]
git-repack.txt: Clarify implications of -a for dumb protocols

The current text makes some users feel uneasy, worrying whether
'-a' could lead to corrupt repositories. Clarify that '-a'
may lead to performance issues only for dumb protocols.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Helped-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Tue, 9 Jun 2009 07:29:36 +0000 (00:29 -0700)]
Merge branch 'maint'

* maint:
  diff.c: plug a memory leak in an error path
  fetch-pack: close output channel after sideband demultiplexer terminates
  builtin-remote: Make "remote show" display all urls

15 years agobash: add support for 'git stash pop --index' option
SZEDER Gábor [Mon, 8 Jun 2009 22:57:39 +0000 (00:57 +0200)]
bash: add support for 'git stash pop --index' option

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoDocumentation: mention 'git stash pop --index' option explicitly
SZEDER Gábor [Mon, 8 Jun 2009 22:57:06 +0000 (00:57 +0200)]
Documentation: mention 'git stash pop --index' option explicitly

'git stash pop' supports the '--index' option since its initial
implementation (bd56ff54, git-stash: add new 'pop' subcommand,
2008-02-22), but its documentation does not mention it explicitly.
Moreover, both the usage shown by 'git stash -h' and the synopsis
section in the man page imply that 'git stash pop' does not have an
'--index' option.

First, this patch corrects the usage and the synopsis section.

Second, the patch moves the description of the '--index' option to the
'git stash pop' section in the documentation, and refers to it from
the 'git stash apply' section.  This way it follows the intentions of
commit d1836637 (Documentation: teach stash/pop workflow instead of
stash/apply, 2009-05-28), as all 'git stash pop'-related documentation
will be in one place without references to 'git stash apply'.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSimplify some 'fprintf(stderr); return -1;' by using 'return error()'
Johannes Sixt [Mon, 8 Jun 2009 20:34:31 +0000 (22:34 +0200)]
Simplify some 'fprintf(stderr); return -1;' by using 'return error()'

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoSimplify some instances of run_command() by using run_command_v_opt().
Johannes Sixt [Mon, 8 Jun 2009 20:34:29 +0000 (22:34 +0200)]
Simplify some instances of run_command() by using run_command_v_opt().

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoshow-branch: don't use LASTARG_DEFAULT with OPTARG
Stephen Boyd [Sun, 7 Jun 2009 23:39:15 +0000 (16:39 -0700)]
show-branch: don't use LASTARG_DEFAULT with OPTARG

5734365 (show-branch: migrate to parse-options API 2009-05-21)
incorrectly set the --more option's flags to be
PARSE_OPT_LASTARG_DEFAULT and PARSE_OPT_OPTARG. These two flags
shouldn't be used together. An option taking a default should just set
the default value desired and parse options will take care of the rest.

Update the header comment to better convey this information.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Acked-by: René Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosend-email: use UTF-8 rather than utf-8 for consistency
Brandon Casey [Sun, 7 Jun 2009 01:12:31 +0000 (20:12 -0500)]
send-email: use UTF-8 rather than utf-8 for consistency

The rest of the git source has been converted to use upper-case character
encoding names to assist older platforms.  The charset attribute of MIME
is defined to be case-insensitive, but older platforms may still have an
easier time dealing with upper-case rather than lower-case.  So do so for
send-email too.

Update t9001 to handle the changes.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-send-email.perl: improve detection of MIME encoded-words
Brandon Casey [Mon, 8 Jun 2009 00:25:58 +0000 (19:25 -0500)]
git-send-email.perl: improve detection of MIME encoded-words

According to rfc2047, an encoded word has the following form:

   encoded-word = "=?" charset "?" encoding "?" encoded-text "?="

   charset = token

   encoding = token

   token = <Any CHAR except SPACE, CTLs, and especials>

   especials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "
               <"> / "/" / "[" / "]" / "?" / "." / "="

   encoded-text = <Any printable ASCII character other than "?"
                     or SPACE>

And rfc822 defines CHARs and CTLs as:

    CHAR = <any ASCII character> ; (  0-177,  0.-127.)

    CTL = <any ASCII control     ; (  0- 37,  0.- 31.)
           character and DEL>    ; (    177,     127.)

The original code only detected rfc2047 encoded strings when the charset
was UTF-8.  This patch generalizes the matching expression and breaks the
check for an rfc2047 encoded string into its own function.  There's no real
functional change, since any properly rfc2047 encoded string would have
fallen through the remaining 'if' statements and been returned unchanged.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodiff.c: plug a memory leak in an error path
Johannes Sixt [Mon, 8 Jun 2009 20:34:30 +0000 (22:34 +0200)]
diff.c: plug a memory leak in an error path

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agofetch-pack: close output channel after sideband demultiplexer terminates
Johannes Sixt [Mon, 8 Jun 2009 08:51:22 +0000 (10:51 +0200)]
fetch-pack: close output channel after sideband demultiplexer terminates

fetch-pack runs the sideband demultiplexer using start_async(). This
facility requires that the asynchronously executed function closes the
output file descriptor (see Documentation/technical/api-run-command.txt).
But the sideband demultiplexer did not do that. This fixes it.

In certain error situations this could lock up a fetch operation on
Windows because the asynchronous function is run in a thread; by not
closing the output fd the reading end never got EOF and waited for more
data indefinitely. On Unix this is not a problem because the asynchronous
function is run in a separate process, which exits after the function ends
and so implicitly closes the output.

Since the pack that is sent over the wire encodes the number of objects in
the stream, during normal operation the reading end knows when the stream
ends and terminates by itself, and does not lock up.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8
Brandon Casey [Mon, 8 Jun 2009 23:53:48 +0000 (18:53 -0500)]
git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8

The Sun c99 compiler as recent as version 5.8 Patch 121016-06 2007/08/01
produces an error when compiling diff-delta.c.  This source file #includes
the delta.h header file which pre-declares a struct which is later defined
to contain a flex array member.  The Sun c99 compiler fails to compile
diff-delta.c and gives the following error:

  "diff-delta.c", line 314: identifier redeclared: create_delta
          current : function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void
          previous: function(pointer to const struct delta_index {unsigned long memsize, pointer to const void src_buf, unsigned long src_size, unsigned int hash_mask, array[-1] of pointer to struct index_entry {..} hash}, pointer to const void, unsigned long, pointer to unsigned long, unsigned long) returning pointer to void : "delta.h", line 44
  c99: acomp failed for diff-delta.c

So, avoid using this c99 feature when compiling with the Sun c compilers
version 5.8 and older (the most recent version tested).

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobuiltin-remote: Make "remote show" display all urls
Michael J Gruber [Sat, 6 Jun 2009 15:16:30 +0000 (17:16 +0200)]
builtin-remote: Make "remote show" display all urls

Currently, "git remote -v" lists all urls whereas "git remote show
$remote" shows only the first. Make it so that both show all.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMinGW: Teach Makefile to detect msysgit and apply specific settings
Steffen Prohaska [Sun, 31 May 2009 16:15:25 +0000 (18:15 +0200)]
MinGW: Teach Makefile to detect msysgit and apply specific settings

This commit changes handling of the msysgit specific settings, so
that they can be applied to official git.git.  Some msysgit
settings differ from the standard MinGW settings.  We move them
into an ifndef block that is only evaluated if a file
THIS_IS_MSYSGIT is present in the parent directory, which is the
case for an msysgit working environment.  The tag file is unlikely
to be present accidentally.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoFix warnings in nedmalloc when compiling with GCC 4.4.0
Johannes Schindelin [Mon, 8 Jun 2009 14:46:49 +0000 (16:46 +0200)]
Fix warnings in nedmalloc when compiling with GCC 4.4.0

Nedmalloc's source code has a cute #define construct to avoid inserting
an if() statement, because that might interact badly with enclosing if()
statements.  However, GCC > 4 complains with a "warning: value computed
is not used".  So we cast the result to "void".

GCC also does not understand the Visual C++ specific pragmas, so we need
to disable them for MinGW.

We need to include malloc.h on Windows even if we happen to compile the
stuff as a MinGW program.  Otherwise the function declaration of alloca()
is missing.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agosymlinks.c: small style cleanup
Kjetil Barvik [Sun, 7 Jun 2009 11:33:05 +0000 (13:33 +0200)]
symlinks.c: small style cleanup

Add {}-braces around an else-part, where the if-part already has
{}-braces.

And, also remove some unnecessary "return;"-statements at the end of
"void foo()"-functions.

Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: test-parse-options depends on parse-options.h
Junio C Hamano [Sun, 7 Jun 2009 08:34:51 +0000 (01:34 -0700)]
Makefile: test-parse-options depends on parse-options.h

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint'
Junio C Hamano [Sun, 7 Jun 2009 06:49:28 +0000 (23:49 -0700)]
Merge branch 'maint'

* maint:
  Documentation: refer to gitworkflows(7) from tutorial and git(1)
  daemon: Strictly parse the "extra arg" part of the command

15 years agoDocumentation: refer to gitworkflows(7) from tutorial and git(1)
Thomas Rast [Sat, 6 Jun 2009 13:11:07 +0000 (15:11 +0200)]
Documentation: refer to gitworkflows(7) from tutorial and git(1)

Add references to the gitworkflows(7) manpage added in f948dd8
(Documentation: add manpage about workflows, 2008-10-19) to both
gittutorial(1) and git(1), so that new users might actually discover
and read it.

Noticed by Randal L. Schwartz.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agodaemon: Strictly parse the "extra arg" part of the command
Shawn O. Pearce [Fri, 5 Jun 2009 01:33:32 +0000 (18:33 -0700)]
daemon: Strictly parse the "extra arg" part of the command

Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon")
git daemon enters an infinite loop and never terminates if a client
hides any extra arguments in the initial request line which is not
exactly "\0host=blah\0".

Since that change, a client must never insert additional extra
arguments, or attempt to use any argument other than "host=", as
any daemon will get stuck parsing the request line and will never
complete the request.

Since the client can't tell if the daemon is patched or not, it
is not possible to know if additional extra args might actually be
able to be safely requested.

If we ever need to extend the git daemon protocol to support a new
feature, we may have to do something like this to the exchange:

  # If both support git:// v2
  #
  C: 000cgit://v2
  S: 0010ok host user
  C: 0018host git.kernel.org
  C: 0027git-upload-pack /pub/linux-2.6.git
  S: ...git-upload-pack header...

  # If client supports git:// v2, server does not:
  #
  C: 000cgit://v2
  S: <EOF>

  C: 003bgit-upload-pack /pub/linux-2.6.git\0host=git.kernel.org\0
  S: ...git-upload-pack header...

This requires the client to create two TCP connections to talk to
an older git daemon, however all daemons since the introduction of
daemon.c will safely reject the unknown "git://v2" command request,
so the client can quite easily determine the server supports an
older protocol.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: add section for SunOS 5.7
Brandon Casey [Fri, 5 Jun 2009 23:36:16 +0000 (18:36 -0500)]
Makefile: add section for SunOS 5.7

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: introduce SANE_TOOL_PATH for prepending required elements to PATH
Junio C Hamano [Fri, 5 Jun 2009 23:36:15 +0000 (18:36 -0500)]
Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH

Some platforms (like SunOS and family) have kept their common binaries at
some historical moment in time, and introduced new binaries with modern
features in a special location like /usr/xpg4/bin or /usr/ucb.  Some of the
features provided by these modern binaries are expected and required by git.
If the featureful binaries are not in the users path, then git could end up
using the less featureful binary and fail.

So provide a mechanism to prepend elements to the users PATH at runtime so
the modern binaries will be found.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: define __sun__ on SunOS
Brandon Casey [Fri, 5 Jun 2009 23:36:14 +0000 (18:36 -0500)]
Makefile: define __sun__ on SunOS

The SUNWspro compiler does not define __sun__ (like GCC does).  A check of
this macro was recently added to detect compilation on SunOS and to modify
the handling of the NO_ICONV and _XOPEN_SOURCE feature macros.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris
Brandon Casey [Fri, 5 Jun 2009 23:36:13 +0000 (18:36 -0500)]
git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris

On Solaris, when _XOPEN_EXTENDED is set, its header file forces the
programs to be XPG4v2, defeating any _XOPEN_SOURCE setting to say we are
XPG5 or XPG6.  Also on Solaris, XPG6 programs must be compiled with a c99
compiler, while non XPG6 programs must be compiled with a pre-c99 compiler.

So when compiling on Solaris, always refrain from setting _XOPEN_EXTENDED,
and then set _XOPEN_SOURCE to 600 or 500 based on whether a c99 compiler
is being used or not.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoOn Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec
Brandon Casey [Fri, 5 Jun 2009 23:36:12 +0000 (18:36 -0500)]
On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec

OLD_ICONV is only necessary on Solaris until UNIX03.  This is indicated
by the private macro _XPG6 which is set in /usr/include/sys/feature_tests.h.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMakefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments
Brandon Casey [Fri, 5 Jun 2009 23:36:10 +0000 (18:36 -0500)]
Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments

This library is required on Solaris when compiling with NO_IPV6 since
hstrerror resides in libresolv.  Additionally, Solaris 7 will need it,
since inet_ntop and inet_pton reside there too.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot6030: test skipping away from an already skipped commit
Christian Couder [Sat, 6 Jun 2009 04:41:35 +0000 (06:41 +0200)]
t6030: test skipping away from an already skipped commit

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: when skipping, choose a commit away from a skipped commit
Christian Couder [Sat, 6 Jun 2009 04:41:34 +0000 (06:41 +0200)]
bisect: when skipping, choose a commit away from a skipped commit

To do that a new function "apply_skip_ratio" is added and another
function "managed_skipped" is created to wrap both "filter_skipped"
and the previous one.

In "managed_skipped" we detect when we should choose a commit away
from a skipped one and then we automatically choose a skip ratio
to pass to "apply_skip_ratio".

The ratio is choosen so that it alternates between 1/5, 2/5 and
3/5.

In "apply_skip_ratio", we ignore a given ratio of all the commits
that could be tested.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobisect: add parameters to "filter_skipped"
Christian Couder [Sat, 6 Jun 2009 04:41:33 +0000 (06:41 +0200)]
bisect: add parameters to "filter_skipped"

because we will need to get more information from this function in
some later patches.

The new "int *count" parameter gives the number of commits left after
the skipped commit have been filtered out.

The new "int *skipped_first" parameter tells us if the first commit
in the list has been skipped. Note that using this parameter also
changes the behavior of the function if the first commit is indeed
skipped. Because we assume that in this case we will want all the
filtered commits, not just the first one, even if "show_all" is not
set.

So using a not NULL "skipped_first" parameter really means that we
plan to choose to test another commit than the first non skipped
one if the first commit in the list is skipped. That in turn means
that, in case the first commit is skipped, we have to return a
fully filtered list.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agohttp*: cleanup slot->local after fclose
Tay Ray Chuan [Sat, 6 Jun 2009 08:43:26 +0000 (16:43 +0800)]
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>
15 years agoDocumentation/git.txt: update links to release notes
Junio C Hamano [Thu, 4 Jun 2009 05:52:37 +0000 (22:52 -0700)]
Documentation/git.txt: update links to release notes

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'maint' to sync with 1.6.3.2
Junio C Hamano [Thu, 4 Jun 2009 05:51:56 +0000 (22:51 -0700)]
Merge branch 'maint' to sync with 1.6.3.2

15 years agoGIT 1.6.3.2 v1.6.3.2
Junio C Hamano [Thu, 4 Jun 2009 05:42:15 +0000 (22:42 -0700)]
GIT 1.6.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoShow presence of stashed changes in bash prompt.
Daniel Trstenjak [Tue, 2 Jun 2009 18:03:22 +0000 (20:03 +0200)]
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>
15 years agogrep: fix empty word-regexp matches
René Scharfe [Wed, 3 Jun 2009 16:19:01 +0000 (18:19 +0200)]
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>
15 years agoMerge branch 'da/pretty-tempname'
Junio C Hamano [Wed, 3 Jun 2009 07:50:05 +0000 (00:50 -0700)]
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

15 years agoClean up and simplify rev_compare_tree()
Linus Torvalds [Wed, 3 Jun 2009 01:34:01 +0000 (18:34 -0700)]
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>
15 years agoMerge branch 'maint'
Junio C Hamano [Wed, 3 Jun 2009 07:49:40 +0000 (00:49 -0700)]
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

15 years agoblame: correctly handle a path that used to be a directory
Junio C Hamano [Wed, 3 Jun 2009 07:43:22 +0000 (00:43 -0700)]
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>
15 years agoadd -i: do not dump patch during application
Thomas Rast [Tue, 2 Jun 2009 21:34:27 +0000 (23:34 +0200)]
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>
15 years agoRename submodule.<name>.rebase to submodule.<name>.update
Johan Herland [Wed, 3 Jun 2009 06:27:06 +0000 (08:27 +0200)]
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>
15 years agoUpdate draft release notes for 1.6.3.2
Junio C Hamano [Tue, 2 Jun 2009 14:57:39 +0000 (07:57 -0700)]
Update draft release notes for 1.6.3.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'cb/maint-1.6.0-xdl-merge-fix' into maint
Junio C Hamano [Tue, 2 Jun 2009 14:48:44 +0000 (07:48 -0700)]
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

15 years agoMerge branch 'rs/maint-grep-word-regexp-fix' into maint
Junio C Hamano [Tue, 2 Jun 2009 14:48:09 +0000 (07:48 -0700)]
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

15 years agoMerge branch 'sb/maint-1.6.2-opt-filename-fix' into maint
Junio C Hamano [Tue, 2 Jun 2009 14:47:03 +0000 (07:47 -0700)]
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

15 years agoMerge branch 'jc/maint-add-p-coalesce-fix' into maint
Junio C Hamano [Tue, 2 Jun 2009 14:46:52 +0000 (07:46 -0700)]
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"

15 years agoMerge branch 'tr/maint-doc-stash-pop' into maint
Junio C Hamano [Tue, 2 Jun 2009 14:43:45 +0000 (07:43 -0700)]
Merge branch 'tr/maint-doc-stash-pop' into maint

* tr/maint-doc-stash-pop:
  Documentation: teach stash/pop workflow instead of stash/apply

15 years agotest-lib: fix http exit codes
Clemens Buchacher [Mon, 1 Jun 2009 12:28:25 +0000 (14:28 +0200)]
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>
15 years agotest-lib: allow exit trap to be used for cleanup by tests
Clemens Buchacher [Mon, 1 Jun 2009 12:14:41 +0000 (14:14 +0200)]
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>
15 years agotest-lib: fail if invalid options are passed
Clemens Buchacher [Mon, 1 Jun 2009 12:14:40 +0000 (14:14 +0200)]
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>
15 years agogrep: fix colouring of matches with zero length
René Scharfe [Mon, 1 Jun 2009 21:53:05 +0000 (23:53 +0200)]
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>
15 years agorefuse to merge during a merge
Clemens Buchacher [Mon, 1 Jun 2009 09:20:56 +0000 (11:20 +0200)]
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>
15 years agomatch_refs: search ref list tail internally
Clemens Buchacher [Sun, 31 May 2009 14:26:48 +0000 (16:26 +0200)]
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>
15 years agogit-show-branch.txt: document --date-order option
Stephen Boyd [Mon, 1 Jun 2009 06:34:46 +0000 (23:34 -0700)]
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>
15 years agoAdd custom memory allocator to MinGW and MacOS builds
Marius Storm-Olsen [Sun, 31 May 2009 16:15:23 +0000 (18:15 +0200)]
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>
15 years agoMinGW readdir reimplementation to support d_type
Marius Storm-Olsen [Sun, 31 May 2009 16:15:22 +0000 (18:15 +0200)]
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>
15 years agoconnect.c: Support PuTTY plink and TortoisePlink as SSH on Windows
Edward Z. Yang [Sun, 31 May 2009 16:15:21 +0000 (18:15 +0200)]
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>
15 years agogit: browsing paths with spaces when using the start command
Pat Thoyts [Sun, 31 May 2009 16:15:20 +0000 (18:15 +0200)]
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>
15 years agoMinGW: fix warning about implicit declaration of _getch()
Johannes Schindelin [Mon, 1 Jun 2009 06:41:45 +0000 (08:41 +0200)]
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>
15 years agotest-chmtime: work around Windows limitation
Johannes Schindelin [Sun, 31 May 2009 16:15:18 +0000 (18:15 +0200)]
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>
15 years agoWork around a regression in Windows 7, causing erase_in_line() to crash sometimes
Johannes Schindelin [Mon, 1 Jun 2009 06:04:16 +0000 (08:04 +0200)]
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>
15 years agoQuiet make: do not leave Windows behind
Johannes Schindelin [Sun, 31 May 2009 16:15:16 +0000 (18:15 +0200)]
Quiet make: do not leave Windows behind

On Windows, we have to check whether there are scripts which would
override .exe files, but this check missed the "quietification".
Make now prints 'BUILTIN all' instead of a long chain of 'test || rm'
commands.

[spr: added clarification what make will print. ]

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>
15 years agoMinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore
Johannes Schindelin [Sun, 31 May 2009 16:15:15 +0000 (18:15 +0200)]
MinGW: GCC >= 4 does not need SNPRINTF_SIZE_CORR anymore

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>
15 years agodiff: generate pretty filenames in prep_temp_blob()
David Aguilar [Sun, 31 May 2009 08:35:52 +0000 (01:35 -0700)]
diff: generate pretty filenames in prep_temp_blob()

Naturally, prep_temp_blob() did not care about filenames.
As a result, GIT_EXTERNAL_DIFF and textconv generated
filenames such as ".diff_XXXXXX".

This modifies prep_temp_blob() to generate user-friendly
filenames when creating temporary files.

Diffing "name.ext" now generates "XXXXXX_name.ext".

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompat: add a basename() compatibility function
David Aguilar [Sun, 31 May 2009 08:35:51 +0000 (01:35 -0700)]
compat: add a basename() compatibility function

Some systems such as Windows lack libgen.h so provide a
basename() implementation for cross-platform use.

This introduces the NO_LIBGEN_H construct to the Makefile
and autoconf scripts.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agocompat: add a mkstemps() compatibility function
David Aguilar [Sun, 31 May 2009 08:35:50 +0000 (01:35 -0700)]
compat: add a mkstemps() compatibility function

mkstemps() is a BSD extension so provide an implementation
for cross-platform use.

Signed-off-by: David Aguilar <davvid@gmail.com>
Tested-by: Johannes Sixt <j6t@kdbg.org> (Windows)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge branch 'sb/opt-filename'
Junio C Hamano [Sun, 31 May 2009 23:57:42 +0000 (16:57 -0700)]
Merge branch 'sb/opt-filename'

* sb/opt-filename:
  parse-opts: add OPT_FILENAME and transition builtins
  parse-opts: prepare for OPT_FILENAME

Conflicts:
builtin-log.c

15 years agoMerge branch 'jc/solaris-0811'
Junio C Hamano [Sun, 31 May 2009 23:18:02 +0000 (16:18 -0700)]
Merge branch 'jc/solaris-0811'

* jc/solaris-0811:
  OpenSolaris 200811 (SunOS 5.11) does not want OLD_ICONV
  Teach Solaris that _XOPEN_SOURCE=600 really menas XPG6

15 years agoMerge branch 'sb/show-branch-parse-options'
Junio C Hamano [Sun, 31 May 2009 23:17:58 +0000 (16:17 -0700)]
Merge branch 'sb/show-branch-parse-options'

* sb/show-branch-parse-options:
  show-branch: migrate to parse-options API
  parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's

Conflicts:
parse-options.h

15 years agoMerge branch 'mm/apply-double-slash'
Junio C Hamano [Sun, 31 May 2009 23:17:46 +0000 (16:17 -0700)]
Merge branch 'mm/apply-double-slash'

* mm/apply-double-slash:
  apply: handle filenames with double slashes better

15 years agoMerge branch 'sb/format-patch-parseopt'
Junio C Hamano [Sun, 31 May 2009 23:17:31 +0000 (16:17 -0700)]
Merge branch 'sb/format-patch-parseopt'

* sb/format-patch-parseopt:
  format-patch: migrate to parse-options API

Conflicts:
builtin-log.c

15 years agoMerge branch 'jc/mktree'
Junio C Hamano [Sun, 31 May 2009 23:17:11 +0000 (16:17 -0700)]
Merge branch 'jc/mktree'

* jc/mktree:
  mktree: validate entry type in input
  mktree --batch: build more than one tree object
  mktree --missing: updated usage message and man page
  mktree --missing: allow missing objects
  t1010: add mktree test
  mktree: do not barf on a submodule commit
  builtin-mktree.c: use a helper function to handle one line of input
  mktree: use parse-options
  build-in git-mktree

15 years agoMerge branch 'ew/svn-test-and-old-i18n'
Junio C Hamano [Sun, 31 May 2009 23:17:07 +0000 (16:17 -0700)]
Merge branch 'ew/svn-test-and-old-i18n'

* ew/svn-test-and-old-i18n:
  t8005: fix typo, it's ISO-8859-5, not KOI8-R
  t8005: convert CP1251 character set to ISO8859-5
  t8005: use more portable character encoding names
  t5100: use ancient encoding syntax for backwards compatibility
  t9301: use ISO8859-1 rather than ISO-8859-1
  t3901: Use ISO8859-1 instead of ISO-8859-1 for backward compatibility
  t3901: avoid negation on right hand side of '|'
  builtin-mailinfo.c: use "ISO8859-1" instead of "latin1" as fallback encoding
  builtin-mailinfo.c: compare character encodings case insensitively
  Use 'UTF-8' rather than 'utf-8' everywhere for backward compatibility
  t3900: use ancient iconv names for backward compatibility

15 years agoMerge branch 'mw/send-email'
Junio C Hamano [Sun, 31 May 2009 23:16:52 +0000 (16:16 -0700)]
Merge branch 'mw/send-email'

* mw/send-email:
  send-email: Remove superfluous `my $editor = ...'
  send-email: 'References:' should only reference what is sent
  send-email: Handle "GIT:" rather than "GIT: " during --compose
  Docs: send-email: --smtp-server-port can take symbolic ports
  Docs: send-email: Refer to CONFIGURATION section for sendemail.multiedit
  Docs: send-email: Put options back into alphabetical order

15 years agoMerge branch 'cc/bisect' (early part)
Junio C Hamano [Sun, 31 May 2009 23:16:48 +0000 (16:16 -0700)]
Merge branch 'cc/bisect' (early part)

* 'cc/bisect' (early part):
  bisect: check ancestors without forking a "git rev-list" process
  commit: add function to unparse a commit and its parents
  bisect: rework some rev related functions to make them more reusable

15 years agogit-add: no need for -f when resolving a conflict in already tracked path
Jeff King [Sat, 30 May 2009 21:54:18 +0000 (17:54 -0400)]
git-add: no need for -f when resolving a conflict in already tracked path

When a path F that matches ignore pattern has a conflict, "git add F"
insisted the -f option be given, which did not make sense.  It would have
required -f when the path was originally added, but when resolving a
conflict, it already is tracked.

So this should work (and does):

  $ echo file >.gitignore
  $ echo content >file
  $ git add -f file ;# need -f because we are adding new path
  $ echo more content >>file
  $ git add file ;# don't need -f; it is not actually an "other" file

This is handled under the hood by the COLLECT_IGNORED option to
read_directory. When that code finds an ignored file, it checks the
index to make sure it is not actually a tracked file. However, the test
it uses does not take into account unmerged entries, and considers them
to still be ignored. "git ls-files" uses a more elaborate test and gets
the right answer and the same test should be used here.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoconfig.txt: document add.ignore-errors
Stephen Boyd [Sun, 31 May 2009 05:08:02 +0000 (22:08 -0700)]
config.txt: document add.ignore-errors

Use the description of "--ignore-errors" from git-add.txt as
inspiration.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agobash: remove always true if statement from __git_ps1()
SZEDER Gábor [Fri, 29 May 2009 12:00:36 +0000 (14:00 +0200)]
bash: remove always true if statement from __git_ps1()

The recent commits 8763dbb1 (completion: fix PS1 display during a
merge on detached HEAD, 2009-05-16), ff790b6a (completion: simplify
"current branch" in __git_ps1(), 2009-05-10), and d7107ca6
(completion: fix PS1 display during an AM on detached HEAD,
2009-05-26) ensure that the branch name in __git_ps1() is always set
to something sensible.  Therefore, the condition for checking the
non-empty branch name is always fulfilled, and can be removed.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agogit-apply(1): Clarify that one can select where to apply the patch
Björn Steinbrink [Fri, 29 May 2009 10:21:24 +0000 (12:21 +0200)]
git-apply(1): Clarify that one can select where to apply the patch

The patch can be applied to the work tree, the index or both, but the
short description made it look like it's always applied to both.

Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agohttp-push: reuse existing is_null_ref
Clemens Buchacher [Sun, 31 May 2009 10:36:10 +0000 (12:36 +0200)]
http-push: reuse existing is_null_ref

Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agot9139 uses ancient, backwards-compatible iconv names
Eric Wong [Sat, 30 May 2009 00:14:47 +0000 (17:14 -0700)]
t9139 uses ancient, backwards-compatible iconv names

This resolves a semantic conflicts early to work with 5ae93df (t3900: use
ancient iconv names for backward compatibility, 2009-05-18).

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
15 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Sun, 31 May 2009 05:25:41 +0000 (22:25 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: refuse to dcommit non-UTF-8 messages