git
13 years agogit-remote-hg: improve sanitation of local repo urls oblomov/remote-hg/v1
Giuseppe Bilotta [Mon, 27 Sep 2010 15:41:29 +0000 (17:41 +0200)] 
git-remote-hg: improve sanitation of local repo urls

Remove an optional "/.hg" suffix, as mercurial doesn't like to operate
from the .hg directory, and make sure the path is absolute.

13 years agogit-remote-hg: no need to sanitize alias
Giuseppe Bilotta [Mon, 27 Sep 2010 15:12:04 +0000 (17:12 +0200)] 
git-remote-hg: no need to sanitize alias

13 years agogit-remote-hg: do not clip repository path
Giuseppe Bilotta [Mon, 27 Sep 2010 10:59:33 +0000 (12:59 +0200)] 
git-remote-hg: do not clip repository path

Do not arbitrarily snip the last three characters off the repository
path. It's conceptually wrong (we should only strip an optional final
.hg from local repositories) and it's in the wrong place (although a
place for path normalization is not yet contemplated in the foreign vcs
interface.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
13 years agogit-remote-hg: enable 'feature force' while exporting
Sverre Rabbelier [Tue, 14 Sep 2010 15:08:30 +0000 (11:08 -0400)] 
git-remote-hg: enable 'feature force' while exporting

13 years agorefactor
Sverre Rabbelier [Sun, 29 Aug 2010 21:49:30 +0000 (16:49 -0500)] 
refactor

13 years agoDebug makefile
Sverre Rabbelier [Fri, 26 Mar 2010 21:50:50 +0000 (22:50 +0100)] 
Debug makefile

13 years agoList refs on export
Sverre Rabbelier [Sun, 29 Aug 2010 02:10:32 +0000 (21:10 -0500)] 
List refs on export

13 years agotransport-helper: add trailing --
Sverre Rabbelier [Sun, 29 Aug 2010 01:49:01 +0000 (20:49 -0500)] 
transport-helper: add trailing --

13 years agogit-remote-hg: add tests
Sverre Rabbelier [Sun, 22 Aug 2010 06:25:06 +0000 (01:25 -0500)] 
git-remote-hg: add tests

13 years agogit-remote-hg: implement export capability
Sverre Rabbelier [Sun, 22 Aug 2010 06:24:54 +0000 (01:24 -0500)] 
git-remote-hg: implement export capability

13 years agogit-remote-hg: add hg importer
Sverre Rabbelier [Sun, 22 Aug 2010 06:24:03 +0000 (01:24 -0500)] 
git-remote-hg: add hg importer

13 years agogit-remote-hg: add basics
Sverre Rabbelier [Wed, 30 Dec 2009 02:20:34 +0000 (20:20 -0600)] 
git-remote-hg: add basics

13 years agogit-remote-hg: hook up in makefile etc
Sverre Rabbelier [Wed, 18 Nov 2009 00:52:59 +0000 (01:52 +0100)] 
git-remote-hg: hook up in makefile etc

13 years agogit_remote_helpers: add fastimport library
Sverre Rabbelier [Sun, 22 Aug 2010 06:22:14 +0000 (01:22 -0500)] 
git_remote_helpers: add fastimport library

13 years agogit-remote-testgit: fix error handling
Sverre Rabbelier [Sat, 28 Aug 2010 23:15:32 +0000 (18:15 -0500)] 
git-remote-testgit: fix error handling

13 years agogit-remote-testgit: only push for non-local repositories
Sverre Rabbelier [Thu, 19 Aug 2010 21:06:31 +0000 (16:06 -0500)] 
git-remote-testgit: only push for non-local repositories

13 years agoremote-curl: accept empty line as terminator
Sverre Rabbelier [Sun, 29 Aug 2010 02:47:49 +0000 (21:47 -0500)] 
remote-curl: accept empty line as terminator

This went unnoticed because the transport helper infrastructore did
not check the return value of the helper, nor did the helper print
anything before exiting.

CC: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
CC: Daniel Barkalow <barkalow@iabervon.org>
13 years agotransport-helper: implement marks location as capability
Sverre Rabbelier [Sat, 28 Aug 2010 22:40:14 +0000 (17:40 -0500)] 
transport-helper: implement marks location as capability

13 years agotransport-helper: Use capname for gitdir capability too
Sverre Rabbelier [Sat, 28 Aug 2010 22:03:12 +0000 (17:03 -0500)] 
transport-helper: Use capname for gitdir capability too

Also properly use capname in the refspec capability.

13 years agotransport-helper: export should disconnect too
Sverre Rabbelier [Sat, 28 Aug 2010 21:40:56 +0000 (16:40 -0500)] 
transport-helper: export should disconnect too

13 years agotransport-helper: change import semantics
Sverre Rabbelier [Sat, 28 Aug 2010 21:18:51 +0000 (16:18 -0500)] 
transport-helper: change import semantics

13 years agotransport-helper: update ref status after push with export
Sverre Rabbelier [Fri, 27 Aug 2010 00:51:29 +0000 (19:51 -0500)] 
transport-helper: update ref status after push with export

