Code

git.git
13 years agoGit 1.7.1.4 v1.7.1.4
Junio C Hamano [Wed, 15 Dec 2010 19:40:40 +0000 (11:40 -0800)]
Git 1.7.1.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.0.9 v1.7.0.9
Junio C Hamano [Wed, 15 Dec 2010 19:38:19 +0000 (11:38 -0800)]
Git 1.7.0.9

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.6.6.3 v1.6.6.3
Junio C Hamano [Wed, 15 Dec 2010 19:32:57 +0000 (11:32 -0800)]
Git 1.6.6.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.6.5.9 v1.6.5.9
Junio C Hamano [Wed, 15 Dec 2010 19:27:41 +0000 (11:27 -0800)]
Git 1.6.5.9

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.6.4.5 v1.6.4.5
Junio C Hamano [Wed, 15 Dec 2010 19:19:11 +0000 (11:19 -0800)]
Git 1.6.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: Introduce esc_attr to escape attributes of HTML elements
Jakub Narebski [Tue, 14 Dec 2010 23:34:01 +0000 (00:34 +0100)]
gitweb: Introduce esc_attr to escape attributes of HTML elements

It is needed only to escape attributes of handcrafted HTML elements,
and not those generated using CGI.pm subroutines / methods for HTML
generation.

While at it, add esc_url and esc_html where needed, and prefer to use
CGI.pm HTML generating methods than handcrafted HTML code.  Most of
those are probably unnecessary (could be exploited only by person with
write access to gitweb config, or at least access to the repository).

This fixes CVE-2010-3906

Reported-by: Emanuele Gentili <e.gentili@tigersecurity.it>
Helped-by: John 'Warthog9' Hawley <warthog9@kernel.org>
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.1.3 v1.7.1.3
Junio C Hamano [Thu, 2 Dec 2010 20:18:49 +0000 (12:18 -0800)]
Git 1.7.1.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.0.8 v1.7.0.8
Junio C Hamano [Thu, 2 Dec 2010 20:06:06 +0000 (12:06 -0800)]
Git 1.7.0.8

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint-1.7.0' into maint-1.7.1
Junio C Hamano [Thu, 2 Dec 2010 00:37:34 +0000 (16:37 -0800)]
Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  add: introduce add.ignoreerrors synonym for add.ignore-errors

13 years agoadd: introduce add.ignoreerrors synonym for add.ignore-errors
Jonathan Nieder [Wed, 1 Dec 2010 18:36:15 +0000 (12:36 -0600)]
add: introduce add.ignoreerrors synonym for add.ignore-errors

The "[add] ignore-errors" tweakable introduced by v1.5.6-rc0~30^2 (Add
a config option to ignore errors for git-add, 2008-05-12) does not
follow the usual convention for naming values in the git configuration
file.

What convention?  Glad you asked.

The section name indicates the affected subsystem.

The subsection name, if any, indicates which of
an unbound set of things to set the value for.

The variable name describes the effect of tweaking
this knob.

The section and variable names can be broken into
words using bumpyCaps in documentation as a hint to
the reader.  These word breaks are not significant
at the level of code, since the section and variable
names are not case sensitive.

The name "add.ignore-errors" includes a dash, meaning a naive
configuration file like

[add]
ignoreErrors

does not have any effect.  Avoid such confusion by renaming to the
more consistent add.ignoreErrors, but keep the old version for
backwards compatibility.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot0003: add missing && at end of lines
Matthieu Moy [Sat, 28 Aug 2010 18:18:36 +0000 (20:18 +0200)]
t0003: add missing && at end of lines

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.1.2 v1.7.1.2
Junio C Hamano [Tue, 27 Jul 2010 22:04:49 +0000 (15:04 -0700)]
Git 1.7.1.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoSync with 1.7.0 series
Junio C Hamano [Tue, 27 Jul 2010 22:01:36 +0000 (15:01 -0700)]
Sync with 1.7.0 series

14 years agoGit 1.7.0.7 v1.7.0.7
Junio C Hamano [Tue, 27 Jul 2010 21:07:41 +0000 (14:07 -0700)]
Git 1.7.0.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoconfig --get --path: check for unset $HOME
Jonathan Nieder [Mon, 26 Jul 2010 15:06:51 +0000 (10:06 -0500)]
config --get --path: check for unset $HOME

