Code

git.git
13 years agogit-gui: fix size and position of window panes on startup
Pat Thoyts [Mon, 2 Aug 2010 12:42:45 +0000 (13:42 +0100)]
git-gui: fix size and position of window panes on startup

The themed panedwindow needs to have the sash position set after the
widget has been mapped therefore apply this setting in the Map event
binding. To avoid visible redraws as the application is constructed
the main window should be withdrawn until all the widgets have been added

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: mc cannot be used before msgcat has been loaded
Pat Thoyts [Mon, 2 Aug 2010 11:13:05 +0000 (12:13 +0100)]
git-gui: mc cannot be used before msgcat has been loaded

If someone attempts to use an older version that Tk 8.4 the error was
masked by the lack of a mc command.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: use textconv filter for diff and blame
Clément Poulain [Fri, 30 Jul 2010 08:11:02 +0000 (09:11 +0100)]
git-gui: use textconv filter for diff and blame

Create a checkbox "Use Textconv For Diffs and Blame" in git-gui options.
If checked and if the driver for the concerned file exists, git-gui calls diff
and blame with --textconv option

Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr>
Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr>
Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32
Pat Thoyts [Mon, 8 Mar 2010 12:43:27 +0000 (12:43 +0000)]
git-gui: Avoid using the <<Copy>> binding as a menu accelerator on win32

On Windows the Control-C binding is used to copy and is mapped to the Tk
virtual event <<Copy>>. In the initial git-gui dialog this is also bound
as an accelerator for the Clone menu item. The effect is that both bindings
run, copying the text but resetting the clone page or switching to the clone
page when the user tries to copy text from one of the entry fields.
This patch avoids this by using Control-L instead for Windows only.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix shortcut creation on cygwin
Heiko Voigt [Sat, 27 Feb 2010 20:48:48 +0000 (21:48 +0100)]
git-gui: fix shortcut creation on cygwin

When the user tried to create a desktop icon with git gui on cygwin
wscript was complaining about an unknown option and displaying the
non-native path as such.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix PATH environment for mingw development environment
Heiko Voigt [Sat, 27 Feb 2010 20:47:42 +0000 (21:47 +0100)]
git-gui: fix PATH environment for mingw development environment

When creating a desktop shortcut from the gui the shortcut directly
starts wish with the git-gui script. In the msysgit development
environment some dll's reside in the mingw/bin directory which causes
that git can not start because libiconv2.dll is not found.

When using such a link the error is even more cryptic stating:
"child killed: unknown signal"

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix usage of _gitworktree when creating shortcut for windows
Heiko Voigt [Sat, 27 Feb 2010 20:45:51 +0000 (21:45 +0100)]
git-gui: fix usage of _gitworktree when creating shortcut for windows

This fixes msysGit issue 425.

Signed-off-by: Heiko Voigt <heiko.voigt@mahr.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agogit-gui: fix "Explore Working Copy" for Windows again
Markus Heidelberg [Thu, 25 Feb 2010 00:14:22 +0000 (01:14 +0100)]
git-gui: fix "Explore Working Copy" for Windows again

It has already been fixed in commit 454efb47 (git-gui (Win): make
"Explore Working Copy" more robust, 2009-04-01), but has been broken in
commit 21985a11 (git-gui: handle non-standard worktree locations,
2010-01-23) by accidentally replacing too much with a new variable.

The problem can be reproduced when starting git-gui from within a
subdirectory. The solution is to convert the path name, explorer.exe is
invoked with, to a platform native name.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
13 years agoxsize_t: check whether we lose bits
Thomas Rast [Wed, 28 Jul 2010 16:36:31 +0000 (18:36 +0200)]
xsize_t: check whether we lose bits

Attempting to mmap (via git-add or similar) a file larger than 4GB on
32-bit Linux systems results in a repository that has only the file
modulo 4GB stored, because of truncation of the off_t file size to a
size_t for mmap.

When xsize_t was introduced to handle this truncation in dc49cd7 (Cast
64 bit off_t to 32 bit size_t, 2007-03-06), Shawn even pointed out
that it should detect when such a cutoff happens.

Make it so.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix git rebase --continue to work with touched files
David D. Kilzer [Wed, 28 Jul 2010 08:20:16 +0000 (01:20 -0700)]
Fix git rebase --continue to work with touched files

When performing a non-interactive rebase, sometimes
"git rebase --continue" will fail if an unmodified file is
touched in the working directory:

    You must edit all merge conflicts and then
    mark them as resolved using git add