13 years agotransport-helper: use the new done feature to properly do imports
Sverre Rabbelier [Thu, 26 Aug 2010 23:55:57 +0000 (18:55 -0500)] 
transport-helper: use the new done feature to properly do imports

Previously, the helper code would disconnect the helper before
starting fast-import. This was needed because there was no way to signal
that the helper was done other than to close stdout (which it would
do after importing iff the helper noticed it had been disconnected).

Instead, request that the helper uses the 'done' command to signal
when it is done exporting, so that we can disconnect the helper at a
time of our choosing.

13 years agotransport-helper: check status code of finish_command
Sverre Rabbelier [Thu, 26 Aug 2010 23:49:30 +0000 (18:49 -0500)] 
transport-helper: check status code of finish_command

Previously the status code of all helpers were ignored, allowing
errors that occur to go unnoticed if the error text output by the
helper is not noticed.

13 years agotransport-helper: factor out push_update_refs_status
Sverre Rabbelier [Thu, 26 Aug 2010 21:19:59 +0000 (16:19 -0500)] 
transport-helper: factor out push_update_refs_status

13 years agofast-export: support done feature
Sverre Rabbelier [Sat, 28 Aug 2010 23:13:40 +0000 (18:13 -0500)] 
fast-export: support done feature

13 years agofast-import: support the 'done' command
Sverre Rabbelier [Thu, 26 Aug 2010 23:48:11 +0000 (18:48 -0500)] 
fast-import: support the 'done' command

13 years agoMerge branch 'jc/maint-follow-rename-fix' into next
Junio C Hamano [Mon, 16 Aug 2010 03:22:23 +0000 (20:22 -0700)] 
Merge branch 'jc/maint-follow-rename-fix' into next

* jc/maint-follow-rename-fix:
  log: test for regression introduced in v1.7.2-rc0~103^2~2

13 years agoMerge branch 'master' into next
Junio C Hamano [Mon, 16 Aug 2010 03:22:13 +0000 (20:22 -0700)] 
Merge branch 'master' into next

* master:
  git-svn: fix fetch with deleted tag
  git-svn: fix regex to remove "tail" from svn tags

13 years agolog: test for regression introduced in v1.7.2-rc0~103^2~2
Ævar Arnfjörð Bjarmason [Sun, 15 Aug 2010 10:16:25 +0000 (10:16 +0000)] 
log: test for regression introduced in v1.7.2-rc0~103^2~2

Add a regression test for the git log -M --follow $diff_option bug
introduced in v1.7.2-rc0~103^2~2, $diff_option being diff related
options like -p, --stat, --name-only etc.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-svn: fix fetch with deleted tag
David D. Kilzer [Sun, 15 Aug 2010 13:15:55 +0000 (06:15 -0700)] 
git-svn: fix fetch with deleted tag

Currently git-svn assumes that two tags created from the same
revision will have the same repo url, so it uses a ref to the
tag without checking that its url matches the current url.

This causes issues when fetching an svn repo where a tag was
created, deleted, and then recreated under the following
circumstances:

- Both tags were copied from the same revision.
- Both tags had the same name.
- Both tags had different repository paths.
- [Optional] Both tags have a file with the same name but
  different content.

When all four conditions are met, a checksum mismatch error
occurs because the content of two files with the same path
differs (see t/t9155--git-svn-fetch-deleted-tag.sh):

    Checksum mismatch: ChangeLog 065854....
    expected: ce771b....
         got: 9563fd....

When only the first three conditions are met, no error occurs
but the tag in git matches the first (deleted) tag instead of
the last (most recent) tag (see
t/t9156-git-svn-fetch-deleted-tag-2.sh).

The fix is to verify that the repo url for the ref matches the
current url.  If the urls do not match, then a "tail" is grown
on the tag name by appending a dash and rechecking the new ref's
repo url until either a matching repo url is found or a new tag
is created.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agogit-svn: fix regex to remove "tail" from svn tags
David D. Kilzer [Sun, 15 Aug 2010 13:15:54 +0000 (06:15 -0700)] 
git-svn: fix regex to remove "tail" from svn tags

Fix a regular expression used to remove the revision from the
end of an svn tag or branch name.  The regex did not account for
any "tail" (dashes) that may have been added to the end of the
tag name (which first appeared in v1.4.1-rc2~11).  If not fixed,
tags with names like "tags/mytag@5--@2" may be created.

Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net>
Acked-by: Eric Wong <normalperson@yhbt.net>
13 years agoMerge branch 'ab/perl-install' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:22 +0000 (14:59 -0700)] 
Merge branch 'ab/perl-install' into next

* ab/perl-install:
  perl/Makefile: Unset INSTALL_BASE when making perl.mak

13 years agoMerge branch 'jc/maint-follow-rename-fix' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:22 +0000 (14:59 -0700)] 
Merge branch 'jc/maint-follow-rename-fix' into next

