Code

git.git
13 years agot7810: avoid unportable use of "echo"
Junio C Hamano [Mon, 20 Jun 2011 21:49:34 +0000 (14:49 -0700)]
t7810: avoid unportable use of "echo"

Michael J Gruber noticed that under /bin/dash this test failed
(as is expected -- \n in the string can be interpreted by the
command), while it passed with bash.  We probably could work it
around by using backquote in front of it, but it is safer and
more readable to avoid "echo" altogether in a case like this.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: Fix problems with recently added tests
Michał Kiedrowicz [Thu, 26 May 2011 22:43:59 +0000 (00:43 +0200)]
git-grep: Fix problems with recently added tests

Brian Gernhardt reported that test 'git grep -E -F -G a\\+b' fails on
OS X 10.6.7. This is because I assumed \+ is part of BRE, which isn't
true on all platforms.

The easiest way to make this test pass is to just update expected
output, but that would make the test pointless. Its real purpose is to
check whether 'git grep -E -F -G' is different from 'git grep -E -G -F'.
To check that, let's change pattern to "a+b*c". This should return
different match for -G, -F and -E.

I also made two small tweaks to the tests. First, I added path "ab" to
all calls to future-proof tests. Second, I updated last two tests to
better show that 'git grep -P -E' is different from 'git grep -E -P'.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: Update tests (mainly for -P)
Michał Kiedrowicz [Sun, 22 May 2011 11:37:28 +0000 (13:37 +0200)]
git-grep: Update tests (mainly for -P)

Add few more tests for "-P/--perl-regexp" option of "git grep".

While at it, add some generic tests for grep.extendedRegexp config option,
for detecting invalid regexep and check if "last one wins" rule works for
selecting regexp type.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS
Junio C Hamano [Mon, 16 May 2011 07:11:53 +0000 (00:11 -0700)]
Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS

Otherwise we would fail to rebuild correctly when this option was
changed between $(MAKE) invocations, and more importantly, $(MAKE) test
would not pass it down and t/test-lib.sh would not set the LIBPCRE
prerequisite.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: update tests now regexp type is "last one wins"
Junio C Hamano [Mon, 16 May 2011 07:10:14 +0000 (00:10 -0700)]
git-grep: update tests now regexp type is "last one wins"

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: do not die upon -F/-P when grep.extendedRegexp is set.
Junio C Hamano [Tue, 10 May 2011 01:48:36 +0000 (18:48 -0700)]
git-grep: do not die upon -F/-P when grep.extendedRegexp is set.

The previous one made "git grep -P" fail when grep.extendedRegexp is
enabled.  That is a no-starter.  The option on the command line should
just make the command ignore the configured default.  The handling of "-F"
in the existing code has the same problem.

Instead of saying -G/-F/-E/-P incompatible with each other, just allow
the last one win.  That way, you can have "[alias] gr = grep -P" and
use Pcre for everyday work e.g. "git gr ':i?foo'", and append -G to the
aliased command line to override it e.g. "git gr -G '[Ff][Oo][Oo]'".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: Bail out when -P is used with -F or -E
Michał Kiedrowicz [Mon, 9 May 2011 21:52:08 +0000 (23:52 +0200)]
git-grep: Bail out when -P is used with -F or -E

This patch makes git-grep die() when -P is used on command line together
with -E/--extended-regexp or -F/--fixed-strings.

This also makes it bail out when grep.extendedRegexp is enabled.

But `git grep -G -P pattern` and `git grep -E -G -P pattern` still work
because -G and -E set opts.regflags during parse_options() and there is
no way to detect `-G` or `-E -G`.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: Add basic tests
Michał Kiedrowicz [Mon, 9 May 2011 21:52:07 +0000 (23:52 +0200)]
grep: Add basic tests

This modest patch adds simple tests for git grep -P/--perl-regexp and
its interoperation with -i and -w.

Tests are only enabled when prerequisite LIBPCRE is defined (it's
automatically set based on USE_LIBPCRE in test-lib.sh).

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoconfigure: Check for libpcre
Michał Kiedrowicz [Mon, 9 May 2011 21:52:06 +0000 (23:52 +0200)]
configure: Check for libpcre

This patch adds checks for libpcre to configure. By default libpcre is
disabled, --with-libpcre enables it (if it works).

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-grep: Learn PCRE
Michał Kiedrowicz [Mon, 9 May 2011 21:52:05 +0000 (23:52 +0200)]
git-grep: Learn PCRE

This patch teaches git-grep the --perl-regexp/-P options (naming
borrowed from GNU grep) in order to allow specifying PCRE regexes on the
command line.

PCRE has a number of features which make them more handy to use than
POSIX regexes, like consistent escaping rules, extended character
classes, ungreedy matching etc.