This is caused by "git diff-files" reporting a difference
between the index and the filesystem:

    :100644 100644 d00491...... 000000...... M file

The fix is to run "git update-index --refresh" before
"git diff-files" as is done in git-rebase--interactive.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocument ls-files -t as semi-obsolete.
Matthieu Moy [Wed, 28 Jul 2010 07:24:27 +0000 (09:24 +0200)]
Document ls-files -t as semi-obsolete.

The behavior of "git ls-files -t" is very misleading (see
http://thread.gmane.org/gmane.comp.version-control.git/126516 and
http://thread.gmane.org/gmane.comp.version-control.git/144394/focus=144397
for examples of mislead users) and badly documented, hence we point the
users to superior alternatives.

The feature is marked as "semi-obsolete" but not "scheduled for removal"
since it's a plumbing command, scripts might use it, and Git testsuite
already uses it to test the state of the index.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.2.1 v1.7.2.1
Junio C Hamano [Tue, 27 Jul 2010 23:42:47 +0000 (16:42 -0700)]
Git 1.7.2.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoSync with 1.7.1.2
Junio C Hamano [Tue, 27 Jul 2010 23:40:15 +0000 (16:40 -0700)]
Sync with 1.7.1.2

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

13 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>
13 years agoexamples/commit: use --abbrev for commit summary
Jonathan Nieder [Tue, 27 Jul 2010 18:44:51 +0000 (13:44 -0500)]
examples/commit: use --abbrev for commit summary

After v1.7.1.1~17^2~3 (pretty: Respect --abbrev option, 2010-05-03),
plumbing users do not abbreviate %h hashes by default any more.

Noticed while investigating the bug fixed by v1.7.1.1~17^2
(commit::print_summary(): don't use format_commit_message(),
2010-06-12).

Cc: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocheckout, commit: remove confusing assignments to rev.abbrev
Jonathan Nieder [Tue, 27 Jul 2010 18:37:07 +0000 (13:37 -0500)]
checkout, commit: remove confusing assignments to rev.abbrev

Since they do not precede setup_revisions, these assignments of 0 to
rev.abbrev have no effect.

v1.7.1.1~17^2~3 (2010-05-03) taught the log --format=%h machinery
to respect --abbrev instead of always abbreviating, so we have to pay
attention to the abbrev setting now.

Helped-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 agoarchive: abbreviate substituted commit ids again
Jonathan Nieder [Tue, 27 Jul 2010 18:32:36 +0000 (13:32 -0500)]
archive: abbreviate substituted commit ids again

Given a file with:

  (define archive-id "$Format:%ct|%h|a$")

and an export-subst attribute, the "%h" results in an full 40-digit
object name instead of the expected 7-digit one.

The export-subst feature requests unabbreviated object names because
that is the low-level default.  The effect was not observable until
v1.7.1.1~17^2~3 (2010-05-03), which taught log --format=%h to respect
the --abbrev option.

Reported-by: Eli Barzilay <eli@barzilay.org>
Tested-by: Eli Barzilay <eli@barzilay.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 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>
13 years agocommit: remove full stop from usage help for -u
Stephen Boyd [Tue, 27 Jul 2010 05:40:32 +0000 (22:40 -0700)]
commit: remove full stop from usage help for -u

From api-parse-options.txt:

  `description` is a short string to describe the effect of the option.
  It shall begin with a lower-case letter and a full stop (`.`) shall be
  omitted at the end.

It also makes it less confusing if the argument is 'no.' or 'no'.

Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoClarify help message when no remote is specified in fetch/pull.
Matthieu Moy [Mon, 26 Jul 2010 16:32:09 +0000 (18:32 +0200)]
Clarify help message when no remote is specified in fetch/pull.

The message is especially confusing when "git fetch" is ran from "git
pull", for users not aware of "git fetch". The new message makes it clear
that "fetch" means "fetch new revisions", and gives hint on the solution.

We don't add a advice.* configuration option since this message doesn't
appear in normal use, and shouldn't disturb advanced users.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: add check-docs exception for gitrevisions
Thomas Rast [Mon, 26 Jul 2010 08:40:58 +0000 (10:40 +0200)]
Makefile: add check-docs exception for gitrevisions

The manpage was added in 1ed6f2c (Documentation: gitrevisions,
2010-07-05), but since it does not have a corresponding git command,
it needs an exception for check-docs.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix 'git' wrapper usage string
Thomas Rast [Mon, 26 Jul 2010 08:36:24 +0000 (10:36 +0200)]
Fix 'git' wrapper usage string