* jc/maint-follow-rename-fix:
  diff --follow: do call diffcore_std() as necessary
  diff --follow: do not waste cycles while recursing

13 years agoMerge branch 'gb/split-cmdline-errmsg' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:21 +0000 (14:59 -0700)] 
Merge branch 'gb/split-cmdline-errmsg' into next

* gb/split-cmdline-errmsg:
  split_cmdline: Allow caller to access error string

13 years agoMerge branch 'en/rebase-against-rebase-fix' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:21 +0000 (14:59 -0700)] 
Merge branch 'en/rebase-against-rebase-fix' into next

* en/rebase-against-rebase-fix:
  pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
  t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

13 years agoMerge branch 'jn/maint-plug-leak' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:21 +0000 (14:59 -0700)] 
Merge branch 'jn/maint-plug-leak' into next

* jn/maint-plug-leak:
  write-tree: Avoid leak when index refers to an invalid object
  read-tree: stop leaking tree objects
  core: Stop leaking ondisk_cache_entrys

13 years agoMerge branch 'dg/local-mod-error-messages' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:20 +0000 (14:59 -0700)] 
Merge branch 'dg/local-mod-error-messages' into next

* dg/local-mod-error-messages:
  t7609: test merge and checkout error messages
  unpack_trees: group error messages by type
  merge-recursive: distinguish "removed" and "overwritten" messages
  merge-recursive: porcelain messages for checkout
  Turn unpack_trees_options.msgs into an array + enum

Conflicts:
merge-recursive.c
t/t3400-rebase.sh
t/t3404-rebase-interactive.sh

13 years agoMerge branch 'cc/revert' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:20 +0000 (14:59 -0700)] 
Merge branch 'cc/revert' into next

* cc/revert:
  t3508: add check_head_differs_from() helper function and use it
  revert: improve success message by adding abbreviated commit sha1
  revert: don't print "Finished one cherry-pick." if commit failed
  revert: refactor commit code into a new run_git_commit() function
  revert: report success when using option --strategy

13 years agoMerge branch 'tf/string-list-init' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:19 +0000 (14:59 -0700)] 
Merge branch 'tf/string-list-init' into next

* tf/string-list-init:
  string_list: Add STRING_LIST_INIT macro and make use of it.

13 years agoMerge branch 'mm/rebase-i-exec' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:19 +0000 (14:59 -0700)] 
Merge branch 'mm/rebase-i-exec' into next

* mm/rebase-i-exec:
  git-rebase--interactive.sh: use printf instead of echo to print commit message
  git-rebase--interactive.sh: rework skip_unnecessary_picks

13 years agoMerge branch 'en/d-f-conflict-fix' into next
Junio C Hamano [Sat, 14 Aug 2010 21:59:19 +0000 (14:59 -0700)] 
Merge branch 'en/d-f-conflict-fix' into next

* en/d-f-conflict-fix:
  Mark tests that use symlinks as needing SYMLINKS prerequisite

13 years agogit-rebase--interactive.sh: use printf instead of echo to print commit message
Brandon Casey [Fri, 13 Aug 2010 20:47:35 +0000 (15:47 -0500)] 
git-rebase--interactive.sh: use printf instead of echo to print commit message

Replace the echo statements that operate on $rest with printf's to restore
what was lost from 938791cd.  This avoids any mangling that XSI-conformant
echo's may introduce.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogit-rebase--interactive.sh: rework skip_unnecessary_picks
Brandon Casey [Fri, 13 Aug 2010 20:47:34 +0000 (15:47 -0500)] 
git-rebase--interactive.sh: rework skip_unnecessary_picks

Commit cd035b1c introduced the exec command to interactive rebase.  In
doing so, it modified the way that skip_unnecessary_picks iterates through
the list of rebase commands so that it avoided collapsing multiple spaces
into a single space.  This is necessary for example if the argument to the
exec command contains a path with multiple spaces in it.

The way it did this was by reading each line of rebase commands into a
single variable, and then breaking the individual components out using
echo, sed, and cut.  It used the individual broken-out components for
decision making, and was still able to write the original line to the
output file from the variable it had saved it in.  But, since we only
really need to look at anything other than the first element of the line
when a 'pick' command is encountered, and even that is only necessary when
we are still searching for "unnecessary" picks, and since newer rebase
commands like 'exec' may not even require a sha1 field, let's make our read
statement parse its input into a "command" variable, and a "rest" variable,
and then only break out the sha1 from $rest, and call git-rev-parse, when
absolutely necessary.

I think this future proofs this subroutine, avoids calling git-rev-parse
unnecessarily, and possibly with bogus arguments, and still accomplishes
the goal of not mangling the $rest of the rebase command.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff --follow: do call diffcore_std() as necessary
Junio C Hamano [Fri, 13 Aug 2010 19:17:45 +0000 (12:17 -0700)] 
diff --follow: do call diffcore_std() as necessary