git isn't build with PCRE support automatically. USE_LIBPCRE environment
variable must be enabled (like `make USE_LIBPCRE=YesPlease`).

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: Extract compile_regexp_failed() from compile_regexp()
Michał Kiedrowicz [Mon, 9 May 2011 21:52:04 +0000 (23:52 +0200)]
grep: Extract compile_regexp_failed() from compile_regexp()

This simplifies compile_regexp() a little and allows re-using error
handling code.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: Fix a typo in a comment
Michał Kiedrowicz [Mon, 9 May 2011 21:52:03 +0000 (23:52 +0200)]
grep: Fix a typo in a comment

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: Put calls to fixmatch() and regmatch() into patmatch()
Michał Kiedrowicz [Wed, 4 May 2011 22:00:19 +0000 (00:00 +0200)]
grep: Put calls to fixmatch() and regmatch() into patmatch()

Both match_one_pattern() and look_ahead() use fixmatch() and regmatch()
in the same way. They really want to match a pattern againt a string,
but now they need to know if the pattern is fixed or regexp.

This change cleans this up by introducing patmatch() (from "pattern
match") and also simplifies inserting other ways of matching a string.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocontrib/completion: --line-number to git grep
Michał Kiedrowicz [Wed, 4 May 2011 22:00:18 +0000 (00:00 +0200)]
contrib/completion: --line-number to git grep

The "-n" option of "git grep" gained a synonym "--line-number" with
commit 7d6cb10b ("grep: Add the option '--line-number'", 2011-03-28).

Teach bash-completion about it.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: Add --line-number to git-grep synopsis
Michał Kiedrowicz [Wed, 4 May 2011 22:00:17 +0000 (00:00 +0200)]
Documentation: Add --line-number to git-grep synopsis

Commit 7d6cb10b ("grep: Add the option '--line-number'", 2011-03-28)
introduced the --line-number option and added its description to OPTIONS
section, but forgot to update SYNOPSIS.

Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5 v1.7.5
Junio C Hamano [Sun, 24 Apr 2011 06:36:32 +0000 (23:36 -0700)]
Git 1.7.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc3 v1.7.5-rc3
Junio C Hamano [Tue, 19 Apr 2011 18:51:00 +0000 (11:51 -0700)]
Git 1.7.5-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.5
Junio C Hamano [Tue, 19 Apr 2011 18:49:13 +0000 (11:49 -0700)]
Sync with 1.7.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.4.5 v1.7.4.5
Junio C Hamano [Tue, 19 Apr 2011 18:45:38 +0000 (11:45 -0700)]
Git 1.7.4.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn.txt: Document --mergeinfo
Michael J Gruber [Tue, 19 Apr 2011 12:24:27 +0000 (14:24 +0200)]
git-svn.txt: Document --mergeinfo

6abd933 (git-svn: allow the mergeinfo property to be set, 2010-09-24)
introduced the --mergeinfo option. Document it.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRevert "run-command: prettify -D_FORTIFY_SOURCE workaround"
Junio C Hamano [Mon, 18 Apr 2011 21:14:53 +0000 (14:14 -0700)]
Revert "run-command: prettify -D_FORTIFY_SOURCE workaround"

This reverts commit ebec842773932e6f853acac70c80f84209b5f83e, which
somehow mistakenly thought that any non-zero return from write(2) is
an error.

13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 14 Apr 2011 19:26:45 +0000 (12:26 -0700)]
Merge branch 'maint'

* maint:
  archive: document limitation of tar.umask config setting
  t3306,t5304: avoid clock skew issues
  git.txt: fix list continuation

13 years agoarchive: document limitation of tar.umask config setting
René Scharfe [Thu, 14 Apr 2011 18:04:57 +0000 (20:04 +0200)]
archive: document limitation of tar.umask config setting

The local value of the config variable tar.umask is not passed to the
other side with --remote.  We may want to change that, but for now just
document this fact.

Reported-by: Jacek Masiulaniec <jacek.masiulaniec@gmail.com>
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3306,t5304: avoid clock skew issues
Michael J Gruber [Thu, 14 Apr 2011 17:38:13 +0000 (19:38 +0200)]
t3306,t5304: avoid clock skew issues

On systems where the local time and file modification time may be out of
sync (e.g. test directory on NFS) t3306 and t5305 can fail because prune
compares times such as "now" (client time) with file modification times
(server times for remote file systems). I.e., these are spurious test
failures.

Avoid this by setting the relevant modification times to the local time.

Noticed on a system with as little as 2s time skew.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit.txt: fix list continuation
Michael J Gruber [Thu, 14 Apr 2011 07:17:26 +0000 (09:17 +0200)]
git.txt: fix list continuation

Remove a spurious empty line which prevented asciidoc from recognizing a
list continuation mark ('+'), so that it does not get output literally any
more.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc2 v1.7.5-rc2
Junio C Hamano [Wed, 13 Apr 2011 21:01:03 +0000 (14:01 -0700)]
Git 1.7.5-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 13 Apr 2011 20:59:19 +0000 (13:59 -0700)]
Merge branch 'maint'