If $HOME is unset (as in some automated build situations),
currently

git config --path path.home "~"
git config --path --get path.home

segfaults.  Error out with

Failed to expand user dir in: '~/'

instead.

Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.7.0' into maint-1.7.1
Junio C Hamano [Mon, 26 Jul 2010 04:53:27 +0000 (21:53 -0700)]
Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it

14 years agoMerge branch 'maint-1.6.6' into maint-1.7.0
Junio C Hamano [Mon, 26 Jul 2010 04:52:48 +0000 (21:52 -0700)]
Merge branch 'maint-1.6.6' into maint-1.7.0

* maint-1.6.6:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

14 years agoMerge branch 'maint-1.6.5' into maint-1.6.6
Junio C Hamano [Mon, 26 Jul 2010 04:52:29 +0000 (21:52 -0700)]
Merge branch 'maint-1.6.5' into maint-1.6.6

* maint-1.6.5:
  request-pull.txt: Document -p option
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

14 years agorequest-pull.txt: Document -p option
Stephen Boyd [Fri, 23 Jul 2010 16:31:27 +0000 (09:31 -0700)]
request-pull.txt: Document -p option

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.4' into maint-1.6.5
Junio C Hamano [Mon, 26 Jul 2010 04:51:58 +0000 (21:51 -0700)]
Merge branch 'maint-1.6.4' into maint-1.6.5

* maint-1.6.4:
  Check size of path buffer before writing into it
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

14 years agoCheck size of path buffer before writing into it
Greg Brockman [Tue, 20 Jul 2010 04:46:21 +0000 (00:46 -0400)]
Check size of path buffer before writing into it

This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

  gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/README: clarify test_must_fail description
Brandon Casey [Tue, 20 Jul 2010 17:17:12 +0000 (12:17 -0500)]
t/README: clarify test_must_fail description

Some have found the wording of the description to be somewhat ambiguous
with respect to when it is desirable to use test_must_fail instead of
"! <git-command>".  Tweak the wording somewhat to hopefully clarify that
it is _because_ test_must_fail can detect segmentation fault that it is
desirable to use it instead of "! <git-command>".

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoCheck size of path buffer before writing into it
Greg Brockman [Tue, 20 Jul 2010 04:46:21 +0000 (00:46 -0400)]
Check size of path buffer before writing into it

This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents

  gitdir: (something really long)

Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoupdate-server-info: Shorten read_pack_info_file()
Ralf Thielow [Mon, 19 Jul 2010 16:26:12 +0000 (18:26 +0200)]
update-server-info: Shorten read_pack_info_file()

The correct responses to a D and a T line in .git/objects/info/packs
are the same, so combine their case arms.  In both cases we already
‘goto’ out of the switch so while at it, remove a redundant ‘break’
to avoid yet another line of code.

Signed-off-by: Ralf Thielow <ralf.thielow@googlemail.com>
Reviewed-by: Jonathan Nieder <jrnieder <at> gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: Explain git-mergetool's use of temporary files
David Aguilar [Sun, 18 Jul 2010 01:46:48 +0000 (18:46 -0700)]
Documentation: Explain git-mergetool's use of temporary files

'git mergetool' creates '*.orig' backup files in its
default configuration.  Mention this in its documentation.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: add submodule.* to the big configuration variable list
Jonathan Nieder [Thu, 15 Jul 2010 07:51:19 +0000 (02:51 -0500)]
Documentation: add submodule.* to the big configuration variable list

The url, path, and the update items in [submodule "foo"] stanzas
are nicely explained in the .gitmodules and ‘git submodule’
documentation.  Point there from the config documentation.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitmodules.5: url can be a relative path
Jonathan Nieder [Thu, 15 Jul 2010 07:41:55 +0000 (02:41 -0500)]
gitmodules.5: url can be a relative path

There is already excellent documentation for this facility in
git-submodule.1, but it is not so discoverable.

Relative paths in .gitmodules can be useful for serving the
same repository over multiple protocols, for example.
Thanks to Peter for pointing this out.

Cc: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogitweb: fix esc_url
Pavan Kumar Sunkara [Thu, 15 Jul 2010 07:29:01 +0000 (12:59 +0530)]
gitweb: fix esc_url