Usually, diff frontends populate the output queue with filepairs without
any rename information and call diffcore_std() to sort the renames out.
When --follow is in effect, however, diff-tree family of frontend has a
hack that looks like this:

    diff-tree frontend
    -> diff_tree_sha1()
       . populate diff_queued_diff
       . if --follow is in effect and there is only one change that
         creates the target path, then
       -> try_to_follow_renames()
  -> diff_tree_sha1() with no pathspec but with -C
  -> diffcore_std() to find renames
  . if rename is found, tweak diff_queued_diff and put a
    single filepair that records the found rename there
    -> diffcore_std()
       . tweak elements on diff_queued_diff by
       - rename detection
       - path ordering
       - pickaxe filtering

We need to skip parts of the second call to diffcore_std() that is related
to rename detection, and do so only when try_to_follow_renames() did find
a rename.  Earlier 1da6175 (Make diffcore_std only can run once before a
diff_flush, 2010-05-06) tried to deal with this issue incorrectly; it
unconditionally disabled any second call to diffcore_std().

This hopefully fixes the breakage.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agodiff --follow: do not waste cycles while recursing
Junio C Hamano [Fri, 13 Aug 2010 17:36:01 +0000 (10:36 -0700)] 
diff --follow: do not waste cycles while recursing

The "--follow" logic is called from diff_tree_sha1() function, but the
input trees to diff_tree_sha1() are not necessarily the top-level trees
(compare_tree_entry() calls it while it recursively descends into
subtrees).  When a newly created path lives in somewhere deep in the
source hierarchy, e.g. "platform/", but the rename source is in a totally
different place in the destination hierarchy, e.g. "lang-api/src/com/...",
running "try_to_find_renames()" while base is set to "platform/" is a
wasted call.

We only need to run the rename following at the very top level.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoperl/Makefile: Unset INSTALL_BASE when making perl.mak
Ævar Arnfjörð Bjarmason [Tue, 3 Aug 2010 10:30:11 +0000 (10:30 +0000)] 
perl/Makefile: Unset INSTALL_BASE when making perl.mak

PREFIX and INSTALL_BASE are mutually exclusive. If both are supplied
by INSTALL_BASE being set in PERL_MM_OPT ExtUtils::MakeMaker will
produce an error:

    $ echo $PERL_MM_OPT
    INSTALL_BASE=/home/avar/perl5
    $ make -C perl  PERL_PATH='/usr/bin/perl' prefix='/home/avar' perl.mak
    make: Entering directory `/home/avar/g/git/perl'
    /usr/bin/perl Makefile.PL PREFIX='/home/avar'
    Only one of PREFIX or INSTALL_BASE can be given.  Not both.
    make: *** [perl.mak] Error 255
    make: Leaving directory `/home/avar/g/git/perl'

Change the perl Makefile to work around this by explicitly unsetting
INSTALL_BASE.

INSTALL_BASE is set in PERL_MM_OPT by e.g. the popular local::lib
package, from its documentation:

    eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib 2>/dev/null)

Many other environments might also have set PERL_MM_OPT before
building Git. This change enables us to build in these environments.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMark tests that use symlinks as needing SYMLINKS prerequisite
Elijah Newren [Fri, 13 Aug 2010 02:09:12 +0000 (20:09 -0600)] 
Mark tests that use symlinks as needing SYMLINKS prerequisite

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agopull --rebase: Avoid spurious conflicts and reapplying unnecessary patches
Elijah Newren [Fri, 13 Aug 2010 01:50:50 +0000 (19:50 -0600)] 
pull --rebase: Avoid spurious conflicts and reapplying unnecessary patches

Prior to c85c792 (pull --rebase: be cleverer with rebased upstream
branches, 2008-01-26), pull --rebase would run

  git rebase $merge_head

which resulted in a call to

  git format-patch ... --ignore-if-in-upstream $merge_head..$cur_branch

This resulted in patches from $merge_head..$cur_branch being applied, as
long as they did not already exist in $cur_branch..$merge_head.

Unfortunately, when upstream is rebased, $merge_head..$cur_branch also
refers to "old" commits that have already been rebased upstream, meaning
that many patches that were already fixed upstream would be reapplied.
This could result in many spurious conflicts, as well as reintroduce
patches that were intentionally dropped upstream.

So the algorithm was changed in c85c792 (pull --rebase: be cleverer with
rebased upstream branches, 2008-01-26) and d44e712 (pull: support rebased
upstream + fetch + pull --rebase, 2009-07-19).  Defining $old_remote_ref to
be the most recent entry in the reflog for @{upstream} that is an ancestor
of $cur_branch, pull --rebase was changed to run

  git rebase --onto $merge_head $old_remote_ref

which results in a call to

  git format-patch ... --ignore-if-in-upstream $old_remote_ref..$cur_branch

The whole point of this change was to reduce the number of commits being
reapplied, by avoiding commits that upstream already has or had.

In the rebased upstream case, this change achieved that purpose.  It is
worth noting, though, that since $old_remote_ref is always an ancestor of
$cur_branch (by its definition), format-patch will not know what upstream
is and thus will not be able to determine if any patches are already
upstream; they will all be reapplied.