* maint:

13 years agoMerge branch 'jc/rev-list-options-fix' into maint
Junio C Hamano [Wed, 13 Apr 2011 20:56:52 +0000 (13:56 -0700)]
Merge branch 'jc/rev-list-options-fix' into maint

* jc/rev-list-options-fix:
  "log --cherry-pick" documentation regression fix

13 years agoMerge branch 'js/checkout-untracked-symlink' into maint
Junio C Hamano [Wed, 13 Apr 2011 20:55:53 +0000 (13:55 -0700)]
Merge branch 'js/checkout-untracked-symlink' into maint

* js/checkout-untracked-symlink:
  t2021: mark a test as fixed

13 years agoremove doubled words, e.g., s/to to/to/, and fix related typos
Jim Meyering [Wed, 13 Apr 2011 15:39:40 +0000 (17:39 +0200)]
remove doubled words, e.g., s/to to/to/, and fix related typos

I found that some doubled words had snuck back into projects from which
I'd already removed them, so now there's a "syntax-check" makefile rule in
gnulib to help prevent recurrence.

Running the command below spotted a few in git, too:

  git ls-files | xargs perl -0777 -n \
    -e 'while (/\b(then?|[iao]n|i[fst]|but|f?or|at|and|[dt])\s+\1\b/gims)' \
    -e '{$n=($` =~ tr/\n/\n/ + 1); ($v=$&)=~s/\n/\\n/g;' \
    -e 'print "$ARGV:$n:$v\n"}'

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevert: Hide '-r' option in default usage
Ramkumar Ramachandra [Sun, 10 Apr 2011 15:39:14 +0000 (21:09 +0530)]
revert: Hide '-r' option in default usage

The '-r' command-line option is a no-op provided only for backward
compatiblity since abd6970 (cherry-pick: make -r the default, 2006-10-05),
and somehow ended up surviving across reimplementation in C at 9509af6
(Make git-revert & git-cherry-pick a builtin, 2007-03-01) and another
rewrite of the command line parser at f810379 (Make builtin-revert.c use
parse_options, 2007-10-07).  We should have stopped advertising the option
long time ago.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'js/checkout-untracked-symlink'
Junio C Hamano [Tue, 12 Apr 2011 07:05:50 +0000 (00:05 -0700)]
Merge branch 'js/checkout-untracked-symlink'

* js/checkout-untracked-symlink:
  t2021: mark a test as fixed

13 years agoMerge branch 'nd/init-gitdir'
Junio C Hamano [Tue, 12 Apr 2011 07:04:53 +0000 (00:04 -0700)]
Merge branch 'nd/init-gitdir'

* nd/init-gitdir:
  t0001: guard a new test with SYMLINKS prerequisite

13 years agot2021: mark a test as fixed
Johannes Sixt [Tue, 12 Apr 2011 06:41:19 +0000 (08:41 +0200)]
t2021: mark a test as fixed

The failure was fixed by the previous commit.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0001: guard a new test with SYMLINKS prerequisite
Johannes Sixt [Tue, 12 Apr 2011 06:30:49 +0000 (08:30 +0200)]
t0001: guard a new test with SYMLINKS prerequisite

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: extract Q_() source strings as ngettext()
Ævar Arnfjörð Bjarmason [Sun, 10 Apr 2011 19:37:01 +0000 (19:37 +0000)]
Makefile: extract Q_() source strings as ngettext()

The Q_() wrapper added by 0c9ea33 (i18n: add stub Q_() wrapper for
ngettext, 2011-03-09) needs to be noticed by xgettext.

Add an appropriate --keyword option to the Makefile, so that "make pot"
would notice the strings in the plural form marked with the wrapper.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoi18n: avoid parenthesized string as array initializer
Ramsay Jones [Thu, 7 Apr 2011 18:41:48 +0000 (19:41 +0100)]
i18n: avoid parenthesized string as array initializer

The syntax

    static const char ignore_error[] = ("something");

is invalid C.  A parenthesized string is not allowed as an array
initializer.

Some compilers, for example GCC and MSVC, allow this syntax as an
extension, but it is not a portable construct.  tcc does not parse it, for
example.

Remove the parenthesis from the definition of the N_() macro to
fix this.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge git://git.bogomips.org/git-svn
Junio C Hamano [Mon, 11 Apr 2011 16:34:19 +0000 (09:34 -0700)]
Merge git://git.bogomips.org/git-svn

* git://git.bogomips.org/git-svn:
  git-svn: Cache results of running the executable "git config"
  git-svn: Add a svn-remote.<name>.pushurl config key

13 years agoMerge git://git.kernel.org/pub/scm/gitk/gitk
Junio C Hamano [Mon, 11 Apr 2011 16:33:06 +0000 (09:33 -0700)]
Merge git://git.kernel.org/pub/scm/gitk/gitk

* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Update cherry-pick error message parsing
  gitk: Quote tag names in event bindings to avoid problems with % chars
  gitk: Allow user to control how much of the SHA1 ID gets auto-selected
  gitk: spelling fixes in Russian translation
  gitk: Take only numeric version components when computing $git_version

13 years agogit-svn: Cache results of running the executable "git config"
James Y Knight [Mon, 4 Apr 2011 19:09:08 +0000 (15:09 -0400)]
git-svn: Cache results of running the executable "git config"

Running programs is not cheap!

Signed-off-by: James Y Knight <jknight@itasoftware.com>
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: Add a svn-remote.<name>.pushurl config key
Alejandro R. Sedeño [Fri, 8 Apr 2011 14:57:54 +0000 (10:57 -0400)]
git-svn: Add a svn-remote.<name>.pushurl config key

Similar to the 'remote.<name>.pushurl' config key for git remotes,
'pushurl' is designed to be used in cases where 'url' points to an SVN
repository via a read-only transport, to provide an alternate
read/write transport. It is assumed that both keys point to the same
repository.

The 'pushurl' key is distinct from the 'commiturl' key in that
'commiturl' is a full svn path while 'pushurl' (like 'url') is a base
path. 'commiturl' takes precendece over 'pushurl' in cases where
either might be used.

The 'pushurl' is used by git-svn's dcommit and branch commands.

Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-by: James Y Knight <jknight@itasoftware.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogitk: Update cherry-pick error message parsing
Anders Kaseorg [Wed, 19 Jan 2011 19:45:00 +0000 (14:45 -0500)]
gitk: Update cherry-pick error message parsing

Commit 981ff5c37ae20687c98d98c8689d5e89016026d2 changed the error
message from git cherry-pick from
    Automatic cherry-pick failed.  [...advice...]
to
    error: could not apply 7ab78c9... Do something neat.
    [...advice...]

Update gitk’s regex to match this, restoring the ability to launch git
citool to resolve conflicted cherry-picks.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Paul Mackerras <paulus@samba.org>
13 years agogit-p4: replace each tab with 8 spaces for consistency
Andrew Garber [Thu, 7 Apr 2011 06:01:21 +0000 (02:01 -0400)]
git-p4: replace each tab with 8 spaces for consistency

Note that the majority of git-p4 uses spaces, not tabs, for indentation.
Consistent indentation is a good hygiene for Python scripts, and mixing
tabs and spaces in Python can lead to hard-to-find bugs.

Signed-off-by: Andrew Garber <andrew@andrewgarber.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc1 v1.7.5-rc1
Junio C Hamano [Wed, 6 Apr 2011 17:57:32 +0000 (10:57 -0700)]
Git 1.7.5-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.4
Junio C Hamano [Wed, 6 Apr 2011 17:51:30 +0000 (10:51 -0700)]
Sync with 1.7.4.4

13 years agoGit 1.7.4.4 v1.7.4.4
Junio C Hamano [Wed, 6 Apr 2011 17:49:35 +0000 (10:49 -0700)]
Git 1.7.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nm/maint-conflicted-submodule-entries' into maint
Junio C Hamano [Wed, 6 Apr 2011 17:41:17 +0000 (10:41 -0700)]
Merge branch 'nm/maint-conflicted-submodule-entries' into maint

* nm/maint-conflicted-submodule-entries:
  submodule: process conflicting submodules only once

13 years agoMerge branch 'mg/rev-list-n-reverse-doc' into maint
Junio C Hamano [Wed, 6 Apr 2011 17:40:49 +0000 (10:40 -0700)]
Merge branch 'mg/rev-list-n-reverse-doc' into maint

* mg/rev-list-n-reverse-doc:
  git-log.txt,rev-list-options.txt: put option blocks in proper order
  git-log.txt,rev-list-options.txt: -n/--max-count is commit limiting

13 years agoMerge branch 'jk/maint-remote-mirror-safer'
Junio C Hamano [Wed, 6 Apr 2011 17:38:14 +0000 (10:38 -0700)]
Merge branch 'jk/maint-remote-mirror-safer'

* jk/maint-remote-mirror-safer:
  remote: deprecate --mirror
  remote: separate the concept of push and fetch mirrors
  remote: disallow some nonsensical option combinations

13 years agoMerge branch 'mg/doc-revisions-txt'
Junio C Hamano [Wed, 6 Apr 2011 17:37:56 +0000 (10:37 -0700)]
Merge branch 'mg/doc-revisions-txt'

* mg/doc-revisions-txt:
  revisions.txt: language improvements
  revisions.txt: structure with a labelled list
  revisions.txt: consistent use of quotes