8b1fa77 (Allow passing of configuration parameters in the command
line, 2010-03-26) forgot the closing ']' for the -c option.

While we're there, also rewrap.  Instead of folding the last two lines
together, try to highlight that COMMAND is required by starting a line
with it.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-push: Explain status output in more detail
Thomas Rast [Sat, 24 Jul 2010 16:03:15 +0000 (18:03 +0200)]
Documentation/git-push: Explain status output in more detail

Mention the effects of the receive.deny* family of options for the
"remote rejected" case.  While there, also split up the explanation
into an easier-to-parse list format.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocument receive.denyDeleteCurrent
Thomas Rast [Sat, 24 Jul 2010 16:07:53 +0000 (18:07 +0200)]
Document receive.denyDeleteCurrent

This option was introduced by 747ca24 (receive-pack:
receive.denyDeleteCurrent, 2009-02-08) but never documented.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoCast execl*() NULL sentinels to (char *)
Thomas Rast [Sat, 24 Jul 2010 15:20:23 +0000 (17:20 +0200)]
Cast execl*() NULL sentinels to (char *)

The NULL sentinel argument to the execl*() family of calls must be
cast to (char *), as otherwise:

- platforms where NULL is just 0 (not (void *)) would pass an int

- (admittedly esoteric) platforms where NULL is (void *)0 and (void *)
  and (char *) have different memory layouts would pass the wrong kind
  of pointer

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-read-tree.txt: acknowledge the directory matching bug in sparse checkout
Nguyễn Thái Ngọc Duy [Sun, 25 Jul 2010 09:30:32 +0000 (16:30 +0700)]
git-read-tree.txt: acknowledge the directory matching bug in sparse checkout

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoINSTALL: configure /etc/xml/catalog to build docs on Cygwin
Jon Seymour [Sun, 25 Jul 2010 03:57:35 +0000 (13:57 +1000)]
INSTALL: configure /etc/xml/catalog to build docs on Cygwin

Without additional configuration steps, the documentation build on Cygwin
fails because the XML catalog is missing required rewrites for certain
docbook resources.

This patch documents the required configuration.

Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3700-add: fix dependence on stdout and stderr buffering
Johannes Sixt [Thu, 22 Jul 2010 08:13:33 +0000 (10:13 +0200)]
t3700-add: fix dependence on stdout and stderr buffering

One test case checked the stdout and stderr of 'git add' by constructing a
single 'expect' file that contained both streams. But when the command
runs, the order of stdout and stderr output is unpredictable because it
depends on how the streams are buffered. At least on Windows, the buffering
is different from what the test case expected. Hence, check the two output
texts separately.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-rebase--interactive.sh: use printf instead of echo to print commit message
Brandon Casey [Thu, 22 Jul 2010 19:15:11 +0000 (14:15 -0500)]
git-rebase--interactive.sh: use printf instead of echo to print commit message

On systems with an echo which defaults to the XSI-conformant behavior
(Solaris, or others using Ksh), echo will interpret certain backslashed
characters as control sequences.  This can cause a problem for interactive
rebase when it is used to rebase commits whose commit "subject" (the first
line) contains any of these backslashed sequences.  In this case, echo will
substitute the control sequence for the backslashed characters and either
the rebased commit message will differ from the original, or the rebase
process will fail.  Neither is desirable.

So work around this issue by replacing the echo statements used to print
out portions of the commit message, with printf.

Also, add a test to test for this breakage.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd a google-chrome option for web--browse
Nathan W. Panike [Thu, 22 Jul 2010 16:58:20 +0000 (11:58 -0500)]
Add a google-chrome option for web--browse

On some systems, the chrome browser is named google-chrome.  We add
support for this case.

Signed-off-by: Nathan W. Panike <nathan.panike@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint-1.7.1' into maint
Junio C Hamano [Mon, 26 Jul 2010 06:13:41 +0000 (23:13 -0700)]
Merge branch 'maint-1.7.1' into maint

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

13 years agoMakefile: make hard/symbolic links for non-builtins too
Brandon Casey [Fri, 23 Jul 2010 17:50:45 +0000 (12:50 -0500)]
Makefile: make hard/symbolic links for non-builtins too