In the non-rebased upstream case, this new form is usually the same as the
original code but in some cases $old_remote_ref can be an ancestor of

   $(git merge-base $merge_head $cur_branch)

meaning that instead of avoiding reapplying commits that upstream already
has, it actually includes more such commits.  Combined with the fact that
format-patch can no longer detect commits that are already upstream (since
it is no longer told what upstream is), results in lots of confusion for
users (e.g. "git is giving me lots of conflicts in stuff I didn't even
change since my last push.")

Cases where additional commits could be reapplied include forking from a
commit other than the tracking branch, or amending/rebasing after pushing.
Cases where the inability to detect upstreamed commits cause problems
include independent discovery of a fix and having your patches get
upstreamed by some alternative route (e.g. pulling your changes to a third
machine, pushing from there, and then going back to your original machine
and trying to pull --rebase).

Fix the non-rebased upstream case by ignoring $old_remote_ref whenever it
is contained in $(git merge-base $merge_head $cur_branch).  This should
have no affect on the rebased upstream case.

Acked-by: Santi Béjar <santi@agolina.net>
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot5520-pull: Add testcases showing spurious conflicts from git pull --rebase
Elijah Newren [Fri, 13 Aug 2010 01:50:49 +0000 (19:50 -0600)] 
t5520-pull: Add testcases showing spurious conflicts from git pull --rebase

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jl/submodule-ignore-diff' into next
Junio C Hamano [Fri, 13 Aug 2010 01:55:31 +0000 (18:55 -0700)] 
Merge branch 'jl/submodule-ignore-diff' into next

* jl/submodule-ignore-diff:
  Add tests for the diff.ignoreSubmodules config option
  Add the 'diff.ignoreSubmodules' config setting
  Submodules: Use "ignore" settings from .gitmodules too for diff and status
  Submodules: Add the new "ignore" config option for diff and status

Conflicts:
diff.c
submodule.c

13 years agoMerge branch 'mm/rebase-i-exec' into next
Junio C Hamano [Fri, 13 Aug 2010 01:44:56 +0000 (18:44 -0700)] 
Merge branch 'mm/rebase-i-exec' into next

* mm/rebase-i-exec:
  test-lib: user-friendly alternatives to test [-d|-f|-e]
  rebase -i: add exec command to launch a shell command

Conflicts:
git-rebase--interactive.sh

13 years agoMerge branch 'so/http-user-agent' into next
Junio C Hamano [Fri, 13 Aug 2010 01:39:00 +0000 (18:39 -0700)] 
Merge branch 'so/http-user-agent' into next

* so/http-user-agent:
  Allow HTTP user agent string to be modified.

13 years agoMerge branch 'sr/local-config' into next
Junio C Hamano [Fri, 13 Aug 2010 01:38:44 +0000 (18:38 -0700)] 
Merge branch 'sr/local-config' into next

* sr/local-config:
  config: add --local option

13 years agoMerge branch 'cc/find-commit-subject' into next
Junio C Hamano [Fri, 13 Aug 2010 01:38:21 +0000 (18:38 -0700)] 
Merge branch 'cc/find-commit-subject' into next

* cc/find-commit-subject:
  blame: use find_commit_subject() instead of custom code
  merge-recursive: use find_commit_subject() instead of custom code
  bisect: use find_commit_subject() instead of custom code
  revert: rename variables related to subject in get_message()
  revert: refactor code to find commit subject in find_commit_subject()
  revert: fix off by one read when searching the end of a commit subject

13 years agoMerge branch 'jh/clean-exclude' into next
Junio C Hamano [Fri, 13 Aug 2010 01:37:37 +0000 (18:37 -0700)] 
Merge branch 'jh/clean-exclude' into next

* jh/clean-exclude:
  Add test for git clean -e.
  Add -e/--exclude to git-clean.

13 years agoMerge branch 'jh/use-test-must-fail' into next
Junio C Hamano [Fri, 13 Aug 2010 01:37:20 +0000 (18:37 -0700)] 
Merge branch 'jh/use-test-must-fail' into next

* jh/use-test-must-fail:
  Convert "! git" to "test_must_fail git"

13 years agoMerge branch 'jn/fix-abbrev' into next
Junio C Hamano [Fri, 13 Aug 2010 01:36:52 +0000 (18:36 -0700)] 
Merge branch 'jn/fix-abbrev' into next

* jn/fix-abbrev:
  examples/commit: use --abbrev for commit summary
  checkout, commit: remove confusing assignments to rev.abbrev
  archive: abbreviate substituted commit ids again

13 years agoMerge branch 'jn/rebase-rename-am' into next
Junio C Hamano [Fri, 13 Aug 2010 01:36:39 +0000 (18:36 -0700)] 
Merge branch 'jn/rebase-rename-am' into next

* jn/rebase-rename-am:
  rebase: protect against diff.renames configuration
  t3400 (rebase): whitespace cleanup
  Teach "apply --index-info" to handle rename patches
  t4150 (am): futureproof against failing tests
  t4150 (am): style fix

13 years agoMerge branch 'ml/rebase-x-strategy' into next
Junio C Hamano [Fri, 13 Aug 2010 01:36:28 +0000 (18:36 -0700)] 
Merge branch 'ml/rebase-x-strategy' into next

* ml/rebase-x-strategy:
  rebase: support -X to pass through strategy options

13 years agoMerge branch 'mm/shortopt-detached' into next
Junio C Hamano [Fri, 13 Aug 2010 01:36:21 +0000 (18:36 -0700)] 
Merge branch 'mm/shortopt-detached' into next

* mm/shortopt-detached:
  log: parse separate option for --glob
  log: parse separate options like git log --grep foo
  diff: parse separate options --stat-width n, --stat-name-width n
  diff: split off a function for --stat-* option parsing
  diff: parse separate options like -S foo

Conflicts:
revision.c

13 years agoMerge branch 'nd/fix-sparse-checkout' into next
Junio C Hamano [Fri, 13 Aug 2010 01:35:19 +0000 (18:35 -0700)] 
Merge branch 'nd/fix-sparse-checkout' into next

* nd/fix-sparse-checkout:
  unpack-trees: mark new entries skip-worktree appropriately
  unpack-trees: do not check for conflict entries too early
  unpack-trees: let read-tree -u remove index entries outside sparse area
  unpack-trees: only clear CE_UPDATE|CE_REMOVE when skip-worktree is always set
  t1011 (sparse checkout): style nitpicks

13 years agoMerge branch 'vs/doc-spell' into next
Junio C Hamano [Fri, 13 Aug 2010 01:34:24 +0000 (18:34 -0700)] 
Merge branch 'vs/doc-spell' into next

* vs/doc-spell:
  Documentation: spelling fixes

13 years agoMerge branch 'ab/report-corrupt-object-with-type' into next
Junio C Hamano [Fri, 13 Aug 2010 01:34:18 +0000 (18:34 -0700)] 
Merge branch 'ab/report-corrupt-object-with-type' into next

* ab/report-corrupt-object-with-type:
  sha1_file: Show the the type and path to corrupt objects

13 years agoMerge branch 'kf/post-receive-sample-hook' into next
Junio C Hamano [Fri, 13 Aug 2010 01:34:05 +0000 (18:34 -0700)] 
Merge branch 'kf/post-receive-sample-hook' into next

* kf/post-receive-sample-hook:
  post-receive-email: optional message line count limit

13 years agoMerge branch 'master' into next
Junio C Hamano [Fri, 13 Aug 2010 01:33:37 +0000 (18:33 -0700)] 
Merge branch 'master' into next

* master:
  push: mention "git pull" in error message for non-fast forwards
  Standardize do { ... } while (0) style
  t/t7003: replace \t with literal tab in sed expression
  index-pack: Don't follow replace refs.

13 years agoMerge branch 'jc/sha1-name-find-fix'
Junio C Hamano [Fri, 13 Aug 2010 01:32:49 +0000 (18:32 -0700)] 
Merge branch 'jc/sha1-name-find-fix'

* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
sha1_name.c

13 years agoMerge branch 'jn/doc-pull'
Junio C Hamano [Fri, 13 Aug 2010 01:32:37 +0000 (18:32 -0700)] 
Merge branch 'jn/doc-pull'

* jn/doc-pull:
  Documentation: flesh out “git pull” description

13 years agoMerge branch 'jn/maint-gitweb-dynconf'
Junio C Hamano [Fri, 13 Aug 2010 01:32:31 +0000 (18:32 -0700)] 
Merge branch 'jn/maint-gitweb-dynconf'

* jn/maint-gitweb-dynconf:
  gitweb: allow configurations that change with each request

13 years agoMerge branch 'bc/use-more-hardlinks-in-install'
Junio C Hamano [Fri, 13 Aug 2010 01:32:20 +0000 (18:32 -0700)] 
Merge branch 'bc/use-more-hardlinks-in-install'

* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too

13 years agoMerge branch 'tr/rfc-reset-doc'
Junio C Hamano [Fri, 13 Aug 2010 01:31:43 +0000 (18:31 -0700)] 
Merge branch 'tr/rfc-reset-doc'

* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression

13 years agoMerge branch 'jn/parse-date-basic'
Junio C Hamano [Fri, 13 Aug 2010 01:31:03 +0000 (18:31 -0700)] 
Merge branch 'jn/parse-date-basic'

* jn/parse-date-basic:
  Export parse_date_basic() to convert a date string to timestamp

13 years agoMerge branch 'sp/fix-smart-http-deadlock-on-error'
Junio C Hamano [Fri, 13 Aug 2010 01:27:01 +0000 (18:27 -0700)] 
Merge branch 'sp/fix-smart-http-deadlock-on-error'

* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure

13 years agoMerge branch 'maint'
Junio C Hamano [Fri, 13 Aug 2010 01:07:09 +0000 (18:07 -0700)] 
Merge branch 'maint'

* maint:
  push: mention "git pull" in error message for non-fast forwards
  Standardize do { ... } while (0) style
  t/t7003: replace \t with literal tab in sed expression
  index-pack: Don't follow replace refs.

13 years agopush: mention "git pull" in error message for non-fast forwards
Matthieu Moy [Mon, 2 Aug 2010 13:42:44 +0000 (15:42 +0200)] 
push: mention "git pull" in error message for non-fast forwards

The message remains fuzzy to include "git pull", "git pull --rebase" and
others, but directs the user to the simplest solution in the vast
majority of cases.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoStandardize do { ... } while (0) style
Jonathan Nieder [Thu, 12 Aug 2010 22:11:15 +0000 (17:11 -0500)] 
Standardize do { ... } while (0) style

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t7003: replace \t with literal tab in sed expression
Brandon Casey [Thu, 12 Aug 2010 20:55:54 +0000 (15:55 -0500)] 
t/t7003: replace \t with literal tab in sed expression

The sed utilities on IRIX and Solaris do not interpret the sequence '\t'
to mean a tab character;  they read a literal character 't'.  So, use a
literal tab instead.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoindex-pack: Don't follow replace refs.
Nelson Elhage [Thu, 12 Aug 2010 14:18:12 +0000 (10:18 -0400)] 
index-pack: Don't follow replace refs.

Without this, attempting to index a pack containing objects that have been
replaced results in a fatal error that looks like:

fatal: SHA1 COLLISION FOUND WITH <replaced-object> !

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Acked-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/parse-date-basic' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:33 +0000 (14:22 -0700)] 
Merge branch 'jn/parse-date-basic' into next

* jn/parse-date-basic:
  Export parse_date_basic() to convert a date string to timestamp

13 years agoMerge branch 'tr/rfc-reset-doc' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:32 +0000 (14:22 -0700)] 
Merge branch 'tr/rfc-reset-doc' into next