13 years agorevisions.txt: language improvements
Michael J Gruber [Mon, 4 Apr 2011 15:27:05 +0000 (17:27 +0200)]
revisions.txt: language improvements

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 4 Apr 2011 22:02:08 +0000 (15:02 -0700)]
Merge branch 'maint'

* maint:
  Documentation: trivial grammar fix in core.worktree description
  gitweb: Fix parsing of negative fractional timezones in JavaScript

13 years agoMerge branch 'jl/submodule-fetch-on-demand'
Junio C Hamano [Mon, 4 Apr 2011 22:02:01 +0000 (15:02 -0700)]
Merge branch 'jl/submodule-fetch-on-demand'

* jl/submodule-fetch-on-demand:
  fetch/pull: Describe --recurse-submodule restrictions in the BUGS section
  submodule update: Don't fetch when the submodule commit is already present
  fetch/pull: Don't recurse into a submodule when commits are already present
  Submodules: Add 'on-demand' value for the 'fetchRecurseSubmodule' option
  config: teach the fetch.recurseSubmodules option the 'on-demand' value
  fetch/pull: Add the 'on-demand' value to the --recurse-submodules option
  fetch/pull: recurse into submodules when necessary

Conflicts:
builtin/fetch.c
submodule.c

13 years agoMerge branch 'jc/rev-list-options-fix'
Junio C Hamano [Mon, 4 Apr 2011 17:55:38 +0000 (10:55 -0700)]
Merge branch 'jc/rev-list-options-fix'

* jc/rev-list-options-fix:
  "log --cherry-pick" documentation regression fix

13 years agoDocumentation: trivial grammar fix in core.worktree description
SZEDER Gábor [Mon, 4 Apr 2011 14:59:25 +0000 (16:59 +0200)]
Documentation: trivial grammar fix in core.worktree description

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: Fix parsing of negative fractional timezones in JavaScript
Jakub Narebski [Fri, 1 Apr 2011 19:06:28 +0000 (21:06 +0200)]
gitweb: Fix parsing of negative fractional timezones in JavaScript

Extract converting numerical timezone in the form of '(+|-)HHMM' to
timezoneOffset function, and fix parsing of negative fractional
timezones.

This is used to format timestamps in 'blame_incremental' view; this
complements commit 2b1e172 (gitweb: Fix handling of fractional
timezones in parse_date, 2011-03-25).

Now

  gitweb.cgi/git.git/blame_incremental/3fe5489:/contrib/gitview/gitview#l853

and

  gitweb.cgi/git.git/blame/3fe5489:/contrib/gitview/gitview#l853

show the same correct time in author's local timezone in title
(on mouseover) [Aneesh Kumar K.V, 2006-02-24 00:59:42 +0530].

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nm/maint-conflicted-submodule-entries'
Junio C Hamano [Mon, 4 Apr 2011 10:41:24 +0000 (03:41 -0700)]
Merge branch 'nm/maint-conflicted-submodule-entries'

* nm/maint-conflicted-submodule-entries:
  submodule: process conflicting submodules only once

13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 3 Apr 2011 20:53:11 +0000 (13:53 -0700)]
Merge branch 'maint'

* maint:
  Start preparing for 1.7.4.4
  pull: do not clobber untracked files on initial pull
  compat: add missing #include <sys/resource.h>

Conflicts:
RelNotes

13 years agoStart preparing for 1.7.4.4
Junio C Hamano [Sun, 3 Apr 2011 19:58:23 +0000 (12:58 -0700)]
Start preparing for 1.7.4.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopull: do not clobber untracked files on initial pull
Jeff King [Fri, 25 Mar 2011 18:13:31 +0000 (14:13 -0400)]
pull: do not clobber untracked files on initial pull

For a pull into an unborn branch, we do not use "git merge"
at all. Instead, we call read-tree directly. However, we
used the --reset parameter instead of "-m", which turns off
the safety features.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/index-update-if-able' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:33:05 +0000 (12:33 -0700)]
Merge branch 'jc/index-update-if-able' into maint

* jc/index-update-if-able:
  update $GIT_INDEX_FILE when there are racily clean entries
  diff/status: refactor opportunistic index update

13 years agoMerge branch 'lt/default-abbrev' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:32:51 +0000 (12:32 -0700)]
Merge branch 'lt/default-abbrev' into maint

* lt/default-abbrev:
  Rename core.abbrevlength back to core.abbrev
  Make the default abbrev length configurable

13 years agoMerge branch 'jc/maint-rev-list-culled-boundary' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:32:35 +0000 (12:32 -0700)]
Merge branch 'jc/maint-rev-list-culled-boundary' into maint

* jc/maint-rev-list-culled-boundary:
  list-objects.c: don't add an unparsed NULL as a pending tree

Conflicts:
list-objects.c

13 years agoMerge branch 'mm/maint-log-n-with-diff-filtering' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:31:59 +0000 (12:31 -0700)]
Merge branch 'mm/maint-log-n-with-diff-filtering' into maint