To conserve space/improve file caching we try to make hard or symbolic links
from each builtin program to the main git executable rather than having
each be a complete duplicate copy of it.  We weren't doing this for the
non-builtin programs though.  So, just because we can, and because it's
easy, and for completeness sake, let's do it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMakefile: link builtins residing in bin directory to main git binary too
Brandon Casey [Fri, 23 Jul 2010 17:50:44 +0000 (12:50 -0500)]
Makefile: link builtins residing in bin directory to main git binary too

To conserve space/improve file caching we try to make hard or symbolic links
from each builtin program to the main git executable rather than having
each be a complete duplicate copy of it.  We weren't doing this for the
builtin programs residing in the bin directory though.  So, let's do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
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 [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

13 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

13 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

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

13 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>
13 years agorebase: protect against diff.renames configuration
Junio C Hamano [Tue, 11 Nov 2008 00:15:49 +0000 (16:15 -0800)]
rebase: protect against diff.renames configuration

We currently do not disable diff.renames configuration while rebase
internally runs "format-patch" to feed "am -3".

The end user configuration for "diff" should not affect the result
produced by the higher level command that is related to "diff" only
because internally it is implemented in terms of it.

For that matter, I have a feeling that format-patch should not even look
at diff.renames, but we seem to have been doing this for a long time so
there is no easy way to fix this thinko.

In any case, here is a much straightforward fix for "rebase".

[jn: with test case from David]

Reported-by: David D. Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3400 (rebase): whitespace cleanup
Jonathan Nieder [Fri, 23 Jul 2010 17:05:24 +0000 (12:05 -0500)]
t3400 (rebase): whitespace cleanup

This test used 5-space indents since it was added in 2005, but
recently the temptation to use tabs to indent has been too
strong, resulting in uneven whitespace.  Switch over completely
to tabs.

While at it, use a more modern style for consistency with other
tests:

 - names of tests go on the same line as test_expect_success;
 - extra whitespace after > redirection operators is removed.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoTeach "apply --index-info" to handle rename patches
Junio C Hamano [Mon, 10 Nov 2008 23:49:03 +0000 (15:49 -0800)]
Teach "apply --index-info" to handle rename patches

With v1.5.3.2~14 (apply --index-info: fall back to current index for
mode changes, 2007-09-17), git apply learned to stop worrying
about the lack of diff index line when a file already present in the
current index had no content change.

But it still worries too much: for rename patches, it is checking
that both the old and new filename are present in the current
index.  This makes no sense, since a file rename generally
involves creating a file there was none before.

So just check the old filename.

Noticed while trying to use “git rebase” with diff.renames = copies.

[jn: add tests]

Reported-by: David D. Kilzer <ddkilzer@kilzer.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4150 (am): futureproof against failing tests
Jonathan Nieder [Fri, 23 Jul 2010 17:04:01 +0000 (12:04 -0500)]
t4150 (am): futureproof against failing tests

Most tests in t4150 begin by navigating to a sane state and
applying some patch:

git checkout first &&
git am patch1

If a previous test left behind unmerged files or a .git/rebase-apply
directory, they are untouched and the test fails, causing later tests
to fail, too.  This is not a problem in practice because none of the
tests leave a mess behind.

But as a futureproofing measure, it is still best to avoid the problem
and clean up at the start of each test.  In particular, this
simplifies the process of adding new tests that are known to fail.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot4150 (am): style fix
Jonathan Nieder [Fri, 23 Jul 2010 17:03:07 +0000 (12:03 -0500)]
t4150 (am): style fix

Place setup commands in test_expect_success blocks.  This makes the
rare event of the setup commands breaking on some platform easier to
diagnose, and more importantly, it visually distinguishes where
each test begins and ends.

Instead of running test -z against the result of "git diff" command
substitution, use "git diff --exit-code", to improve output when
running with the "-v" option.

Use test_cmp in place of "test $(foo) = $(bar)" for similar reasons.

Remove whitespace after the > and < redirection operators for
consistency with other tests.

The order of arguments to test_cmp is "test_cmp expected actual".

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-instaweb: Don't assume Apache executable is named apache2
Dan McGee [Wed, 30 Jun 2010 12:29:08 +0000 (07:29 -0500)]
git-instaweb: Don't assume Apache executable is named apache2

On Arch Linux, the executable for the Apache HTTP server keeps
the 'httpd' name and is not named 'apache2'. The path to the
server modules also contains 'httpd' rather than 'apache2'.
Remove some of these assumptions and add the httpd name in where
it may be required. Finally, make some slight style adjustments
to the code we are touching to make it fit the style of the rest
of the script.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-instaweb: Fix Apache environment variable passing
Dan McGee [Wed, 30 Jun 2010 02:44:59 +0000 (21:44 -0500)]
git-instaweb: Fix Apache environment variable passing

We were passing the non-existent GIT_EXEC_DIR through instead of the real
GIT_EXEC_PATH. In addition, these weren't being passed at all for CGI (non
mod_perl) execution so get them included there as well.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-instaweb: Fix custom apache log placement
Dan McGee [Wed, 30 Jun 2010 02:44:58 +0000 (21:44 -0500)]
git-instaweb: Fix custom apache log placement