* tr/rfc-reset-doc:
  Documentation/reset: move "undo permanently" example behind "make topic"
  Documentation/reset: reorder examples to match description
  Documentation/reset: promote 'examples' one section up
  Documentation/reset: separate options by mode
  Documentation/git-reset: reorder modes for soft-mixed-hard progression

13 years agoMerge branch 'jh/graph-next-line' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:32 +0000 (14:22 -0700)] 
Merge branch 'jh/graph-next-line' into next

* jh/graph-next-line:
  Enable custom schemes for column colors in the graph API
  Make graph_next_line() available in the graph.h API

13 years agoMerge branch 'ar/string-list-foreach' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:31 +0000 (14:22 -0700)] 
Merge branch 'ar/string-list-foreach' into next

* ar/string-list-foreach:
  Convert the users of for_each_string_list to for_each_string_list_item macro
  Add a for_each_string_list_item macro

13 years agoMerge branch 'hv/submodule-find-ff-merge' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:31 +0000 (14:22 -0700)] 
Merge branch 'hv/submodule-find-ff-merge' into next

* hv/submodule-find-ff-merge:
  Implement automatic fast-forward merge for submodules
  setup_revisions(): Allow walking history in a submodule
  Teach ref iteration module about submodules

13 years agoMerge branch 'jn/fast-import-subtree' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:31 +0000 (14:22 -0700)] 
Merge branch 'jn/fast-import-subtree' into next