* mm/maint-log-n-with-diff-filtering:
  log: fix --max-count when used together with -S or -G

13 years agoMerge branch 'jk/format-patch-multiline-header' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:31:19 +0000 (12:31 -0700)]
Merge branch 'jk/format-patch-multiline-header' into maint

* jk/format-patch-multiline-header:
  format-patch: rfc2047-encode newlines in headers
  format-patch: wrap long header lines
  strbuf: add fixed-length version of add_wrapped_text

13 years agoMerge branch 'jn/maint-instaweb-plack-fix' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:30:58 +0000 (12:30 -0700)]
Merge branch 'jn/maint-instaweb-plack-fix' into maint

* jn/maint-instaweb-plack-fix:
  git-instaweb: Change how gitweb.psgi is made runnable as standalone app

13 years agoMerge branch 'lp/config-vername-check' into maint
Junio C Hamano [Sun, 3 Apr 2011 19:29:45 +0000 (12:29 -0700)]
Merge branch 'lp/config-vername-check' into maint

* lp/config-vername-check:
  Disallow empty section and variable names
  Sanity-check config variable names

13 years agocompat: add missing #include <sys/resource.h>
Jonathan Nieder [Fri, 18 Mar 2011 20:23:52 +0000 (15:23 -0500)]
compat: add missing #include <sys/resource.h>

Starting with commit c793430 (Limit file descriptors used by packs,
2011-02-28), git uses getrlimit to tell how many file descriptors it
can use.  Unfortunately it does not include the header declaring that
function, resulting in compilation errors:

 sha1_file.c: In function 'open_packed_git_1':
 sha1_file.c:718: error: storage size of 'lim' isn't known
 sha1_file.c:721: warning: implicit declaration of function 'getrlimit'
 sha1_file.c:721: error: 'RLIMIT_NOFILE' undeclared (first use in this function)
 sha1_file.c:718: warning: unused variable 'lim'

The standard header to include for this is <sys/resource.h> (which on
some systems itself requires declarations from <sys/types.h> or
<sys/time.h>).  Probably the problem was missed until now because in
current glibc sys/resource.h happens to be included by sys/wait.h.

MinGW does not provide sys/resource.h (and compat/mingw takes care of
providing getrlimit some other way), so add the missing #include to
the "#ifndef __MINGW32__" block in git-compat-util.h.

Reported-by: Stefan Sperling <stsp@stsp.name>
Tested-by: Stefan Sperling <stsp@stsp.name> [on OpenBSD]
Tested-by: Arnaud Lacombe <lacombar@gmail.com> [on FreeBSD 8]
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit.el: Don't use font-lock-compile-keywords
Lawrence Mitchell [Fri, 4 Feb 2011 10:59:18 +0000 (10:59 +0000)]
git.el: Don't use font-lock-compile-keywords

If font-lock is disabled, font-lock-compile-keywords complains.
Really what we want to do is to replace log-edit's font-lock
definitions with our own, so define a major mode deriving from
log-edit and set up font-lock-defaults there.  We then use the
optional MODE argument to log-edit to set up the major mode of the
commit buffer appropriately.

Signed-off-by: Lawrence Mitchell <wence@gmx.li>
Acked-by: Alexandre Julliard <julliard@winehq.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot2019-checkout-ambiguous-ref.sh: depend on C_LOCALE_OUTPUT
Ævar Arnfjörð Bjarmason [Sun, 3 Apr 2011 13:33:39 +0000 (13:33 +0000)]
t2019-checkout-ambiguous-ref.sh: depend on C_LOCALE_OUTPUT

The t2019-checkout-ambiguous-ref.sh tests added in v1.7.4.3~12^2
examines the output for a translatable string, and must be marked
with C_LOCALE_OUTPUT; otherwise, GETTEXT_POISON=YesPlease tests
will break.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix two unused variable warnings in gcc 4.6
Dan McGee [Mon, 28 Mar 2011 01:32:19 +0000 (20:32 -0500)]
Fix two unused variable warnings in gcc 4.6

Seen with -Wunused-but-set-variable.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoRemove old binaries from .gitignore
Dan McGee [Thu, 31 Mar 2011 02:26:01 +0000 (21:26 -0500)]
Remove old binaries from .gitignore

These two programs were dumped a while ago.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosparse: Fix errors and silence warnings
Stephen Boyd [Sun, 3 Apr 2011 07:06:54 +0000 (00:06 -0700)]
sparse: Fix errors and silence warnings

 * load_file() returns a void pointer but is using 0 for the return
   value

 * builtin/receive-pack.c forgot to include builtin.h

 * packet_trace_prefix can be marked static

 * ll_merge takes a pointer for its last argument, not an int

 * crc32 expects a pointer as the second argument but Z_NULL is defined
   to be 0 (see 38f4d13 sparse fix: Using plain integer as NULL pointer,
   2006-11-18 for more info)

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoUpdate release notes
Junio C Hamano [Sun, 3 Apr 2011 07:18:50 +0000 (00:18 -0700)]
Update release notes