'CustomLog' is provided by mod_log_config so we need to include the module
in our generated config. This was added in d94775e1f9a.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agoGit 1.7.2 v1.7.2
Junio C Hamano [Wed, 21 Jul 2010 19:55:50 +0000 (12:55 -0700)]
Git 1.7.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotests: correct "does reflog exist?" tests
Junio C Hamano [Wed, 21 Jul 2010 19:47:48 +0000 (12:47 -0700)]
tests: correct "does reflog exist?" tests

These two tests weren't about how "git reflog show <branch>" exits when
there is no reflog, but were about "checkout" and "branch" create or not
create reflog when creating a new <branch>.  Update the tests to check
what we are interested in, using "git rev-parse --verify".

Also lose tests based on "test -f .git/logs/refs/heads/<branch>" from
nearby, to avoid exposing this particular implementation detail
unnecessarily.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/: work around one-shot variable assignment with test_must_fail
Brandon Casey [Tue, 20 Jul 2010 21:55:31 +0000 (16:55 -0500)]
t/: work around one-shot variable assignment with test_must_fail

See e2007832552ccea9befed9003580c494f09e666e

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/README: correct an exception when breaking a && chain in tests
Jonathan Nieder [Wed, 21 Jul 2010 00:01:01 +0000 (19:01 -0500)]
t/README: correct an exception when breaking a && chain in tests

The correct advice should have been taken from c289c31 (t/t7006: ignore
return status of shell's unset builtin, 2010-06-02).  A real-life issue
we experienced was with "unset", not with "export" (exporting an
unset variable may have similar portability issues, though).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation: spelling fixes
Ville Skyttä [Mon, 19 Jul 2010 21:17:17 +0000 (00:17 +0300)]
Documentation: spelling fixes

[jc: with wording changes from Jonathan Nieder]

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail
Brandon Casey [Tue, 20 Jul 2010 18:27:55 +0000 (13:27 -0500)]
t/{t5541,lib-httpd}: replace problematic '!()' notation with test_must_fail

The '!()' notation is interpreted as a pattern-list on Ksh.  The Ksh man
page describe it as follows:

   !(pattern-list)
      Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list.  If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t3700: convert two uses of negation operator '!' to use test_must_fail
Brandon Casey [Tue, 20 Jul 2010 15:24:47 +0000 (10:24 -0500)]
t/t3700: convert two uses of negation operator '!' to use test_must_fail

These two lines use the negation '!' operator to negate the result of a
simple command.  Since these commands do not contain any pipes or other
complexities, the test_must_fail function can be used and is preferred
since it will additionally detect termination due to a signal.

This was noticed because the second use of '!' does not include a space
between the '!' and the opening parens.  Ksh interprets this as follows:

   !(pattern-list)
      Matches anything except one of the given patterns.

Ksh performs a file glob using the pattern-list and then tries to execute
the first file in the list.  If a space is added between the '!' and the
open parens, then Ksh will not interpret it as a pattern list, but in this
case, it is preferred to use test_must_fail, so lets do so.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Tue, 20 Jul 2010 18:29:30 +0000 (11:29 -0700)]
Merge branch 'maint'

* maint:
  t/README: clarify test_must_fail description
  Check size of path buffer before writing into it

Conflicts:
t/README

13 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>
13 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>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 19 Jul 2010 18:21:08 +0000 (11:21 -0700)]
Merge branch 'maint'

* maint:
  update-server-info: Shorten read_pack_info_file()
  Documentation: Explain git-mergetool's use of temporary files

13 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>
13 years agogit add: Add --ignore-missing to SYNOPSIS
Ævar Arnfjörð Bjarmason [Sat, 17 Jul 2010 15:33:15 +0000 (15:33 +0000)]
git add: Add --ignore-missing to SYNOPSIS