* jn/fast-import-subtree:
  Teach fast-import to import subtrees named by tree id

13 years agoMerge branch 'tc/checkout-B' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:31 +0000 (14:22 -0700)] 
Merge branch 'tc/checkout-B' into next

* tc/checkout-B:
  builtin/checkout: handle -B from detached HEAD correctly
  builtin/checkout: learn -B
  builtin/checkout: reword hint for -b
  add tests for checkout -b

13 years agoMerge branch 'tr/xsize-bits' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:29 +0000 (14:22 -0700)] 
Merge branch 'tr/xsize-bits' into next

* tr/xsize-bits:
  xsize_t: check whether we lose bits

13 years agoMerge branch 'sp/fix-smart-http-deadlock-on-error' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:29 +0000 (14:22 -0700)] 
Merge branch 'sp/fix-smart-http-deadlock-on-error' into next

* sp/fix-smart-http-deadlock-on-error:
  smart-http: Don't deadlock on server failure

13 years agoMerge branch 'bc/use-more-hardlinks-in-install' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:28 +0000 (14:22 -0700)] 
Merge branch 'bc/use-more-hardlinks-in-install' into next

* bc/use-more-hardlinks-in-install:
  Makefile: make hard/symbolic links for non-builtins too
  Makefile: link builtins residing in bin directory to main git binary too

13 years agoMerge branch 'jn/maint-gitweb-dynconf' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:28 +0000 (14:22 -0700)] 
Merge branch 'jn/maint-gitweb-dynconf' into next

* jn/maint-gitweb-dynconf:
  gitweb: allow configurations that change with each request