As 1.7.4.3 has backmerged a handful of fixes from the master,
drop these entries from 1.7.5 release notes.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.4.3
Junio C Hamano [Sun, 3 Apr 2011 07:14:16 +0000 (00:14 -0700)]
Sync with 1.7.4.3

13 years agoGit 1.7.4.3 v1.7.4.3
Junio C Hamano [Sun, 3 Apr 2011 07:12:31 +0000 (00:12 -0700)]
Git 1.7.4.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDoc: mention --delta-base-offset is the default for Porcelain commands
Junio C Hamano [Sun, 3 Apr 2011 06:08:13 +0000 (23:08 -0700)]
Doc: mention --delta-base-offset is the default for Porcelain commands

The underlying pack-objects plumbing command still needs an explicit
option from the command line, but these days Porcelain passes the
option, so there is no need for end users to worry about it anymore.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'nd/init-gitdir'
Junio C Hamano [Sat, 2 Apr 2011 00:57:37 +0000 (17:57 -0700)]
Merge branch 'nd/init-gitdir'

* nd/init-gitdir:
  init, clone: support --separate-git-dir for .git file
  git-init.txt: move description section up

Conflicts:
builtin/clone.c

13 years agoMerge branch 'jc/merge-sans-branch'
Junio C Hamano [Sat, 2 Apr 2011 00:57:16 +0000 (17:57 -0700)]
Merge branch 'jc/merge-sans-branch'

* jc/merge-sans-branch:
  merge: merge with the default upstream branch without argument
  merge: match the help text with the documentation

Conflicts:
builtin/merge.c

13 years agoMerge branch 'jr/grep-en-config'
Junio C Hamano [Sat, 2 Apr 2011 00:56:27 +0000 (17:56 -0700)]
Merge branch 'jr/grep-en-config'

* jr/grep-en-config:
  grep: allow -E and -n to be turned on by default via configuration

13 years agoMerge branch 'ab/i18n-st'
Junio C Hamano [Sat, 2 Apr 2011 00:55:55 +0000 (17:55 -0700)]
Merge branch 'ab/i18n-st'

* ab/i18n-st: (69 commits)
  i18n: git-shortlog basic messages
  i18n: git-revert split up "could not revert/apply" message
  i18n: git-revert literal "me" messages
  i18n: git-revert "Your local changes" message
  i18n: git-revert basic messages
  i18n: git-notes GIT_NOTES_REWRITE_MODE error message
  i18n: git-notes basic commands
  i18n: git-gc "Auto packing the repository" message
  i18n: git-gc basic messages
  i18n: git-describe basic messages
  i18n: git-clean clean.requireForce messages
  i18n: git-clean basic messages
  i18n: git-bundle basic messages
  i18n: git-archive basic messages
  i18n: git-status "renamed: " message
  i18n: git-status "Initial commit" message
  i18n: git-status "Changes to be committed" message
  i18n: git-status shortstatus messages
  i18n: git-status "nothing to commit" messages
  i18n: git-status basic messages
  ...

Conflicts:
builtin/branch.c
builtin/checkout.c
builtin/clone.c
builtin/commit.c
builtin/grep.c
builtin/merge.c
builtin/push.c
builtin/revert.c
t/t3507-cherry-pick-conflict.sh
t/t7607-merge-overwrite.sh

13 years agoMerge branch 'jk/pull-into-empty'
Junio C Hamano [Sat, 2 Apr 2011 00:50:54 +0000 (17:50 -0700)]
Merge branch 'jk/pull-into-empty'

* jk/pull-into-empty:
  pull: do not clobber untracked files on initial pull
  merge: merge unborn index before setting ref

13 years agoMerge branch 'sb/sparse-more'
Junio C Hamano [Sat, 2 Apr 2011 00:50:20 +0000 (17:50 -0700)]
Merge branch 'sb/sparse-more'

* sb/sparse-more:
  Makefile: Cover more files with make check

13 years agoMerge branch 'maint'
Junio C Hamano [Sat, 2 Apr 2011 00:45:59 +0000 (17:45 -0700)]
Merge branch 'maint'

* maint:
  docs: fix filter-branch subdir example for exotic repo names

13 years agoMerge branch 'nd/index-doc' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:55 +0000 (16:23 -0700)]
Merge branch 'nd/index-doc' into maint

* nd/index-doc:
  doc: technical details about the index file format
  doc: technical details about the index file format

13 years agoMerge branch 'pk/stash-apply-status-relative' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:43 +0000 (16:23 -0700)]
Merge branch 'pk/stash-apply-status-relative' into maint

* pk/stash-apply-status-relative:
  Add test: git stash shows status relative to current dir
  git stash: show status relative to current directory