All the git add options were listed in the synopsis until the
--ignore-missing option was added. Change that so that the git add
documentation now has the complete listing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit submodule add: Remove old docs about implicit -f
Ævar Arnfjörð Bjarmason [Sat, 17 Jul 2010 15:53:45 +0000 (15:53 +0000)]
git submodule add: Remove old docs about implicit -f

git submodule add no longer implicitly adds with --force. Remove
references to the old functionality in the documentation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit submodule add: Require the new --force option to add ignored paths
Jens Lehmann [Sat, 17 Jul 2010 15:11:43 +0000 (17:11 +0200)]
git submodule add: Require the new --force option to add ignored paths

To make the behavior of "git submodule add" more consistent with "git add"
ignored submodule paths should not be silently added when they match an
entry in a .gitignore file. To be able to override that default behavior
in the same way as we can do that for "git add", the new option "--force"
is introduced.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jl/add-n-ignore-missing'
Junio C Hamano [Mon, 19 Jul 2010 18:09:38 +0000 (11:09 -0700)]
Merge branch 'jl/add-n-ignore-missing'

* jl/add-n-ignore-missing:
  git add: Add the "--ignore-missing" option for the dry run

13 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>
13 years agoDocumentation/reset: move "undo permanently" example behind "make topic"
Thomas Rast [Sun, 18 Jul 2010 18:23:26 +0000 (20:23 +0200)]
Documentation/reset: move "undo permanently" example behind "make topic"

I consider the latter usage more important.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/reset: reorder examples to match description
Thomas Rast [Sun, 18 Jul 2010 18:23:25 +0000 (20:23 +0200)]
Documentation/reset: reorder examples to match description

A previous commit moved the <paths> mode (undoes git-add) to the front
in the description, so make the examples follow the same order.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/reset: promote 'examples' one section up
Thomas Rast [Sun, 18 Jul 2010 18:23:24 +0000 (20:23 +0200)]
Documentation/reset: promote 'examples' one section up

Move the examples section upwards, before the discussion that gives
the gory details.  Adjust the style of the heading accordingly.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/reset: separate options by mode
Thomas Rast [Sun, 18 Jul 2010 18:23:23 +0000 (20:23 +0200)]
Documentation/reset: separate options by mode

Remove all but -q from the OPTIONS section, and instead explain the
options separated by usage mode, since they only apply to one each.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-reset: reorder modes for soft-mixed-hard progression
Thomas Rast [Sun, 18 Jul 2010 18:23:22 +0000 (20:23 +0200)]
Documentation/git-reset: reorder modes for soft-mixed-hard progression

Reorder the documetation so that the soft/mixed/hard modes are in this
order.  This way they form a natural progression towards changing more
of the state.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn: write memoized data explicitly to avoid Storable bug
Sergey Vlasov [Sun, 18 Jul 2010 12:17:49 +0000 (16:17 +0400)]
git-svn: write memoized data explicitly to avoid Storable bug

Apparently using the Storable module during global destruction is
unsafe - there is a bug which can cause segmentation faults:

  http://rt.cpan.org/Public/Bug/Display.html?id=36087
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355

The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations.  Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agoMerge branch 'jc/diff-merge-base-multi'
Junio C Hamano [Fri, 16 Jul 2010 22:45:35 +0000 (15:45 -0700)]
Merge branch 'jc/diff-merge-base-multi'

* jc/diff-merge-base-multi:
  diff A...B: do not limit the syntax too narrowly

13 years agoOnly run aggregate-results over actual counts
Thomas Rast [Fri, 16 Jul 2010 09:37:44 +0000 (11:37 +0200)]
Only run aggregate-results over actual counts

The current make target 'aggregate-results' scanned all files matching
test-results/t*-*.  Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output.  Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoAdd a sample user for the svndump library
Jonathan Nieder [Thu, 15 Jul 2010 16:25:39 +0000 (18:25 +0200)]
Add a sample user for the svndump library

The svn-fe tool takes a Subversion dump file as input and produces
a fast-import stream as output.  This can be useful as a low-level
tool in building other importers, or for debugging the vcs-svn
library.

 make svn-fe
 make svn-fe.1

to test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff A...B: do not limit the syntax too narrowly
Junio C Hamano [Fri, 16 Jul 2010 19:08:24 +0000 (12:08 -0700)]
diff A...B: do not limit the syntax too narrowly

Earlier we tried to make sure that the trees we get are what A...B
syntax produced, by checking that earlier ones are all marked
uninteresting (which has to be true as they are merge bases),
there are two remaining ones that are interesting, and they are
marked as non-symmetric-left and symmetric-left respectively.