13 years agoMerge branch 'jn/doc-pull' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:28 +0000 (14:22 -0700)] 
Merge branch 'jn/doc-pull' into next

* jn/doc-pull:
  Documentation: flesh out “git pull” description

13 years agoMerge branch 'jc/sha1-name-find-fix' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:28 +0000 (14:22 -0700)] 
Merge branch 'jc/sha1-name-find-fix' into next

* jc/sha1-name-find-fix:
  sha1_name.c: fix parsing of ":/token" syntax

Conflicts:
sha1_name.c

13 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 11 Aug 2010 21:22:07 +0000 (14:22 -0700)] 
Merge branch 'master' into next

* master:
  post-receive-email: remove spurious commas in email subject
  fast-import: export correctly marks larger than 2^20-1
  t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
  diff: strip extra "/" when stripping prefix

13 years agoAllow HTTP user agent string to be modified.
Spencer E. Olson [Wed, 11 Aug 2010 20:40:38 +0000 (14:40 -0600)] 
Allow HTTP user agent string to be modified.

Some firewalls restrict HTTP connections based on the clients user agent.  This
commit provides the user the ability to modify the user agent string via either
a new config option (http.useragent) or by an environment variable
(GIT_HTTP_USER_AGENT).

Relevant documentation is added to Documentation/config.txt.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 11 Aug 2010 18:32:00 +0000 (11:32 -0700)] 
Merge branch 'maint'

* maint:
  post-receive-email: remove spurious commas in email subject
  fast-import: export correctly marks larger than 2^20-1
  t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
  diff: strip extra "/" when stripping prefix

13 years agopost-receive-email: remove spurious commas in email subject
Matthieu Moy [Wed, 11 Aug 2010 08:14:13 +0000 (10:14 +0200)] 
post-receive-email: remove spurious commas in email subject

The previous form produced subjects like

  [SCM] project.git branch, foo, updated. ...

The new one will produce the lighter

  [SCM] project.git branch foo updated. ...

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agofast-import: export correctly marks larger than 2^20-1
Raja R Harinath [Tue, 13 Jul 2010 11:51:48 +0000 (17:21 +0530)] 
fast-import: export correctly marks larger than 2^20-1

dump_marks_helper() has a bug when dumping marks larger than 2^20-1,
i.e., when the sparse array has more than two levels.  The bug was
that the 'base' counter was being shifted by 20 bits at level 3, and
then again by 10 bits at level 2, rather than a total shift of 20 bits
in this argument to the recursive call:

  (base + k) << m->shift

There are two ways to fix this correctly, the elegant:

  (base + k) << 10

and the one I chose due to edit distance:

  base + (k << m->shift)

Signed-off-by: Raja R Harinath <harinath@hurrynot.org>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH
Ævar Arnfjörð Bjarmason [Tue, 10 Aug 2010 12:14:25 +0000 (12:14 +0000)] 
t/lib-git-svn.sh: use $PERL_PATH for perl, not perl from $PATH

Change the git-svn tests to use $PERL_PATH, not the "perl" in $PATH.

Using perl in $PATH was added by Sam Vilain in v1.6.6-rc0~95^2~3,
Philippe Bruhat introduced $PERL_PATH to the test suite in
v1.6.6-rc0~9^2, but the lib-git-svn.sh tests weren't updated to use
the new convention.

This resulted in the git-svn tests always being skipped on my
system. My /usr/bin/perl has access to SVN::Core and SVN::Repos, but
the perl in my $PATH does not.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot7609: test merge and checkout error messages
Diane Gasselin [Wed, 11 Aug 2010 08:38:08 +0000 (10:38 +0200)] 
t7609: test merge and checkout error messages

Test porcelain and plumbing error messages for different types of errors
of merge and checkout.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agounpack_trees: group error messages by type
Matthieu Moy [Wed, 11 Aug 2010 08:38:07 +0000 (10:38 +0200)] 
unpack_trees: group error messages by type

When an error is encountered, it calls add_rejected_file() which either
- directly displays the error message and stops if in plumbing mode
  (i.e. if show_all_errors is not initialized at 1)
- or stores it so that it will be displayed at the end with display_error_msgs(),

Storing the files by error type permits to have a list of files for
which there is the same error instead of having a serie of almost
identical errors.

As each bind_overlap error combines a file and an old file, a list cannot be
done, therefore, theses errors are not stored but directly displayed.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agomerge-recursive: distinguish "removed" and "overwritten" messages
Matthieu Moy [Wed, 11 Aug 2010 08:38:06 +0000 (10:38 +0200)] 
merge-recursive: distinguish "removed" and "overwritten" messages

To limit the number of possible error messages, the error messages for
the case would_lose_untracked_file and would_lose_orphaned in
unpack_trees_options.msgs were handled with a single string,
parameterized by an action string ("overwritten" or "removed").

Instead, we consider them as two different cases, with unparameterized
string. This will make it easier to make separate lists sorted by error
types later.

Only the bind_overlap case still takes two %s parameters, but that's
unavoidable.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>