git
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 6 Oct 2010 19:10:02 +0000 (12:10 -0700)] 
Merge branch 'maint'

* maint:
  Documentation/git-clone: describe --mirror more verbosely
  do not depend on signed integer overflow
  work around buggy S_ISxxx(m) implementations
  xdiff: cast arguments for ctype functions to unsigned char
  init: plug tiny one-time memory leak
  diffcore-pickaxe.c: remove unnecessary curly braces
  t3020 (ls-files-error-unmatch): remove stray '1' from end of file
  setup: make sure git dir path is in a permanent buffer
  environment.c: remove unused variable
  git-svn: fix processing of decorated commit hashes
  git-svn: check_cherry_pick should exclude commits already in our history
  Documentation/git-svn: discourage "noMetadata"

13 years agoMerge branch 'work/pt/for-junio' of git://repo.or.cz/git/mingw/4msysgit
Junio C Hamano [Tue, 5 Oct 2010 15:43:59 +0000 (08:43 -0700)] 
Merge branch 'work/pt/for-junio' of git://repo.or.cz/git/mingw/4msysgit

* 'work/pt/for-junio' of git://repo.or.cz/git/mingw/4msysgit:
  Add MinGW-specific execv() override.
  Fix Windows-specific macro redefinition warning.
  Fix 'clone' failure at DOS root directory.
  mingw: do not crash on open(NULL, ...)
  git-am: fix detection of absolute paths for windows
  Side-step MSYS-specific path "corruption" leading to t5560 failure.
  Side-step sed line-ending "corruption" leading to t6038 failure.
  Skip 'git archive --remote' test on msysGit
  Do not strip CR when grepping HTTP headers.
  Skip t1300.70 and 71 on msysGit.
  merge-octopus: Work around environment issue on Windows
  MinGW: Report errors when failing to launch the html browser.
  MinGW: fix stat() and lstat() implementations for handling symlinks
  MinGW: Add missing file mode bit defines
  MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility

13 years agoMartin Langhoff has a new e-mail address
Junio C Hamano [Tue, 5 Oct 2010 19:44:08 +0000 (12:44 -0700)] 
Martin Langhoff has a new e-mail address

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-clone: describe --mirror more verbosely
Uwe Kleine-König [Mon, 4 Oct 2010 17:28:27 +0000 (19:28 +0200)] 
Documentation/git-clone: describe --mirror more verbosely

Some people in #linux-rt noticed that describing what "--mirror" option does
with "it mirrors" is way insufficient.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Darren 'Some People' Hart <darren@dvhart.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodo not depend on signed integer overflow
Erik Faye-Lund [Tue, 5 Oct 2010 07:24:10 +0000 (09:24 +0200)] 
do not depend on signed integer overflow

Signed integer overflow is not defined in C, so do not depend on it.

This fixes a problem with GCC 4.4.0 and -O3 where the optimizer would
consider "consumed_bytes > consumed_bytes + bytes" as a constant
expression, and never execute the die()-call.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agowork around buggy S_ISxxx(m) implementations
René Scharfe [Mon, 4 Oct 2010 10:53:11 +0000 (12:53 +0200)] 
work around buggy S_ISxxx(m) implementations

There are buggy implementations of S_ISxxx(m) macros on some platforms
(e.g. NetBSD).  The issue is that NetBSD doesn't take care to wrap its
macro arguments in parentheses, so on Linux and sane systems we have
S_ISREG(m) defined as something like:

    (((m) & S_IFMT) == S_IFREG)

But on NetBSD:

    ((m & _S_IFMT) == _S_IFREG)