The "the last two must be interesting" condition is however wrong when one
is an ancestor of the other between A and B (i.e. fast-forward).  In such
a case, one of them is marked uninteresting.

13 years agoMerge branch 'jn/paginate-fix'
Junio C Hamano [Thu, 15 Jul 2010 19:09:14 +0000 (12:09 -0700)]
Merge branch 'jn/paginate-fix'

* jn/paginate-fix:
  git --paginate: paginate external commands again
  git --paginate: do not commit pager choice too early
  tests: local config file should be honored from subdirs of toplevel
  t7006: test pager configuration for several git commands
  t7006 (pager): introduce helper for parameterized tests

Conflicts:
t/t7006-pager.sh

13 years agoMerge branch 'wp/merge-tree-fix'
Junio C Hamano [Thu, 15 Jul 2010 19:08:41 +0000 (12:08 -0700)]
Merge branch 'wp/merge-tree-fix'

* wp/merge-tree-fix:
  merge-tree: fix where two branches share no changes
  add basic tests for merge-tree

13 years agoMerge branch 'js/merge-rr-fix'
Junio C Hamano [Thu, 15 Jul 2010 19:08:36 +0000 (12:08 -0700)]
Merge branch 'js/merge-rr-fix'

* js/merge-rr-fix:
  MERGE_RR is in .git, not .git/rr-cache

13 years agoMerge branch 'jc/diff-merge-base-multi'
Junio C Hamano [Thu, 15 Jul 2010 19:08:25 +0000 (12:08 -0700)]
Merge branch 'jc/diff-merge-base-multi'

* jc/diff-merge-base-multi:
  diff A...B: give one possible diff when there are more than one merge-base

13 years agoMerge branch 'ns/merge-recursive-uptodate'
Junio C Hamano [Thu, 15 Jul 2010 19:08:11 +0000 (12:08 -0700)]
Merge branch 'ns/merge-recursive-uptodate'

* ns/merge-recursive-uptodate:
  merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency

13 years agoMerge branch 'jn/tests'
Junio C Hamano [Thu, 15 Jul 2010 19:08:04 +0000 (12:08 -0700)]
Merge branch 'jn/tests'

* jn/tests:
  t3000 (ls-files -o): modernize style

13 years agoMerge branch 'eb/doc-log-manpage'
Junio C Hamano [Thu, 15 Jul 2010 19:07:56 +0000 (12:07 -0700)]
Merge branch 'eb/doc-log-manpage'