Earlier, 452e225 (gitweb: fix esc_param, 2009-10-13) fixed CGI escaping
rules used in esc_url.  A very similar logic exists in esc_param and needs
to be fixed the same way.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit fetch documentation: describe short '-p' synonym to '--prune' option
Oren Held [Tue, 13 Jul 2010 12:01:40 +0000 (15:01 +0300)]
git fetch documentation: describe short '-p' synonym to '--prune' option

It's already implemented, just undocumented.

Signed-off-by: Oren Held <orenhe@il.ibm.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoformat-patch: document the format.to configuration setting
Miklos Vajna [Mon, 12 Jul 2010 18:58:38 +0000 (20:58 +0200)]
format-patch: document the format.to configuration setting

[jc: with simplification from Jonathan Nieder]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: Spelling fix in protocol-capabilities.txt
Fredrik Skolmli [Sat, 10 Jul 2010 00:00:01 +0000 (02:00 +0200)]
Documentation: Spelling fix in protocol-capabilities.txt

Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agocheckout: accord documentation to what git does
Nicolas Sebrecht [Fri, 9 Jul 2010 20:27:48 +0000 (22:27 +0200)]
checkout: accord documentation to what git does

Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot0005: work around strange $? in ksh when program terminated by a signal
Johannes Sixt [Fri, 9 Jul 2010 07:05:16 +0000 (09:05 +0200)]
t0005: work around strange $? in ksh when program terminated by a signal