13 years agoMerge branch 'jc/maint-diff-q-filter' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:34 +0000 (16:23 -0700)]
Merge branch 'jc/maint-diff-q-filter' into maint

* jc/maint-diff-q-filter:
  diff --quiet: disable optimization when --diff-filter=X is used

13 years agoMerge branch 'js/maint-stash-index-copy' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:21 +0000 (16:23 -0700)]
Merge branch 'js/maint-stash-index-copy' into maint

* js/maint-stash-index-copy:
  stash: copy the index using --index-output instead of cp -p
  stash: fix incorrect quoting in cleanup of temporary files

13 years agoMerge branch 'mg/doc-bisect-tweak-worktree' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:23:15 +0000 (16:23 -0700)]
Merge branch 'mg/doc-bisect-tweak-worktree' into maint

* mg/doc-bisect-tweak-worktree:
  git-bisect.txt: example for bisecting with hot-fix
  git-bisect.txt: streamline run presentation

13 years agoMerge branch 'jh/maint-do-not-track-non-branches' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:45 +0000 (16:20 -0700)]
Merge branch 'jh/maint-do-not-track-non-branches' into maint

* jh/maint-do-not-track-non-branches:
  branch/checkout --track: Ensure that upstream branch is indeed a branch

13 years agoMerge branch 'fk/maint-cvsimport-early-failure' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:24 +0000 (16:20 -0700)]
Merge branch 'fk/maint-cvsimport-early-failure' into maint

* fk/maint-cvsimport-early-failure:
  git-cvsimport.perl: Bail out right away when reading from the server fails

13 years agoMerge branch 'jc/maint-apply-report-offset' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:19 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-report-offset' into maint

* jc/maint-apply-report-offset:
  apply -v: show offset count when patch did not apply exactly

13 years agoMerge branch 'jc/maint-apply-no-double-patch' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:20:11 +0000 (16:20 -0700)]
Merge branch 'jc/maint-apply-no-double-patch' into maint

* jc/maint-apply-no-double-patch:
  apply: do not patch lines that were already patched

13 years agoMerge branch 'js/checkout-untracked-symlink' into maint
Junio C Hamano [Fri, 1 Apr 2011 23:19:03 +0000 (16:19 -0700)]
Merge branch 'js/checkout-untracked-symlink' into maint

* js/checkout-untracked-symlink:
  do not overwrite untracked symlinks
  Demonstrate breakage: checkout overwrites untracked symlink with directory

13 years agoMerge "checkout ambiguous ref bugfix" into maint
Junio C Hamano [Fri, 1 Apr 2011 23:16:23 +0000 (16:16 -0700)]
Merge "checkout ambiguous ref bugfix" into maint

* commit '0cb6ad3':
  checkout: fix bug with ambiguous refs

13 years ago"log --cherry-pick" documentation regression fix
Junio C Hamano [Fri, 1 Apr 2011 18:04:46 +0000 (11:04 -0700)]
"log --cherry-pick" documentation regression fix

Earlier f98fd43 (git-log.txt,rev-list-options.txt: put option blocks in
proper order, 2011-03-08) moved the text around in the documentation for
options in the rev-list family of commands such as "log".  Consequently,
the description of the --cherry-pick option appears way above the
description of the --left-right option now.

But the description of the --cherry-pick option still refers to the
example for the --left-right option, like this:

    ... with --left-right, like the example ABOVE in the description of
    that option.

Rephrase it to clarify that we are making a forward reference.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevisions.txt: structure with a labelled list
Michael J Gruber [Fri, 1 Apr 2011 09:27:41 +0000 (11:27 +0200)]
revisions.txt: structure with a labelled list

Currently, the reader has to parse a textual description in order to
find a specific syntax in the list.

Restructure as a labelled list with systematic labels as well as
concrete examples as a visual guide.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorevisions.txt: consistent use of quotes
Michael J Gruber [Fri, 1 Apr 2011 09:27:40 +0000 (11:27 +0200)]
revisions.txt: consistent use of quotes

Our use of quotes is inconsistent everywhere and within some files.
Before reworking the structure of revisions.txt, make the quotes
consistent:

`git command`

'some snippet or term'

The former gets typeset as code, the latter with some form of emphasis.
the man backend uses two types of emphasis.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodocs: fix filter-branch subdir example for exotic repo names
Jeff King [Fri, 1 Apr 2011 14:46:27 +0000 (10:46 -0400)]
docs: fix filter-branch subdir example for exotic repo names

The GIT_INDEX_FILE variable we get from git has the full
path to the repo, which may contain spaces. When we use it
in our shell snippet, it needs to be quoted.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.5-rc0 v1.7.5-rc0
Junio C Hamano [Thu, 31 Mar 2011 20:58:16 +0000 (13:58 -0700)]
Git 1.7.5-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>