* eb/doc-log-manpage:
  Reorganize `git-log' man page to clarify common diff options.

13 years agoMerge branch 'jn/grep-open'
Junio C Hamano [Thu, 15 Jul 2010 19:07:18 +0000 (12:07 -0700)]
Merge branch 'jn/grep-open'

* jn/grep-open:
  grep -O: Do not pass color sequences as filenames to pager

13 years agoMerge branch 'mg/revision-doc'
Junio C Hamano [Thu, 15 Jul 2010 19:07:01 +0000 (12:07 -0700)]
Merge branch 'mg/revision-doc'

* mg/revision-doc:
  Documentation: link to gitrevisions rather than git-rev-parse
  Documentation: gitrevisions
  Documentation: split off rev doc into include file

13 years agoMerge branch 'jk/maint-status-keep-index-timestamp'
Junio C Hamano [Thu, 15 Jul 2010 19:06:55 +0000 (12:06 -0700)]
Merge branch 'jk/maint-status-keep-index-timestamp'

* jk/maint-status-keep-index-timestamp:
  do not write out index when status does not have to

13 years agoMerge branch 'jc/rebase-i-commit-msg-fix'
Junio C Hamano [Thu, 15 Jul 2010 19:06:48 +0000 (12:06 -0700)]
Merge branch 'jc/rebase-i-commit-msg-fix'

* jc/rebase-i-commit-msg-fix:
  rebase-i: do not get fooled by a log message ending with backslash
  rebase-i: style fix

13 years agoMerge branch 'ab/submodule-add-f'
Junio C Hamano [Thu, 15 Jul 2010 19:06:25 +0000 (12:06 -0700)]
Merge branch 'ab/submodule-add-f'

* ab/submodule-add-f:
  git submodule: add submodules with git add -f <path>

13 years agoMerge branch 'bc/maint-makefile-fixes'
Junio C Hamano [Thu, 15 Jul 2010 19:06:11 +0000 (12:06 -0700)]
Merge branch 'bc/maint-makefile-fixes'

* bc/maint-makefile-fixes:
  Makefile: work around ksh's failure to handle missing list argument to for loop
  Makefile: remove some unnecessary curly braces

13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 15 Jul 2010 19:04:32 +0000 (12:04 -0700)]
Merge branch 'maint'

* maint:
  Documentation: add submodule.* to the big configuration variable list
  gitmodules.5: url can be a relative path
  gitweb: fix esc_url

13 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>
13 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>
13 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>
13 years agogit --paginate: paginate external commands again
Jonathan Nieder [Wed, 14 Jul 2010 22:55:12 +0000 (17:55 -0500)]
git --paginate: paginate external commands again

73e25e7c (git --paginate: do not commit pager choice too early,
2010-06-26) failed to take some cases into account.

1b. Builtins that do not use RUN_SETUP (like git config) do
    not find GIT_DIR set correctly when the pager is launched
    from run_builtin().  So the core.pager configuration is
    not honored from subdirectories of the toplevel for them.

4a. External git commands (like git request-pull) relied on the
    early pager launch to take care of handling the -p option.
    Ever since 73e25e7c, they do not honor the -p option at all.

4b. Commands invoked through ! aliases (like ls) were also relying
    on the early pager launch.

Fix (4a) by launching the pager (if requested) before running such a
“dashed external”.  For simplicity, this still does not search for a
.git directory before running the external command; when run from a
subdirectory of the toplevel, therefore, the “[core] pager”
configuration is still not honored.

Fix (4b) by launching pager if requested before carrying out such an
alias.  Actually doing this has no effect, since the pager (if any)
would have already been launched in a failed attempt to try a
dashed external first.  The choice-of-pager-not-honored-from-
subdirectory bug still applies here, too.

(1b) is not a regression.  There is no need to fix it yet.

Noticed by Junio.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMERGE_RR is in .git, not .git/rr-cache
Jay Soffian [Wed, 14 Jul 2010 17:18:11 +0000 (13:18 -0400)]
MERGE_RR is in .git, not .git/rr-cache

0af0ac7 (Move MERGE_RR from .git/rr-cache/ into .git/) moved the
location of MERGE_RR but I found a few references to the old
location.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-tree: fix where two branches share no changes
Will Palmer [Wed, 14 Jul 2010 17:04:07 +0000 (18:04 +0100)]
merge-tree: fix where two branches share no changes

15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
introduced a regression to merge-tree to cause it to segfault when merging
files which existed in one branch, but not in the other or in the
merge-base. This was caused by referencing entry->path at a time when
entry was known to be possibly-NULL.

To correct the problem, we save the path of the entry we came in with,
as the path should be the same among all the stages no matter which
sides are involved in the merge.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoadd basic tests for merge-tree
Will Palmer [Wed, 14 Jul 2010 17:04:06 +0000 (18:04 +0100)]
add basic tests for merge-tree

merge-tree had no test cases, so here we add some very basic tests for
it, including some known-breakages.

[jc: with obvious/trivial fixups]

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoGit 1.7.2-rc3 v1.7.2-rc3
Junio C Hamano [Wed, 14 Jul 2010 16:42:24 +0000 (09:42 -0700)]
Git 1.7.2-rc3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jc/read-tree-cache-tree-fix'
Junio C Hamano [Wed, 14 Jul 2010 16:34:23 +0000 (09:34 -0700)]
Merge branch 'jc/read-tree-cache-tree-fix'

* jc/read-tree-cache-tree-fix:
  Fix "read-tree -m A B" priming the cache-tree

13 years agorerere: fix overeager gc
SZEDER Gábor [Mon, 12 Jul 2010 23:42:04 +0000 (01:42 +0200)]
rerere: fix overeager gc

'rerere gc' prunes resolutions of conflicted merges that occurred long
time ago, and when doing so it takes the creation time of the
conflicted automerge results into account.  This can cause the loss of
frequently used conflict resolutions (e.g. long-living topic branches
are merged into a regularly rebuilt integration branch (think of git's
pu)) when they become old enough to exceed 'rerere gc's threshold.

To prevent the loss of valuable merge resolutions 'rerere' will (1)
update the timestamp of the recorded conflict resolution (i.e.
'postimage') each time when encountering and resolving the same merge
conflict, and (2) take this timestamp, i.e. the time of the last usage
into account when gc'ing.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>