ksh93 is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells (ksh's behavior is still POSIX compliant in this regard).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agobackmerge a few more fixes to 1.7.1.X series
Junio C Hamano [Wed, 7 Jul 2010 17:36:19 +0000 (10:36 -0700)]
backmerge a few more fixes to 1.7.1.X series

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'maint-1.6.4' into maint
Junio C Hamano [Wed, 7 Jul 2010 18:13:40 +0000 (11:13 -0700)]
Merge branch 'maint-1.6.4' into maint

* maint-1.6.4:
  rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

14 years agorev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option
Uwe Kleine-König [Tue, 6 Jul 2010 14:46:05 +0000 (16:46 +0200)]
rev-parse: fix --parse-opt --keep-dashdash --stop-at-non-option

The ?: operator has a lower priority than |, so the implicit associativity
made the 6th argument of parse_options be PARSE_OPT_KEEP_DASHDASH if
keep_dashdash was true discarding PARSE_OPT_STOP_AT_NON_OPTION and
PARSE_OPT_SHELL_EVAL.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'mg/doc-rev-parse-treepath-syntax' into maint
Junio C Hamano [Wed, 7 Jul 2010 17:34:04 +0000 (10:34 -0700)]
Merge branch 'mg/doc-rev-parse-treepath-syntax' into maint

* mg/doc-rev-parse-treepath-syntax:
  git-rev-parse.txt: Add more examples for caret and colon
  git-rev-parse.txt: Document ":path" specifier

14 years agoMerge branch 'tr/receive-pack-aliased-update-fix' into maint
Junio C Hamano [Wed, 7 Jul 2010 17:25:15 +0000 (10:25 -0700)]
Merge branch 'tr/receive-pack-aliased-update-fix' into maint

* tr/receive-pack-aliased-update-fix:
  check_aliased_update: strcpy() instead of strcat() to copy
  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

14 years agofix git branch -m in presence of cross devices
Pierre Habouzit [Wed, 7 Jul 2010 07:47:20 +0000 (09:47 +0200)]
fix git branch -m in presence of cross devices

When you have for example a bare repository stored on NFS, and that you
create new workdirs locally (using contrib's git-new-workdir), logs/refs
is a symlink to a different device. Hence when the reflogs are renamed,
all must happen below logs/refs or one gets cross device rename errors
like:

  git branch -m foo
  error: unable to move logfile logs/refs/heads/master to tmp-renamed-log: Invalid cross-device link
  fatal: Branch rename failed

The fix is hence to use logs/refs/.tmp-renamed-log as a temporary log
name, instead of just tmp-renamed-log.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoadd missing && to submodule-merge testcase
Heiko Voigt [Tue, 6 Jul 2010 19:34:31 +0000 (21:34 +0200)]
add missing && to submodule-merge testcase

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agotest-date: fix sscanf type conversion
Jeff King [Tue, 6 Jul 2010 07:54:33 +0000 (03:54 -0400)]
test-date: fix sscanf type conversion

Reading into a time_t isn't portable, since we don't know
the exact type. Instead, use an unsigned long, which is what
show_date wants, anyway.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoxdiff: optimise for no whitespace difference when ignoring whitespace.
Dylan Reid [Tue, 6 Jul 2010 03:11:17 +0000 (23:11 -0400)]
xdiff: optimise for no whitespace difference when ignoring whitespace.

In xdl_recmatch, do the memcmp to check if the two lines are equal before
checking if whitespace flags are set.  If the lines are identical, then
there is no need to check if they differ only in whitespace.
This makes the common case (there is no whitespace difference) faster.
It costs the case where lines are the same length and contain
whitespace differences, but the common case is more than 20% faster.

Signed-off-by: Dylan Reid <dgreid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot0006: test timezone parsing
Jeff King [Sun, 4 Jul 2010 10:48:35 +0000 (06:48 -0400)]
t0006: test timezone parsing

Previously, test-date simply ignored the parsed timezone and
told show_date() to use UTC. Instead, let's print out what
we actually parsed.

While we're at it, let's make it easy for tests to work in a specific
timezone.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agorerere.txt: Document forget subcommand
Michael J Gruber [Mon, 5 Jul 2010 13:15:20 +0000 (15:15 +0200)]
rerere.txt: Document forget subcommand

dea4562 (rerere forget path: forget recorded resolution, 2009-12-25)
introduced the forget subcommand for rerere.

Document it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation/git-gc.txt: add reference to githooks
Chris Packham [Wed, 30 Jun 2010 20:41:27 +0000 (13:41 -0700)]
Documentation/git-gc.txt: add reference to githooks

This advertises the existence of the 'pre-auto-gc' hook and adds a cross
reference to where the hook is documented.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit 1.7.1.1 v1.7.1.1
Junio C Hamano [Tue, 29 Jun 2010 16:59:56 +0000 (09:59 -0700)]
Git 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agot/t9001: use egrep when regular expressions are involved
Brandon Casey [Mon, 28 Jun 2010 22:46:22 +0000 (17:46 -0500)]
t/t9001: use egrep when regular expressions are involved

Supplying backslashed, extended regular expressions to grep is not
portable.  Use egrep instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-rev-parse.txt: Add more examples for caret and colon
Michael J Gruber [Mon, 28 Jun 2010 19:01:07 +0000 (21:01 +0200)]
git-rev-parse.txt: Add more examples for caret and colon

Several items in the caret, colon and friends section contain examples
already. Make sure they all come with examples, and that examples come
early so that they serve as a visual guide, as well.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.1.1
Junio C Hamano [Tue, 29 Jun 2010 00:42:18 +0000 (17:42 -0700)]
Update draft release notes to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'tr/send-email-8bit' into maint
Junio C Hamano [Mon, 28 Jun 2010 23:19:03 +0000 (16:19 -0700)]
Merge branch 'tr/send-email-8bit' into maint

* tr/send-email-8bit:
  send-email: ask about and declare 8bit mails

14 years agoMerge branch 'pb/maint-perl-errmsg-no-dir' into maint
Junio C Hamano [Mon, 28 Jun 2010 23:18:58 +0000 (16:18 -0700)]
Merge branch 'pb/maint-perl-errmsg-no-dir' into maint

* pb/maint-perl-errmsg-no-dir:
  Git.pm: better error message

14 years agoMerge branch 'js/maint-am-rebase-invalid-author' into maint
Junio C Hamano [Mon, 28 Jun 2010 23:18:43 +0000 (16:18 -0700)]
Merge branch 'js/maint-am-rebase-invalid-author' into maint

* js/maint-am-rebase-invalid-author:
  am: use get_author_ident_from_commit instead of mailinfo when rebasing

14 years agoMerge branch 'jc/maint-simpler-common-prefix' into maint
Junio C Hamano [Mon, 28 Jun 2010 23:18:15 +0000 (16:18 -0700)]
Merge branch 'jc/maint-simpler-common-prefix' into maint

* jc/maint-simpler-common-prefix:
  common_prefix: simplify and fix scanning for prefixes

14 years agoMerge branch 'bd/maint-unpack-trees-parawalk-fix' into maint
Junio C Hamano [Mon, 28 Jun 2010 23:18:02 +0000 (16:18 -0700)]
Merge branch 'bd/maint-unpack-trees-parawalk-fix' into maint

* bd/maint-unpack-trees-parawalk-fix:
  unpack-trees: Make index lookahead less pessimal

14 years agonotes: Initialise variable to appease gcc
Ramsay Jones [Mon, 21 Jun 2010 18:52:29 +0000 (19:52 +0100)]
notes: Initialise variable to appease gcc

gcc version 3.4.4 thinks that the 'cmp' variable could be used
while uninitialised and complains thus:

    notes.c: In function `write_each_non_note_until':
    notes.c:719: warning: 'cmp' might be used uninitialized in \
        this function

Note that gcc versions 4.1.2 and 4.4.0 do not issue this warning.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agonotes: check number of parameters to "git notes copy"
Jeff King [Mon, 28 Jun 2010 08:59:07 +0000 (04:59 -0400)]
notes: check number of parameters to "git notes copy"

Otherwise we may segfault with too few parameters.

Signed-off-by: Jeff King <peff@peff.net>
Tested-by: Bert Wesarg <Bert.Wesarg@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agogit-rev-parse.txt: Document ":path" specifier
Michael J Gruber [Sun, 27 Jun 2010 13:15:22 +0000 (15:15 +0200)]
git-rev-parse.txt: Document ":path" specifier

The empty treeish in ":path" means "index". This is actually a special
case of the ":stage:path" syntax where it is documented, but mentioning
it also together with "treeish:path" is helpful, so do it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomsvc: Fix some compiler warnings
Ramsay Jones [Wed, 23 Jun 2010 19:47:50 +0000 (20:47 +0100)]
msvc: Fix some compiler warnings

In particular, using the normal (or production) compiler
warning level (-W3), msvc complains as follows:

.../sha1.c(244) : warning C4018: '<' : signed/unsigned mismatch
.../sha1.c(270) : warning C4244: 'function' : conversion from \
   'unsigned __int64' to 'unsigned long', possible loss of data
.../sha1.c(271) : warning C4244: 'function' : conversion from \
   'unsigned __int64' to 'unsigned long', possible loss of data

Note that gcc issues a similar complaint about line 244 when
compiling with -Wextra.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoDocumentation: grep: fix asciidoc problem with --
Christian Couder [Fri, 25 Jun 2010 02:16:24 +0000 (04:16 +0200)]
Documentation: grep: fix asciidoc problem with --

Asciidoc interprets two dashes separated by spaces as a single big
dash. So let's escape the first dash, so that "\--" will properly
appear as "--".

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agomsvc: Fix some "expr evaluates to function" compiler warnings
Ramsay Jones [Wed, 23 Jun 2010 19:40:19 +0000 (20:40 +0100)]
msvc: Fix some "expr evaluates to function" compiler warnings

In particular, the following warning is issued while compiling
notes.c:

    notes.c(927) : warning C4550: expression evaluates to a \
function which is missing an argument list

along with identical warnings on lines 928, 1016 and 1017.

In order to suppress the warning, we change the definition of
combine_notes_fn, so that the symbol type is an (explicit)
"pointer to function ...".  As a result, several other
declarations need some minor fix-up to take account of the
new typedef.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.1.1
Junio C Hamano [Tue, 22 Jun 2010 16:18:55 +0000 (09:18 -0700)]
Update draft release notes to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'ic/maint-rebase-i-abort' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)]
Merge branch 'ic/maint-rebase-i-abort' into maint

* ic/maint-rebase-i-abort:
  rebase -i: Abort cleanly if new base cannot be checked out

14 years agoMerge branch 'cc/maint-commit-reflog-msg' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)]
Merge branch 'cc/maint-commit-reflog-msg' into maint

* cc/maint-commit-reflog-msg:
  commit: use value of GIT_REFLOG_ACTION env variable as reflog message

14 years agoMerge branch 'jk/maint-advice-empty-amend' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:48 +0000 (09:31 -0700)]
Merge branch 'jk/maint-advice-empty-amend' into maint

* jk/maint-advice-empty-amend:
  commit: give advice on empty amend

14 years agoMerge branch 'tc/commit-abbrev-fix' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)]
Merge branch 'tc/commit-abbrev-fix' into maint

* tc/commit-abbrev-fix:
  commit::print_summary(): don't use format_commit_message()
  t7502-commit: add summary output tests for empty and merge commits
  t7502-commit: add tests for summary output

14 years agoMerge branch 'jn/document-rebase-i-p-limitation' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)]
Merge branch 'jn/document-rebase-i-p-limitation' into maint

* jn/document-rebase-i-p-limitation:
  rebase -i -p: document shortcomings

14 years agoMerge branch 'jn/checkout-doc' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:31:47 +0000 (09:31 -0700)]
Merge branch 'jn/checkout-doc' into maint

* jn/checkout-doc:
  Documentation/checkout: clarify description
  Documentation/checkout: clarify description

14 years agoMerge branch 'cc/maint-diff-CC-binary' into maint
Junio C Hamano [Tue, 22 Jun 2010 16:04:14 +0000 (09:04 -0700)]
Merge branch 'cc/maint-diff-CC-binary' into maint

* cc/maint-diff-CC-binary:
  diff: fix "git show -C -C" output when renaming a binary file

Conflicts:
diff.c

14 years agoMerge branch 'jc/t9129-any-utf8' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:31:53 +0000 (08:31 -0700)]
Merge branch 'jc/t9129-any-utf8' into maint

* jc/t9129-any-utf8:
  t9129: fix UTF-8 locale detection

14 years agoMerge branch 'cb/ls-files-cdup' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:31:46 +0000 (08:31 -0700)]
Merge branch 'cb/ls-files-cdup' into maint

* cb/ls-files-cdup:
  ls-files: allow relative pathspec
  quote.c: separate quoting and relative path generation

14 years agoMerge branch 'tc/merge-m-log' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:31:25 +0000 (08:31 -0700)]
Merge branch 'tc/merge-m-log' into maint

* tc/merge-m-log:
  merge: --log appends shortlog to message if specified
  fmt-merge-msg: add function to append shortlog only
  fmt-merge-msg: refactor merge title formatting
  fmt-merge-msg: minor refactor of fmt_merge_msg()
  merge: rename variable
  merge: update comment
  t7604-merge-custom-message: show that --log doesn't append to -m
  t7604-merge-custom-message: shift expected output creation

14 years agoMerge branch 'ph/clone-message-reword' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:31:20 +0000 (08:31 -0700)]
Merge branch 'ph/clone-message-reword' into maint

* ph/clone-message-reword:
  clone: reword messages to match the end-user perception

14 years agoMerge branch 'jn/maint-amend-missing-name' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:30:44 +0000 (08:30 -0700)]
Merge branch 'jn/maint-amend-missing-name' into maint

* jn/maint-amend-missing-name:
  commit --amend: cope with missing display name

14 years agoMerge branch 'pc/remove-warn' into maint
Junio C Hamano [Tue, 22 Jun 2010 15:30:38 +0000 (08:30 -0700)]
Merge branch 'pc/remove-warn' into maint

* pc/remove-warn:
  Remove a redundant errno test in a usage of remove_path
  Introduce remove_or_warn function
  Implement the rmdir_or_warn function
  Generalise the unlink_or_warn function

14 years agotests: remove unnecessary '^' from 'expr' regular expression
Junio C Hamano [Mon, 21 Jun 2010 18:18:54 +0000 (11:18 -0700)]
tests: remove unnecessary '^' from 'expr' regular expression

As Brandon noticed, a regular expression match given to 'expr' is already
anchored at the beginning.  Some versions of expr even complain about this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoUpdate draft release notes to 1.7.1.1
Junio C Hamano [Mon, 21 Jun 2010 12:48:18 +0000 (05:48 -0700)]
Update draft release notes to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'mc/maint-zoneparse' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:41:03 +0000 (05:41 -0700)]
Merge branch 'mc/maint-zoneparse' into maint

* mc/maint-zoneparse:
  Add "Z" as an alias for the timezone "UTC"

14 years agoMerge branch 'jk/diff-m-doc' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:57 +0000 (05:40 -0700)]
Merge branch 'jk/diff-m-doc' into maint

* jk/diff-m-doc:
  docs: clarify meaning of -M for git-log

14 years agoMerge branch 'jn/maint-doc-ignore' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:53 +0000 (05:40 -0700)]
Merge branch 'jn/maint-doc-ignore' into maint

* jn/maint-doc-ignore:
  gitignore.5: Clarify matching rules

14 years agoMerge branch 'bs/userdiff-php' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:48 +0000 (05:40 -0700)]
Merge branch 'bs/userdiff-php' into maint

* bs/userdiff-php:
  diff: Support visibility modifiers in the PHP hunk header regexp

14 years agoMerge branch 'jk/maint-sha1-file-name-fix' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:41 +0000 (05:40 -0700)]
Merge branch 'jk/maint-sha1-file-name-fix' into maint

* jk/maint-sha1-file-name-fix:
  remove over-eager caching in sha1_file_name

14 years agoMerge branch 'jk/maint-pull-dry-run-noop' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:33 +0000 (05:40 -0700)]
Merge branch 'jk/maint-pull-dry-run-noop' into maint

* jk/maint-pull-dry-run-noop:
  pull: do nothing on --dry-run

14 years agoMerge branch 'bw/diff-metainfo-color' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:40:10 +0000 (05:40 -0700)]
Merge branch 'bw/diff-metainfo-color' into maint

* bw/diff-metainfo-color:
  diff: fix coloring of extended diff headers

14 years agoMerge branch 'cb/assume-unchanged-fix' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:23 +0000 (05:39 -0700)]
Merge branch 'cb/assume-unchanged-fix' into maint

* cb/assume-unchanged-fix:
  Documentation: git-add does not update files marked "assume unchanged"
  do not overwrite files marked "assume unchanged"

14 years agoMerge branch 'jn/notes-doc' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:16 +0000 (05:39 -0700)]
Merge branch 'jn/notes-doc' into maint

* jn/notes-doc:
  Documentation/notes: nitpicks
  Documentation/notes: clean up description of rewriting configuration
  Documentation/notes: simplify treatment of default display refs
  Documentation/log: add a CONFIGURATION section
  Documentation/notes: simplify treatment of default notes ref
  Documentation/notes: add configuration section
  Documentation/notes: describe content of notes blobs
  Documentation/notes: document format of notes trees

14 years agoMerge branch 'ab/test-cleanup' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:39:02 +0000 (05:39 -0700)]
Merge branch 'ab/test-cleanup' into maint

* ab/test-cleanup:
  Turn setup code in t2007-checkout-symlink.sh into a test
  Move t6000lib.sh to lib-*

14 years agoMerge branch 'rs/diff-no-minimal' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:38:50 +0000 (05:38 -0700)]
Merge branch 'rs/diff-no-minimal' into maint

* rs/diff-no-minimal:
  git diff too slow for a file

14 years agoMerge branch 'bg/apply-blank-trailing-context' into maint
Junio C Hamano [Mon, 21 Jun 2010 12:38:36 +0000 (05:38 -0700)]
Merge branch 'bg/apply-blank-trailing-context' into maint

* bg/apply-blank-trailing-context:
  apply: Allow blank *trailing* context lines to match beyond EOF

14 years agogitweb/Makefile: fix typo in gitweb.min.css rule
Jay Soffian [Fri, 18 Jun 2010 21:01:25 +0000 (17:01 -0400)]
gitweb/Makefile: fix typo in gitweb.min.css rule

This typo has been in place since the rule was originally added by
0e6ce21 (Gitweb: add support for minifying gitweb.css).

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoGit.pm: better error message
Philippe Bruhat (BooK) [Thu, 17 Jun 2010 23:47:31 +0000 (01:47 +0200)]
Git.pm: better error message

Provide the bad directory name alongside with $!

Note: $! is set if there is "No such file or directory",
but isn't set if the file exists but is not a directory.

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agosend-email: ask about and declare 8bit mails
Thomas Rast [Thu, 17 Jun 2010 20:10:39 +0000 (22:10 +0200)]
send-email: ask about and declare 8bit mails

git-send-email passes on an 8bit mail as-is even if it does not
declare a content-type.  Because the user can edit email between
format-patch and send-email, such invalid mails are unfortunately not
very hard to come by.

Make git-send-email stop and ask about the encoding to use if it
encounters any such mail.  Also provide a configuration setting to
permanently configure an encoding.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agounpack-trees: Make index lookahead less pessimal
Brian Downing [Fri, 11 Jun 2010 02:59:07 +0000 (21:59 -0500)]
unpack-trees: Make index lookahead less pessimal

When traversing trees with an index, the current index pointer
(o->cache_bottom) occasionally has to be temporarily advanced forwards to
match the traversal order of the tree, which is not the same as the sort
order of the index.  The existing algorithm that did this (introduced in
730f72840cc50c523fe4cdd796ea2d2fc4571a28) would get "stuck" when the
cache_bottom was popped and then repeatedly check the same index entries
over and over.  This represents a serious performance regression for
large repositories compared to the old "broken" traversal order.

This commit makes a simple change to mitigate this.  Whenever
find_cache_pos sees that the current pos is also the cache_bottom, and
it has already been unpacked, it advances the cache_bottom as well as
the current pos.  This prevents the above "sticking" behavior without
dramatically changing the algorithm.

In addition, this commit moves the unpacked check above the
ce_in_traverse_path() check.  The simple bitmask check is cheaper, and
in the case described above will be firing quite a bit to advance the
cache_bottom after a tree pop.

This yields considerable performance improvements for large trees.
The following are the number of function calls for "git diff HEAD" on
the Linux kernel tree, with 33,307 files:

   Symbol               Calls Before   Calls After
   -------------------  ------------   -----------
   unpack_callback            35,332        35,332
   find_cache_pos             37,357        37,357
   ce_in_traverse_path     4,979,473        37,357
   do_compare_entry        6,828,181       251,925
   df_name_compare         6,828,181       251,925

And on a repository of 187,456 files:

   Symbol               Calls Before   Calls After
   -------------------  ------------   -----------
   unpack_callback           197,958       197,958
   find_cache_pos            208,460       208,460
   ce_in_traverse_path    37,308,336       208,460
   do_compare_entry      156,950,469     2,690,626
   df_name_compare       156,950,469     2,690,626

On the latter repository, user time for "git diff HEAD" was reduced from
5.58 to 0.42 seconds.  This is compared to 0.30 seconds before the
traversal order fix was implemented.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoPrepare draft release notes to 1.7.1.1
Junio C Hamano [Wed, 16 Jun 2010 23:56:53 +0000 (16:56 -0700)]
Prepare draft release notes to 1.7.1.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 years agoMerge branch 'cw/maint-exec-defpath' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:33:47 +0000 (16:33 -0700)]
Merge branch 'cw/maint-exec-defpath' into maint

* 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>

14 years agoMerge branch 'sc/http-late-auth' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:32:15 +0000 (16:32 -0700)]
Merge branch 'sc/http-late-auth' into maint

* sc/http-late-auth:
  Prompt for a username when an HTTP request 401s

14 years agoMerge branch 'by/blame-doc-m-c' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:51 +0000 (16:23 -0700)]
Merge branch 'by/blame-doc-m-c' into maint

* by/blame-doc-m-c:
  blame-options.txt: Add default value for `-M/-C` options.

14 years agoMerge branch 'cb/maint-stash-orphaned-file' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:48 +0000 (16:23 -0700)]
Merge branch 'cb/maint-stash-orphaned-file' into maint

* 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

14 years agoMerge branch 'mg/advice-statushints' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:42 +0000 (16:23 -0700)]
Merge branch 'mg/advice-statushints' into maint

* mg/advice-statushints:
  wt-status: take advice.statusHints seriously
  t7508: test advice.statusHints

14 years agoMerge branch 'jn/maint-bundle' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:22 +0000 (16:23 -0700)]
Merge branch 'jn/maint-bundle' into maint

* jn/maint-bundle:
  fix "bundle --stdin" segfault
  t5704 (bundle): add tests for bundle --stdin

14 years agoMerge branch 'rr/doc-submitting' into maint
Junio C Hamano [Wed, 16 Jun 2010 23:23:14 +0000 (16:23 -0700)]
Merge branch 'rr/doc-submitting' into maint

* rr/doc-submitting:
  SubmittingPatches: Add new section about what to base work on