Since a caller in builtin/diff.c called our macro as `S_IFREG | 0644'
this bug introduced a logic error on NetBSD, since the precedence of
bit-wise & is higher than | in C.

[jc: took change description from Ævar Arnfjörð Bjarmason's patch]

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoxdiff: cast arguments for ctype functions to unsigned char
Jonathan Nieder [Mon, 4 Oct 2010 09:09:17 +0000 (04:09 -0500)] 
xdiff: cast arguments for ctype functions to unsigned char

The ctype functions isspace(), isalnum(), et al take an integer
argument representing an unsigned character, or -1 for EOF.  On
platforms with a signed char, it is unsafe to pass a char to them
without casting it to unsigned char first.

Most of git is already shielded against this by the ctype
implementation in git-compat-util.h, but xdiff, which uses libc
ctype.h, ought to be fixed.

Noticed-by: der Mouse <mouse@Rodents-Montreal.ORG>
Reported-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 agoinit: plug tiny one-time memory leak
Jonathan Nieder [Mon, 4 Oct 2010 04:34:27 +0000 (23:34 -0500)] 
init: plug tiny one-time memory leak

The buffer used to construct paths like ".git/objects/info" and
".git/objects/pack" is allocated on the heap and never freed.

So free it.  While at it, factor out the relevant code into its own
function and rename the sha1_dir variable to object_directory (to
match the change in everyday usage after the renaming of
SHA1_FILE_DIRECTORY in v0.99~603^2~7, 2005).

Noticed by valgrind while setting up tests (in test-lib).

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiffcore-pickaxe.c: remove unnecessary curly braces
Brandon Casey [Mon, 4 Oct 2010 22:51:47 +0000 (17:51 -0500)] 
diffcore-pickaxe.c: remove unnecessary curly braces

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge early part of git-svn into maint
Junio C Hamano [Tue, 5 Oct 2010 15:36:10 +0000 (08:36 -0700)] 
Merge early part of git-svn into maint

* commit 'git-svn/master~1':
  git-svn: fix processing of decorated commit hashes
  git-svn: check_cherry_pick should exclude commits already in our history
  Documentation/git-svn: discourage "noMetadata"

13 years agot3020 (ls-files-error-unmatch): remove stray '1' from end of file
Elijah Newren [Sun, 3 Oct 2010 20:00:00 +0000 (14:00 -0600)] 
t3020 (ls-files-error-unmatch): remove stray '1' from end of file

Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosetup: make sure git dir path is in a permanent buffer
Jonathan Nieder [Sat, 2 Oct 2010 08:36:52 +0000 (03:36 -0500)] 
setup: make sure git dir path is in a permanent buffer

If setup_git_env() is run before the usual repository discovery
sequence and .git is a file with the text

gitdir: <path>

(with <path> any string) then the in-core git_dir variable is set to
the result of converting <path> to an absolute path using
make_absolute_path().

Unfortunately make_absolute_path() returns its result in a static
buffer that is overwritten by later calls.  Such a call could cause
later accesses to git_dir (from git_pathdup(), for example) to read
the wrong path, leaving git very confused.

It is not obvious whether any existing code in git will trigger the
problem, but in any case, it is worth a few dozen bytes to copy the
return value from make_absolute_path() for some added peace of mind.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoenvironment.c: remove unused variable
Jonathan Nieder [Sat, 2 Oct 2010 08:35:29 +0000 (03:35 -0500)] 
environment.c: remove unused variable

After v1.6.0-rc0~230^2^ (environment.c: remove unused function,
2008-06-19), git_refs_dir is not used any more.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd MinGW-specific execv() override.
Eric Sunshine [Mon, 27 Sep 2010 11:02:17 +0000 (07:02 -0400)] 
Add MinGW-specific execv() override.

As of 2dbc887e, shell.c employs execv(), so provide a MinGW-specific
mingw_execv() override, complementing existing mingw_execvp() and
cousins.

As a bonus, this also resolves a compilation warning due to an
execv() prototype mismatch between Linux and MinGW. Linux expects
the second argument to be (char *const *), whereas MinGW expects
(const char *const *).

Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoFix Windows-specific macro redefinition warning.
Eric Sunshine [Mon, 27 Sep 2010 11:01:59 +0000 (07:01 -0400)] 
Fix Windows-specific macro redefinition warning.

shell.c defines macro HELP_COMMAND which collides with a like-named
macro from winuser.h. Avoid collision by sanitizing preprocessor
namespace after including Windows headers.

Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoFix 'clone' failure at DOS root directory.
Eric Sunshine [Wed, 7 Jul 2010 01:48:47 +0000 (21:48 -0400)] 
Fix 'clone' failure at DOS root directory.

Cloning via relative path fails for a project residing immediately under
the root directory of a DOS drive.  For instance, for project c:/foo,
issuing "cd c:/" followed by "git clone foo bar" fails with error
"Unable to find remote helper for 'c'".  The problem is caused by
make_nonrelative_path() incorrectly returning c://foo rather than
c:/foo for input "foo".  The bogus path c://foo is misinterpreted by
transport_get() as a URL with unrecognized protocol "c", hence the
missing remote helper error.  Fix make_nonrelative_path() to return
c:/foo rather than c://foo (and /foo rather than //foo on Unix).

Resolves msysgit issue #501 [1]

[PT: squashed in changes requested by Junio [2][3]]

[1] http://code.google.com/p/msysgit/issues/detail?id=501
[2] http://marc.info/?l=git&m=128570102331652&w=2
[3] http://marc.info/?l=git&m=128573246704862&w=2

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
13 years agomingw: do not crash on open(NULL, ...)
Erik Faye-Lund [Thu, 23 Sep 2010 17:35:25 +0000 (17:35 +0000)] 
mingw: do not crash on open(NULL, ...)

fetch_and_setup_pack_index() apparently pass a NULL-pointer to
parse_pack_index(), which in turn pass it to check_packed_git_idx(),
which again pass it to open(). Since open() already sets errno
correctly for the NULL-case, let's just avoid the problematic strcmp.

[PT: squashed in fix for fopen which was missed first time round]

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-am: fix detection of absolute paths for windows
Pat Thoyts [Thu, 30 Sep 2010 13:24:07 +0000 (14:24 +0100)] 
git-am: fix detection of absolute paths for windows

Add an is_absolute_path function to abstract out platform differences
in checking for an absolute or relative path.
Specifically fixes t4150-am on Windows.

[PT: updated following suggestion from j6t to support \* and //*]

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoSide-step MSYS-specific path "corruption" leading to t5560 failure.
Eric Sunshine [Tue, 20 Jul 2010 23:29:16 +0000 (19:29 -0400)] 
Side-step MSYS-specific path "corruption" leading to t5560 failure.

Upon program invocation, MSYS converts environment variables containing
path-like values from Unix-style to DOS-style under the assumption that
the program being invoked understands only DOS-style pathnames.  For
instance, the Unix-style path /msysgit is translated to c:/msysgit.  For
test t5560, the path being requested from git-http-backend is specified
via environment variable PATH_INFO as a URL path of the form
/repo.git/foobar, which git-http-backend combines with GIT_PROJECT_ROOT
to determine the actual physical path within the repository. This is a
case where MSYS's conversion of the path-like value of PATH_INFO causes
harm, for two reasons.  First, the resulting converted path, when joined
with GIT_PROJECT_ROOT is bogus (for instance,
"C:/msysgit/git/t/trash-zzz/C:/msysgit/repo.git/HEAD").  Second, the
converted PATH_INFO path is rejected by git-http-backend as an 'alias'
due to validation failure on the part of daemon_avoid_alias().
Unfortunately, the standard work-around of doubling the leading slash
(i.e. //repo.git/foobar) to suppress MSYS path conversion works only for
command-line arguments, but not for environment variables.
Consequently, side step the problem by instead passing git-http-backend
an already-constructed full path rather than components GIT_PROJECT_ROOT
and PATH_INFO.

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoSide-step sed line-ending "corruption" leading to t6038 failure.
Eric Sunshine [Fri, 17 Sep 2010 13:16:01 +0000 (09:16 -0400)] 
Side-step sed line-ending "corruption" leading to t6038 failure.

By default, MSYS sed throws away CR from CRLF line-endings.  Tests
t6038.5 and t6038.6 employ sed to normalize conflict output of git-merge
for validation purposes.  These tests expect CRLF line-endings to be
present in the normalized output of git-merge, and thus fail when sed
undesirably removes CR.  Fix by employing sed's -b/--binary switch to
suppress its default behavior of dropping CR characters.

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoSkip 'git archive --remote' test on msysGit
Pat Thoyts [Fri, 17 Sep 2010 13:27:56 +0000 (14:27 +0100)] 
Skip 'git archive --remote' test on msysGit

This test requires git daemon support which is not available on msysgit

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoDo not strip CR when grepping HTTP headers.
Pat Thoyts [Sun, 12 Sep 2010 09:37:24 +0000 (10:37 +0100)] 
Do not strip CR when grepping HTTP headers.

By default, MSYS grep reads in text-mode and converts CRLF into LF line
endings. For testing HTTP use binary mode (-U) as checking is done for
CR in HTTP headers

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoSkip t1300.70 and 71 on msysGit.
Pat Thoyts [Mon, 27 Sep 2010 21:02:57 +0000 (22:02 +0100)] 
Skip t1300.70 and 71 on msysGit.

These two tests fail on msysGit because /dev/null is an alias for nul on
Windows and when reading the value back from git config the alias does
not match the real filename. Also the HOME environment variable has a
unix-style path but git returns a native equivalent path for '~'.  As
these are platform-dependent equivalent results it seems simplest to
skip the test entirely.

Moves the NOT_MINGW prereq from t5503 into the test library.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agomerge-octopus: Work around environment issue on Windows
Johannes Schindelin [Fri, 11 Jun 2010 22:45:35 +0000 (00:45 +0200)] 
merge-octopus: Work around environment issue on Windows

For some reason, the environment variables get upper-cased when a
subprocess is launched on Windows. Cope with that.

[PT: fixed typo in the char range noted by junio]

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoMinGW: Report errors when failing to launch the html browser.
Pat Thoyts [Thu, 18 Mar 2010 21:45:19 +0000 (21:45 +0000)] 
MinGW: Report errors when failing to launch the html browser.

The mingw function to launch the system html browser is silent if the
target file does not exist leaving the user confused. Make it display
something.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
13 years agoMinGW: fix stat() and lstat() implementations for handling symlinks
Pat Thoyts [Wed, 17 Mar 2010 15:17:34 +0000 (15:17 +0000)] 
MinGW: fix stat() and lstat() implementations for handling symlinks

In msysGit the stat() function has been implemented using mingw_lstat
which sets the st_mode member to S_IFLNK when a symbolic links is found.
This causes the is_executable function to return when git attempts to
build a list of available commands in the help code and we end up missing
most git commands. (msysGit issue #445)

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

Includes squashed fix st_mode for symlink dirs

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
13 years agoMinGW: Add missing file mode bit defines
Sebastian Schuberth [Mon, 28 Dec 2009 17:13:52 +0000 (18:13 +0100)] 
MinGW: Add missing file mode bit defines

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
13 years agoMinGW: Use pid_t more consequently, introduce uid_t for greater compatibility
Sebastian Schuberth [Mon, 28 Dec 2009 17:04:21 +0000 (18:04 +0100)] 
MinGW: Use pid_t more consequently, introduce uid_t for greater compatibility

Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 30 Sep 2010 21:59:53 +0000 (14:59 -0700)] 
Merge branch 'maint'

* maint:
  Fix typo in pack-objects' usage
  Make sure that git_getpass() never returns NULL
  t0004 (unwritable files): simplify error handling
  rev-list-options: clarify --parents and --children

13 years agoFix typo in pack-objects' usage
Johannes Schindelin [Wed, 29 Sep 2010 22:22:33 +0000 (23:22 +0100)] 
Fix typo in pack-objects' usage

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMake sure that git_getpass() never returns NULL
Johannes Schindelin [Wed, 29 Sep 2010 22:22:32 +0000 (23:22 +0100)] 
Make sure that git_getpass() never returns NULL

The result of git_getpass() is used without checking for NULL, so let's
just die() instead of returning NULL.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0004 (unwritable files): simplify error handling
Jonathan Nieder [Tue, 7 Sep 2010 01:50:17 +0000 (20:50 -0500)] 
t0004 (unwritable files): simplify error handling

Instead of

... normal test script ...
status=$?
... cleanup ...
(exit $status)

set up cleanup commands with test_when_finished.  This makes the
test script a little shorter, and more importantly, it ensures errors
during cleanup are reported.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agorev-list-options: clarify --parents and --children
Michael J Gruber [Thu, 30 Sep 2010 15:31:43 +0000 (17:31 +0200)] 
rev-list-options: clarify --parents and --children

Make it clearer that --parents resp. --children list the parent resp.
child commits next to each commit, so that I understand next time.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoStart 1.7.4 cycle
Junio C Hamano [Wed, 29 Sep 2010 21:07:59 +0000 (14:07 -0700)] 
Start 1.7.4 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'tr/send-email-refuse-sending-unedited-cover-letter'
Junio C Hamano [Wed, 29 Sep 2010 22:26:12 +0000 (15:26 -0700)] 
Merge branch 'tr/send-email-refuse-sending-unedited-cover-letter'

* tr/send-email-refuse-sending-unedited-cover-letter:
  send-email: Refuse to send cover-letter template subject

13 years agoMerge branch 'ab/send-email-catfile'
Junio C Hamano [Wed, 29 Sep 2010 20:50:02 +0000 (13:50 -0700)] 
Merge branch 'ab/send-email-catfile'

* ab/send-email-catfile:
  send-email: use catfile() to concatenate files

13 years agoMerge branch 'jc/grep-header-all-match-fix'
Junio C Hamano [Wed, 29 Sep 2010 20:49:57 +0000 (13:49 -0700)] 
Merge branch 'jc/grep-header-all-match-fix'

* jc/grep-header-all-match-fix:
  log --author: take union of multiple "author" requests
  grep: move logic to compile header pattern into a separate helper

13 years agoMerge branch 'jc/no-branch-name-with-dash-at-front'
Junio C Hamano [Wed, 29 Sep 2010 20:49:38 +0000 (13:49 -0700)] 
Merge branch 'jc/no-branch-name-with-dash-at-front'

* jc/no-branch-name-with-dash-at-front:
  disallow branch names that start with a hyphen

13 years agoMerge branch 'jn/gitweb-test-lib'
Junio C Hamano [Wed, 29 Sep 2010 20:49:28 +0000 (13:49 -0700)] 
Merge branch 'jn/gitweb-test-lib'

* jn/gitweb-test-lib:
  t/gitweb-lib.sh: Use tabs for indent consistently
  t/gitweb-lib.sh: Use GIT_BUILD_DIR

13 years agoMerge branch 'bc/fortran-userdiff'
Junio C Hamano [Wed, 29 Sep 2010 20:49:23 +0000 (13:49 -0700)] 
Merge branch 'bc/fortran-userdiff'

* bc/fortran-userdiff:
  userdiff.c: add builtin fortran regex patterns

13 years agoMerge branch 'jk/read-tree-empty'
Junio C Hamano [Wed, 29 Sep 2010 20:49:18 +0000 (13:49 -0700)] 
Merge branch 'jk/read-tree-empty'

* jk/read-tree-empty:
  read-tree: deprecate syntax without tree-ish args

13 years agoMerge branch 'rr/format-patch-count-without-merges'
Junio C Hamano [Wed, 29 Sep 2010 20:49:09 +0000 (13:49 -0700)] 
Merge branch 'rr/format-patch-count-without-merges'

* rr/format-patch-count-without-merges:
  format-patch: Don't go over merge commits
  t4014-format-patch: Call test_tick before committing

13 years agoMerge branch 'jc/pickaxe-grep'
Junio C Hamano [Wed, 29 Sep 2010 20:49:03 +0000 (13:49 -0700)] 
Merge branch 'jc/pickaxe-grep'

* jc/pickaxe-grep:
  diff/log -G<pattern>: tests
  git log/diff: add -G<regexp> that greps in the patch text
  diff: pass the entire diff-options to diffcore_pickaxe()
  gitdiffcore doc: update pickaxe description

13 years agoMerge branch 'gb/shell-ext'
Junio C Hamano [Wed, 29 Sep 2010 20:48:44 +0000 (13:48 -0700)] 
Merge branch 'gb/shell-ext'

* gb/shell-ext:
  shell: Display errors from improperly-formatted command lines
  shell: Rewrite documentation and improve error message
  Add sample commands for git-shell
  Add interactive mode to git-shell for user-friendliness
  Allow creation of arbitrary git-shell commands

13 years agoMerge branch 'rr/fmt-merge-msg'
Junio C Hamano [Wed, 29 Sep 2010 20:48:20 +0000 (13:48 -0700)] 
Merge branch 'rr/fmt-merge-msg'

* rr/fmt-merge-msg:
  t6200-fmt-merge-msg: Exercise '--log' to configure shortlog length
  t6200-fmt-merge-msg: Exercise 'merge.log' to configure shortlog length
  merge: Make 'merge.log' an integer or boolean option
  merge: Make '--log' an integer option for number of shortlog entries
  fmt_merge_msg: Change fmt_merge_msg API to accept shortlog_len

Conflicts:
builtin/merge.c

13 years agoMerge branch 'po/etc-gitattributes'
Junio C Hamano [Wed, 29 Sep 2010 20:47:51 +0000 (13:47 -0700)] 
Merge branch 'po/etc-gitattributes'

* po/etc-gitattributes:
  Add global and system-wide gitattributes

Conflicts:
Documentation/config.txt
Makefile

13 years agoMinGW: avoid collisions between "tags" and "TAGS"
Junio C Hamano [Tue, 28 Sep 2010 21:08:38 +0000 (16:08 -0500)] 
MinGW: avoid collisions between "tags" and "TAGS"

On case insensitive filesystems, "tags" and "TAGS" target will try to
overwrite the same file.  Allow MinGW to use "ETAGS" instead.

These two targets do produce real files; do not put them on .PHONY target
list.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff: trivial fix for --output file error message
Matthieu Moy [Wed, 29 Sep 2010 07:26:23 +0000 (09:26 +0200)] 
diff: trivial fix for --output file error message

The option argument is either after the equal sign in --output=... or in
the next command-line argument. optarg is the reliable way to access it.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouser-manual: fix anchor name Finding-comments-With-given-Content
Michael J Gruber [Tue, 28 Sep 2010 11:16:07 +0000 (13:16 +0200)] 
user-manual: fix anchor name Finding-comments-With-given-Content

Change the anchor name to

Finding-commits-With-given-Content

so that it corresponds to the actual content there.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouser-manual: be consistent in illustrations to 'git rebase'
Kirill Smelkov [Tue, 28 Sep 2010 08:20:24 +0000 (12:20 +0400)] 
user-manual: be consistent in illustrations to 'git rebase'

Since we use a-b-c for mywork commits in one place, I think it would be
logical to also use a-b-c too in other illustration on this topic.

Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash: simplify parsing fixes
Jon Seymour [Mon, 27 Sep 2010 15:32:45 +0000 (01:32 +1000)] 
stash: simplify parsing fixes

This patch simplifies Brian's fix for the recent regression by:

* eliminating the extra loop
* eliminating use of git rev-parse for parsing flags
* making use of the for opt idiom for the retained loop
* eliminating the redundant -- case

The patch has been tested with the tests in current maint.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.3.1 v1.7.3.1
Junio C Hamano [Wed, 29 Sep 2010 16:42:53 +0000 (09:42 -0700)] 
Git 1.7.3.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash: fix git stash branch regression when branch creation fails
Jon Seymour [Tue, 28 Sep 2010 13:19:52 +0000 (23:19 +1000)] 
stash: fix git stash branch regression when branch creation fails

"git stash branch <branch> <stash>" started discarding the stash
when the branch creation fails.  It should have kept the stash
intact when aborting.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostash drops the stash even if creating the branch fails because it already exists
Tomas Carnecky [Tue, 28 Sep 2010 13:19:51 +0000 (23:19 +1000)] 
stash drops the stash even if creating the branch fails because it already exists

This bug was disovered by someone on IRC when he tried to

    $ git stash branch <branch> <stash>

while <branch> already existed. In that case the stash is dropped even
though it isn't applied on any branch, so the stash is effectively lost.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix missing 'does' in man-page for 'git checkout'
Linus Torvalds [Mon, 27 Sep 2010 19:14:57 +0000 (12:14 -0700)] 
Fix missing 'does' in man-page for 'git checkout'

Reported-by: Rainer Standke <rainer.standke@krankikom.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodir.c: squelch false uninitialized memory warning
Pat Notz [Thu, 16 Sep 2010 20:53:22 +0000 (14:53 -0600)] 
dir.c: squelch false uninitialized memory warning

GCC 4.4.4 on MacOS incorrectly warns about potential use of uninitialized memory.

Signed-off-by: Pat Notz <patnotz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-send-email.perl: ensure $domain is defined before using it
Brandon Casey [Mon, 27 Sep 2010 03:18:01 +0000 (22:18 -0500)] 
git-send-email.perl: ensure $domain is defined before using it

valid_fqdn() may attempt to operate on an undefined value if
Net::Domain::domainname fails to determine the domain name.  This causes
perl to emit unpleasant warnings.

So, add a check for whether $domain has been defined before using it.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agowt-status.c: don't leak directory entries when processing untracked,ignored
Brandon Casey [Mon, 27 Sep 2010 02:49:13 +0000 (21:49 -0500)] 
wt-status.c: don't leak directory entries when processing untracked,ignored

When iterating through the list of directory entries, searching for
untracked entries, only the entries added to the string_list were free'd.
The rest (tracked or not matching the pathspec) were leaked.

Ditto for the "ignored" loop.

Rearrange the loops so that all entries are free'd.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot6050 (replace): fix bogus "fetch branch with replacement" test
Christian Couder [Sun, 26 Sep 2010 05:20:18 +0000 (07:20 +0200)] 
t6050 (replace): fix bogus "fetch branch with replacement" test

The test was missing some "&&" at the end of some lines and it
was wrong because, as the replacement refs were not fetched,
the commits from the parallel branch should not show up. This
was found by Elijah Newren.

This is fixed by checking that after the branch from HASH6 is
fetched, the commits from the parallel branch don't show up,
and then by fetching the replacement refs and checking that
they do show up afterwards.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: Refer to git-commit-tree in git-filter-branch help
Wesley J. Landaker [Mon, 13 Sep 2010 14:59:54 +0000 (08:59 -0600)] 
Documentation: Refer to git-commit-tree in git-filter-branch help

Currently, the help for git filter-branch refers users of --env-filter
to git-commit for information about environment variables affecting
commits. However, this information is not contained in the git-commit
help, but is very explicitly detailed in git-commit-tree.

Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoupdate comment and documentation for :/foo syntax
Matthieu Moy [Fri, 24 Sep 2010 16:43:59 +0000 (18:43 +0200)] 
update comment and documentation for :/foo syntax

The documentation in revisions.txt did not match the implementation, and
the comment in sha1_name.c was incomplete.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoImprovements to `git checkout -h`
Daniel Knittl-Frank [Fri, 24 Sep 2010 16:21:59 +0000 (18:21 +0200)] 
Improvements to `git checkout -h`

be a little more verbose about what each option does

Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com>
Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocontrib/completion: --no-index option to git diff
Michael J Gruber [Thu, 23 Sep 2010 12:33:51 +0000 (14:33 +0200)] 
contrib/completion: --no-index option to git diff

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoprefer test -h over test -L in shell scripts
Jeff King [Wed, 22 Sep 2010 00:35:59 +0000 (20:35 -0400)] 
prefer test -h over test -L in shell scripts

Even though "-L" is POSIX, the former is more portable, and
we tend to prefer it already.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoCodingGuidelines: spell Arithmetic Expansion with $(($var))
Junio C Hamano [Wed, 22 Sep 2010 19:15:37 +0000 (12:15 -0700)] 
CodingGuidelines: spell Arithmetic Expansion with $(($var))

POSIX wants shells to support both "N" and "$N" and requires them to yield
the same answer to $((N)) and $(($N)), but we should aim for portability
in a case like this, especially when the price we pay to do so is so
small, i.e. a few extra dollars.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot1503: Fix arithmetic expansion syntax error when using dash
Ramsay Jones [Tue, 21 Sep 2010 17:45:09 +0000 (18:45 +0100)] 
t1503: Fix arithmetic expansion syntax error when using dash

On systems which have dash as /bin/sh, such as Ubuntu, the final
test (master@{n} for various n) fails with a syntax error while
processing an arithmetic expansion. The syntax error is caused by
using a bare name ('N') as a variable reference in the expression.

In order to avoid the syntax error, we spell the variable reference
as '$N' rather than simply 'N'.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agostrbuf.h: fix comment typo
Pat Notz [Thu, 16 Sep 2010 20:53:23 +0000 (14:53 -0600)] 
strbuf.h: fix comment typo

Signed-off-by: Pat Notz <patnotz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-stash: fix flag parsing
Brian Gernhardt [Fri, 24 Sep 2010 22:15:34 +0000 (18:15 -0400)] 
git-stash: fix flag parsing

Currently git-stash uses `git rev-parse --no-revs -- "$@"` to set its
FLAGS variable.  This is the same as `FLAGS="-- $@"`.  It should use
`git rev-parse --no-revs --flags "$@"`, but that eats any "-q" or
"--quiet" argument.  So move the check for quiet before rev-parse.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t3903-stash: improve testing of git-stash show
Brandon Casey [Fri, 24 Sep 2010 20:40:38 +0000 (15:40 -0500)] 
t/t3903-stash: improve testing of git-stash show

Recently, the 'stash show' functionality was broken for the case when a
stash-like argument was supplied.  Since, commit 9bf09e, 'stash show' when
supplied a stash-like argument prints nothing and still exists with a zero
status.  Unfortunately, the flaw slipped through the test suite cracks
since the output of 'stash show' was not verified to be correct.

Improve and expand on the existing tests so that this flaws is detected.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn: fix processing of decorated commit hashes
Mathias Lafeldt [Thu, 23 Sep 2010 22:05:03 +0000 (00:05 +0200)] 
git-svn: fix processing of decorated commit hashes

The function working_head_info() fails to parse commit hashes if they
are decorated (i.e. log.decorate is true), causing dcommit, rebase, and
other vital git-svn commands to malfunction.

This patch disables decorated log output with --no-decorate.

[ew: wrapped long line]

Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: check_cherry_pick should exclude commits already in our history
Steven Walter [Thu, 2 Sep 2010 22:32:06 +0000 (18:32 -0400)] 
git-svn: check_cherry_pick should exclude commits already in our history

The merge-base between @$parents and $merge_tip may have been reached
through a merge commit.  This means that some commits that are ancestors
of @$parents will not be ancestors of $merge_base.  The mergeinfo
property will not list commits that are ancestors of @$parents, so we
need to explicitly exclude them.

[ew: squashed and cleaned up test case from Steven]

Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agoDocumentation/git-svn: discourage "noMetadata"
Eric Wong [Sat, 21 Aug 2010 18:52:14 +0000 (18:52 +0000)] 
Documentation/git-svn: discourage "noMetadata"

"noMetadata" is a sometimes harmful option, so better document
its behavior and limitations.

Suggested-by: Vadim Zeitlin
Signed-off-by: Eric Wong <normalperson@yhbt.net>
13 years agoGit 1.7.3 v1.7.3
Junio C Hamano [Sat, 18 Sep 2010 21:55:08 +0000 (14:55 -0700)] 
Git 1.7.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'js/ls-files-x-doc'
Junio C Hamano [Sat, 18 Sep 2010 21:46:44 +0000 (14:46 -0700)] 
Merge branch 'js/ls-files-x-doc'

* js/ls-files-x-doc:
  ls-files documentation: reword for consistency
  git-ls-files.txt: clarify -x/--exclude option

Conflicts:
Documentation/git-ls-files.txt

13 years agogit-rebase--interactive.sh: replace cut with ${v%% *}
Chris Johnsen [Fri, 17 Sep 2010 21:42:51 +0000 (16:42 -0500)] 
git-rebase--interactive.sh: replace cut with ${v%% *}

Some versions of cut do not cope well with lines that do not end in
an LF. In this case, we can completely avoid cut by using the
${var%% *} parameter expansion (suggested by Brandon Casey).

I found this problem when t3404's "avoid unnecessary reset" failed
due to the "rebase -i" not avoiding updating the tested timestamp.

On a Mac OS X 10.4.11 system:

    % printf '%s' 'foo bar' | /usr/bin/cut -d ' ' -f 1
    cut: stdin: Illegal byte sequence

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t7300: workaround ancient touch by rearranging arguments
Brandon Casey [Wed, 15 Sep 2010 20:58:22 +0000 (15:58 -0500)] 
t/t7300: workaround ancient touch by rearranging arguments

The ancient touch on Solaris 7 thinks that a decimal number supplied as
the first argument specifies a date_time to give to the files specified by
the remaining arguments.  In this case, it fails to parse '1' as a proper
date_time and exits with a failure status.  Workaround this flaw by
rearranging the arguments supplied to touch so that a non-digit appears
first and touch will not be confused.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'bg/fix-t7003'
Junio C Hamano [Thu, 16 Sep 2010 14:43:41 +0000 (07:43 -0700)] 
Merge branch 'bg/fix-t7003'

* bg/fix-t7003:
  t7003: Use test_commit instead of custom function

13 years agols-files documentation: reword for consistency
Junio C Hamano [Thu, 16 Sep 2010 00:34:20 +0000 (17:34 -0700)] 
ls-files documentation: reword for consistency

Similar to descriptions of other options, state what -x does in imperative
mood.  Start sentences for -X and --exclude-per-directory options in
capital letters.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-ls-files.txt: clarify -x/--exclude option
Jay Soffian [Wed, 15 Sep 2010 23:56:48 +0000 (19:56 -0400)] 
git-ls-files.txt: clarify -x/--exclude option

Since b5227d8, -x/--exclude does not apply to cached files.
This is easy to miss unless you read the discussion in the
EXCLUDE PATTERNS section. Clarify that the option applies
to untracked files and direct the reader to EXCLUDE PATTERNS.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.3 rc2 v1.7.3-rc2
Junio C Hamano [Wed, 15 Sep 2010 19:47:37 +0000 (12:47 -0700)] 
Git 1.7.3 rc2

13 years agoMerge branch 'dr/maint-ls-tree-prefix-recursion-fix'
Junio C Hamano [Wed, 15 Sep 2010 19:41:13 +0000 (12:41 -0700)] 
Merge branch 'dr/maint-ls-tree-prefix-recursion-fix'

* dr/maint-ls-tree-prefix-recursion-fix:
  ls-tree $di $dir: do not mistakenly recurse into directories

13 years agoMerge branch 'os/fix-rebase-diff-no-prefix'
Junio C Hamano [Wed, 15 Sep 2010 19:40:33 +0000 (12:40 -0700)] 
Merge branch 'os/fix-rebase-diff-no-prefix'

* os/fix-rebase-diff-no-prefix:
  Add --src/dst-prefix to git-formt-patch in git-rebase.sh

13 years agoMerge branch 'jl/fix-test'
Junio C Hamano [Wed, 15 Sep 2010 19:40:12 +0000 (12:40 -0700)] 
Merge branch 'jl/fix-test'

* jl/fix-test:
  t1020: Get rid of 'cd "$HERE"' at the start of each test
  t2016 (checkout -p): add missing &&
  t1302 (core.repositoryversion): style tweaks
  t2105 (gitfile): add missing &&
  t1450 (fsck): remove dangling objects
  tests: subshell indentation stylefix
  Several tests: cd inside subshell instead of around

13 years agoMerge branch 'ch/filter-branch-deprecate-remap-to-ancestor'
Junio C Hamano [Wed, 15 Sep 2010 19:39:32 +0000 (12:39 -0700)] 
Merge branch 'ch/filter-branch-deprecate-remap-to-ancestor'

* ch/filter-branch-deprecate-remap-to-ancestor:
  filter-branch: retire --remap-to-ancestor

13 years agoMerge branch 'ch/maint-cannot-create-bundle-error'
Junio C Hamano [Wed, 15 Sep 2010 19:39:22 +0000 (12:39 -0700)] 
Merge branch 'ch/maint-cannot-create-bundle-error'

* ch/maint-cannot-create-bundle-error:
  bundle: detect if bundle file cannot be created

13 years agoMerge branch 'ks/recursive-rename-add-identical'
Junio C Hamano [Wed, 15 Sep 2010 19:39:12 +0000 (12:39 -0700)] 
Merge branch 'ks/recursive-rename-add-identical'

* ks/recursive-rename-add-identical:
  RE: [PATCH] Avoid rename/add conflict when contents are identical

13 years agoMerge git://repo.or.cz/git-gui
Junio C Hamano [Wed, 15 Sep 2010 19:34:37 +0000 (12:34 -0700)] 
Merge git://repo.or.cz/git-gui

* 'master' of git://repo.or.cz/git-gui:
  git-gui 0.13
  git-gui: avoid mis-encoding the copyright message on Windows.
  git-gui: Update Swedish translation (521t).
  git-gui: ensure correct application termination in git-gui--askpass
  git-gui: handle textconv filter on Windows and in development
  git-gui: use shell to launch textconv filter in "blame"
  git-gui: display error launching blame as a message box.
  git-gui: Make usage statement visible on Windows.

13 years agodisallow branch names that start with a hyphen
Junio C Hamano [Tue, 14 Sep 2010 20:09:20 +0000 (13:09 -0700)] 
disallow branch names that start with a hyphen

The current command line parser is overly lax in places and allows a
branch whose name begins with a hyphen e.g. "-foo" to be created, but the
parseopt infrastructure in general does not like to parse anything that
begins with a dash as a short-hand refname.  "git checkout -foo" won't
work, nor will "git branch -d -foo" (even though "git branch -d -- -foo"
works, it does so by mistake; we should not be taking anything but
pathspecs after double-dash).

All the codepaths that create a new branch ref, including the destination
of "branch -m src dst", use strbuf_check_branch_ref() to validate if the
given name is suitable as a branch name.  Tighten it to disallow a branch
that begins with a hyphen.

You can still get rid of historical mistakes with

  $ git update-ref -d refs/heads/-foo

and third-party Porcelains are free to keep using update-ref to create
refs with a path component that begins with "-".

Issue originally raised by Clemens Buchacher.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-gui 0.13 gitgui-0.13.0
Pat Thoyts [Tue, 14 Sep 2010 21:42:37 +0000 (22:42 +0100)] 
git-gui 0.13

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agosend-email: use catfile() to concatenate files
Ævar Arnfjörð Bjarmason [Tue, 14 Sep 2010 19:02:24 +0000 (19:02 +0000)] 
send-email: use catfile() to concatenate files

Change send-email to use Perl's catfile() function instead of
"$dir/$file". If send-email is given a $dir that ends with a / we'll
end up printing a double slashed path like "dir//mtfnpy.patch".

This doesn't cause any problems since Perl's IO layer will handle it,
but it looks ugly.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-gui: avoid mis-encoding the copyright message on Windows.
Pat Thoyts [Mon, 13 Sep 2010 19:41:42 +0000 (20:41 +0100)] 
git-gui: avoid mis-encoding the copyright message on Windows.

On Windows the tcl script file will use the system encoding and attempting
to convert the copyright mis-encodes the string. Instead, keep the message
as ASCII and substitute in the correct unicode character when running.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: Update Swedish translation (521t).
Peter Krefting [Sun, 12 Sep 2010 20:13:29 +0000 (21:13 +0100)] 
git-gui: Update Swedish translation (521t).

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agot7003: Use test_commit instead of custom function
Brian Gernhardt [Fri, 10 Sep 2010 22:06:36 +0000 (18:06 -0400)] 
t7003: Use test_commit instead of custom function

t7003-filter-branch.sh had a make_commit() function that was identical
to test_commit() in test-lib.sh except that it used tr to create a
lowercase file name from the uppercase branch name instead of
appending ".t".

Not only is this unneeded code duplication, it also was something
simply waiting to fail on case-insensitive file systems.  So replace
all uses of make_commit with test_commit.

While we're editing the setup, chain it together with && so that
failures early in the sequence don't get lost and add a commit graph.

Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agolog --author: take union of multiple "author" requests
Junio C Hamano [Mon, 13 Sep 2010 05:15:35 +0000 (22:15 -0700)] 
log --author: take union of multiple "author" requests

In the olden days,

    log --author=me --committer=him --grep=this --grep=that

used to be turned into:

    (OR (HEADER-AUTHOR me)
        (HEADER-COMMITTER him)
        (PATTERN this)
        (PATTERN that))

showing my patches that do not have any "this" nor "that", which was
totally useless.

80235ba ("log --author=me --grep=it" should find intersection, not union,
2010-01-17) improved it greatly to turn the same into:

    (ALL-MATCH
      (HEADER-AUTHOR me)
      (HEADER-COMMITTER him)
      (OR (PATTERN this) (PATTERN that)))

That is, "show only patches by me and committed by him, that have either
this or that", which is a lot more natural thing to ask.

We however need to be a bit more clever when the user asks more than one
"author" (or "committer"); because a commit has only one author (and one
committer), they ought to be interpreted as asking for union to be useful.
The current implementation simply added another author/committer pattern
at the same top-level for ALL-MATCH to insist on matching all, finding
nothing.

Turn

    log --author=me --author=her \
     --committer=him --committer=you \
--grep=this --grep=that

into

    (ALL-MATCH
      (OR (HEADER-AUTHOR me) (HEADER-AUTHOR her))
      (OR (HEADER-COMMITTER him) (HEADER-COMMITTER you))
      (OR (PATTERN this) (PATTERN that)))

instead.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogrep: move logic to compile header pattern into a separate helper
Junio C Hamano [Mon, 13 Sep 2010 02:30:48 +0000 (19:30 -0700)] 
grep: move logic to compile header pattern into a separate helper

The callers should be queuing only GREP_PATTERN_HEAD elements to the
header_list queue; simplify the switch and guard it with an assert.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/gitweb-lib.sh: Use tabs for indent consistently
Jakub Narebski [Sun, 12 Sep 2010 09:41:05 +0000 (11:41 +0200)] 
t/gitweb-lib.sh: Use tabs for indent consistently

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/gitweb-lib.sh: Use GIT_BUILD_DIR
Jakub Narebski [Sun, 12 Sep 2010 09:41:04 +0000 (11:41 +0200)] 
t/gitweb-lib.sh: Use GIT_BUILD_DIR

Use "$GIT_BUILD_DIR" instead of "$TEST_DIRECTORY/.." (both defined in
t/test-lib.sh) in t/gitweb-lib.sh.  It better describes the intent.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 12 Sep 2010 20:53:03 +0000 (13:53 -0700)] 
Merge branch 'maint'

* maint:
  t3101: modernise style
  compat/nedmalloc: don't force NDEBUG on the rest of git

Conflicts:
Makefile

13 years agols-tree $di $dir: do not mistakenly recurse into directories
Junio C Hamano [Sat, 11 Sep 2010 18:47:09 +0000 (11:47 -0700)] 
ls-tree $di $dir: do not mistakenly recurse into directories

When applying two pathspecs, one of which is named as a prefix to the
other, we mistakenly recursed into the shorter one.

Noticed and fixed by David Reis.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3101: modernise style
Junio C Hamano [Sat, 11 Sep 2010 17:53:29 +0000 (10:53 -0700)] 
t3101: modernise style

Also add a few " &&" cascade that were missing.

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