Code

git.git
13 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 19 Jan 2011 16:34:19 +0000 (08:34 -0800)]
Merge branch 'master' into next

* master:
  exec_cmd: remove unused extern
  Documentation/fast-import: put explanation of M 040000 <dataref> "" in context
  svndump.c: Fix a printf format compiler warning

13 years agoMerge branch 'maint'
Junio C Hamano [Wed, 19 Jan 2011 16:33:54 +0000 (08:33 -0800)]
Merge branch 'maint'

* maint:
  exec_cmd: remove unused extern

13 years agoexec_cmd: remove unused extern
Erik Faye-Lund [Mon, 10 Jan 2011 22:00:49 +0000 (23:00 +0100)]
exec_cmd: remove unused extern

This definition was added by commit 77cb17e9, but it's left unused since
commit 511707d. Remove the left-over definition.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-no-logo' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:47 +0000 (08:26 -0800)]
Merge branch 'jn/gitweb-no-logo' into maint

* jn/gitweb-no-logo:
  gitweb: make logo optional

13 years agoMerge branch 'jk/diff-driver-binary-doc' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:44 +0000 (08:26 -0800)]
Merge branch 'jk/diff-driver-binary-doc' into maint

* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option

13 years agoMerge branch 'tr/submodule-relative-scp-url' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:41 +0000 (08:26 -0800)]
Merge branch 'tr/submodule-relative-scp-url' into maint

* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin

13 years agoMerge branch 'rj/maint-difftool-cygwin-workaround' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:24 +0000 (08:26 -0800)]
Merge branch 'rj/maint-difftool-cygwin-workaround' into maint

* rj/maint-difftool-cygwin-workaround:
  difftool: Fix failure on Cygwin

13 years agoMerge branch 'rj/maint-test-fixes' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:17 +0000 (08:26 -0800)]
Merge branch 'rj/maint-test-fixes' into maint

* rj/maint-test-fixes:
  t9501-*.sh: Fix a test failure on Cygwin
  lib-git-svn.sh: Add check for mis-configured web server variables
  lib-git-svn.sh: Avoid setting web server variables unnecessarily
  t9142: Move call to start_httpd into the setup test
  t3600-rm.sh: Don't pass a non-existent prereq to test #15

13 years agoMerge branch 'jn/maint-gitweb-pathinfo-fix' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:26:04 +0000 (08:26 -0800)]
Merge branch 'jn/maint-gitweb-pathinfo-fix' into maint

* jn/maint-gitweb-pathinfo-fix:
  gitweb: Fix handling of whitespace in generated links

13 years agoMerge branch 'ak/describe-exact' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:52 +0000 (08:25 -0800)]
Merge branch 'ak/describe-exact' into maint

* ak/describe-exact:
  describe: Delay looking up commits until searching for an inexact match
  describe: Store commit_names in a hash table by commit SHA1
  describe: Do not use a flex array in struct commit_name
  describe: Use for_each_rawref

13 years agoMerge branch 'jn/maint-fast-import-object-reuse' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:46 +0000 (08:25 -0800)]
Merge branch 'jn/maint-fast-import-object-reuse' into maint

* jn/maint-fast-import-object-reuse:
  fast-import: insert new object entries at start of hash bucket

13 years agoMerge branch 'jn/submodule-b-current' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:41 +0000 (08:25 -0800)]
Merge branch 'jn/submodule-b-current' into maint

* jn/submodule-b-current:
  git submodule: Remove now obsolete tests before cloning a repo
  git submodule -b ... of current HEAD fails

13 years agoMerge branch 'jc/maint-svn-info-test-fix' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:38 +0000 (08:25 -0800)]
Merge branch 'jc/maint-svn-info-test-fix' into maint

* jc/maint-svn-info-test-fix:
  t9119: do not compare "Text Last Updated" line from "svn info"

13 years agoMerge branch 'nd/maint-relative' into maint
Junio C Hamano [Wed, 19 Jan 2011 16:25:31 +0000 (08:25 -0800)]
Merge branch 'nd/maint-relative' into maint

* nd/maint-relative:
  get_cwd_relative(): do not misinterpret root path

13 years agoDocumentation/fast-import: put explanation of M 040000 <dataref> "" in context
Jonathan Nieder [Sun, 16 Jan 2011 02:22:35 +0000 (20:22 -0600)]
Documentation/fast-import: put explanation of M 040000 <dataref> "" in context

Omit needless words ("Additionally ... <path> may also" is redundant).
While at it, place the explanation of this special case after the
general rules for paths to provide the reader with some context.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosvndump.c: Fix a printf format compiler warning
Ramsay Jones [Tue, 11 Jan 2011 18:17:21 +0000 (18:17 +0000)]
svndump.c: Fix a printf format compiler warning

In particular, on systems that define uint32_t as an unsigned long,
gcc complains as follows:

        CC vcs-svn/svndump.o
    vcs-svn/svndump.c: In function `svndump_read':
    vcs-svn/svndump.c:215: warning: int format, uint32_t arg (arg 2)

In order to suppress the warning we use the C99 format specifier
macro PRIu32 from <inttypes.h>.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'as/userdiff-pascal' into next
Junio C Hamano [Tue, 18 Jan 2011 18:57:17 +0000 (10:57 -0800)]
Merge branch 'as/userdiff-pascal' into next

* as/userdiff-pascal:
  userdiff: match Pascal class methods

13 years agoMerge branch 'master' into next
Junio C Hamano [Tue, 18 Jan 2011 18:24:40 +0000 (10:24 -0800)]
Merge branch 'master' into next

* master:
  remote-ext: do not segfault for blank lines
  Documentation/fast-import: capitalize beginning of sentence
  ll-merge: simplify opts == NULL case

13 years agoremote-ext: do not segfault for blank lines
Jonathan Nieder [Sun, 16 Jan 2011 03:49:40 +0000 (21:49 -0600)]
remote-ext: do not segfault for blank lines

Instead of stripping space characters past the beginning of the
line and overflowing a buffer, stop at the beginning of the line
(mimicking the corresponding fix in remote-fd).

The argument to isspace does not need to be cast explicitly because
git isspace takes care of that already.

Noticed-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 agoDocumentation/fast-import: capitalize beginning of sentence
Jonathan Nieder [Sun, 16 Jan 2011 02:16:05 +0000 (20:16 -0600)]
Documentation/fast-import: capitalize beginning of sentence

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoll-merge: simplify opts == NULL case
Jonathan Nieder [Sun, 16 Jan 2011 01:08:42 +0000 (19:08 -0600)]
ll-merge: simplify opts == NULL case

As long as sizeof(struct ll_merge_options) is small, there is not
much reason not to keep a copy of the default merge options in the BSS
section.  In return, we get clearer code and one less stack frame in
the opts == NULL case.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix mismerge at 37ef456
Junio C Hamano [Thu, 13 Jan 2011 19:56:16 +0000 (11:56 -0800)]
Fix mismerge at 37ef456

Two tests have been lost and I do not know why...

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Thu, 13 Jan 2011 20:14:39 +0000 (12:14 -0800)]
Merge branch 'master' into next

* master:
  Git 1.7.4-rc2
  RelNotes/1.7.4: minor fixes
  t0000: quote TAP snippets in test code

13 years agoGit 1.7.4-rc2 v1.7.4-rc2
Junio C Hamano [Thu, 13 Jan 2011 19:42:01 +0000 (11:42 -0800)]
Git 1.7.4-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-no-logo'
Junio C Hamano [Thu, 13 Jan 2011 19:39:18 +0000 (11:39 -0800)]
Merge branch 'jn/gitweb-no-logo'

* jn/gitweb-no-logo:
  gitweb: make logo optional

13 years agoMerge branch 'jn/perl-funcname'
Junio C Hamano [Thu, 13 Jan 2011 19:38:05 +0000 (11:38 -0800)]
Merge branch 'jn/perl-funcname'

* jn/perl-funcname:
  userdiff/perl: catch BEGIN/END/... and POD as headers
  diff: funcname and word patterns for perl

13 years agoMerge branch 'sr/gitweb-hilite-more'
Junio C Hamano [Thu, 13 Jan 2011 19:36:12 +0000 (11:36 -0800)]
Merge branch 'sr/gitweb-hilite-more'

* sr/gitweb-hilite-more:
  gitweb: remove unnecessary test when closing file descriptor
  gitweb: add extensions to highlight feature map

13 years agoMerge branch 'rj/svn-test'
Junio C Hamano [Thu, 13 Jan 2011 19:36:05 +0000 (11:36 -0800)]
Merge branch 'rj/svn-test'

* rj/svn-test:
  lib-git-svn.sh: Move web-server handling code into separate function

13 years agoMerge branch 'rj/test-fixes'
Junio C Hamano [Thu, 13 Jan 2011 19:35:28 +0000 (11:35 -0800)]
Merge branch 'rj/test-fixes'

* rj/test-fixes:
  t4135-*.sh: Skip the "backslash" tests on cygwin
  t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
  t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
  t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

Conflicts:
t/t3032-merge-recursive-options.sh

13 years agoMerge branch 'jk/diff-driver-binary-doc'
Junio C Hamano [Thu, 13 Jan 2011 19:34:56 +0000 (11:34 -0800)]
Merge branch 'jk/diff-driver-binary-doc'

* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option

13 years agoMerge branch 'jn/t9010-work-around-broken-svnadmin'
Junio C Hamano [Thu, 13 Jan 2011 19:34:52 +0000 (11:34 -0800)]
Merge branch 'jn/t9010-work-around-broken-svnadmin'

* jn/t9010-work-around-broken-svnadmin:
  t9010: svnadmin can fail even if available

13 years agoMerge branch 'tr/submodule-relative-scp-url'
Junio C Hamano [Thu, 13 Jan 2011 19:34:39 +0000 (11:34 -0800)]
Merge branch 'tr/submodule-relative-scp-url'

* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin

13 years agoRelNotes/1.7.4: minor fixes
Michael J Gruber [Thu, 13 Jan 2011 09:35:34 +0000 (10:35 +0100)]
RelNotes/1.7.4: minor fixes

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0000: quote TAP snippets in test code
Thomas Rast [Thu, 13 Jan 2011 11:30:23 +0000 (12:30 +0100)]
t0000: quote TAP snippets in test code

t0000 contains two snippets of actual test output.  This causes
problems when passing -v to the test[*]: the test infrastructure
echoes the tests before running them, and the TAP parser then sees
this test output and concludes that two tests failed and that the TAP
output was badly formatted.

Guard against this by quoting the output in the source.

[*] either by running 'make smoke' with GIT_TEST_OPTS=-v, or with
prove ./t0000-basic.sh :: -v

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Thu, 13 Jan 2011 05:28:16 +0000 (21:28 -0800)]
Merge branch 'master' into next

* master:
  commit: suggest --amend --reset-author to fix commiter identity

13 years agoMerge branch 'maint'
Junio C Hamano [Thu, 13 Jan 2011 05:26:51 +0000 (21:26 -0800)]
Merge branch 'maint'

* maint:
  commit: suggest --amend --reset-author to fix commiter identity

13 years agocommit: suggest --amend --reset-author to fix commiter identity
Matthieu Moy [Wed, 12 Jan 2011 18:29:14 +0000 (19:29 +0100)]
commit: suggest --amend --reset-author to fix commiter identity

Since the message advises to fix the configuration first, the
advantage of using this command is that it is cut-and-paste ready,
while using --author='...' requires the user to type his name and
email again.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'uk/checkout-ambiguous-ref' into next
Junio C Hamano [Tue, 11 Jan 2011 21:17:36 +0000 (13:17 -0800)]
Merge branch 'uk/checkout-ambiguous-ref' into next

* uk/checkout-ambiguous-ref:
  checkout: fix bug with ambiguous refs

13 years agoMerge branch 'js/test-windows' into next
Junio C Hamano [Tue, 11 Jan 2011 21:17:36 +0000 (13:17 -0800)]
Merge branch 'js/test-windows' into next

* js/test-windows:
  t/README: hint about using $(pwd) rather than $PWD in tests
  Fix expected values of setup tests on Windows

13 years agoMerge branch 'master' into next
Junio C Hamano [Tue, 11 Jan 2011 21:17:33 +0000 (13:17 -0800)]
Merge branch 'master' into next

* master:
  t9157-*.sh: Make the svn version check more precise
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agocheckout: fix bug with ambiguous refs
Junio C Hamano [Tue, 11 Jan 2011 20:00:38 +0000 (15:00 -0500)]
checkout: fix bug with ambiguous refs

The usual dwim_ref lookup prefers tags to branches. Because
checkout primarily works on branches, though, we switch that
behavior to prefer branches.

However, there was a bug in the implementation in which we
used lookup_commit_reference (which used the regular lookup
rules) to get the actual commit to checkout. Checking out an
ambiguous ref therefore ended up putting us in an extremely
broken state in which we wrote the branch ref into HEAD, but
actually checked out the tree for the tag.

This patch fixes the bug by always attempting to pull the
commit to be checked out from the branch-ified version of
the name we were given.

Patch by Junio, tests and commit message from Jeff King.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9157-*.sh: Make the svn version check more precise
Ramsay Jones [Mon, 10 Jan 2011 23:21:26 +0000 (23:21 +0000)]
t9157-*.sh: Make the svn version check more precise

These tests require an svn version 1.5 or newer to run correctly.
In particular, all 1.4.x versions and earlier are too old, so fix
up the case label regex to cover this range exactly.

[Fix provided by Anders Kaseorg <andersk@MIT.EDU>]

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agouserdiff: match Pascal class methods
Alexey Shumkin [Tue, 11 Jan 2011 08:53:59 +0000 (11:53 +0300)]
userdiff: match Pascal class methods

Class declarations were already covered by the second pattern, but class
methods have the 'class' keyword in front too. Account for it.

Signed-off-by: Alexey Shumkin <zapped@mail.ru>
Acked-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/README: hint about using $(pwd) rather than $PWD in tests
Johannes Sixt [Tue, 11 Jan 2011 07:44:30 +0000 (08:44 +0100)]
t/README: hint about using $(pwd) rather than $PWD in tests

This adds just a "do it this way" instruction without a lot of explanation,
because the details are too complex to be explained at this point.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoFix expected values of setup tests on Windows
Johannes Sixt [Thu, 30 Dec 2010 20:51:53 +0000 (21:51 +0100)]
Fix expected values of setup tests on Windows

On Windows, bash stores absolute path names in shell variables in POSIX
format that begins with a slash, rather than in drive-letter format; such
a value is converted to the latter format when it is passed to a non-MSYS
program such as git.

When an expected test value is constructed, it must contain the value that
will be produced by git, which will be in the drive-letter format. But
TRASH_DIRECTORY is in POSIX format. Fix this by using $(pwd), which
produces drive-letter format since 4114156a (Tests on Windows: $(pwd) must
return Windows-style paths).

The change in t1510 is a straight seach-and-replace, except for the first
hunk of the diff.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint'
Junio C Hamano [Mon, 10 Jan 2011 18:39:38 +0000 (10:39 -0800)]
Merge branch 'maint'

* maint:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.2' into maint
Junio C Hamano [Mon, 10 Jan 2011 18:39:28 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.2' into maint

* maint-1.7.2:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.1' into maint-1.7.2
Junio C Hamano [Mon, 10 Jan 2011 18:39:18 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.1' into maint-1.7.2

* maint-1.7.1:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'maint-1.7.0' into maint-1.7.1
Junio C Hamano [Mon, 10 Jan 2011 18:39:04 +0000 (10:39 -0800)]
Merge branch 'maint-1.7.0' into maint-1.7.1

* maint-1.7.0:
  Documentation/git-archive: spell --worktree-attributes correctly

13 years agoMerge branch 'jk/diff-driver-binary-doc' into next
Junio C Hamano [Mon, 10 Jan 2011 18:37:26 +0000 (10:37 -0800)]
Merge branch 'jk/diff-driver-binary-doc' into next

* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option

13 years agoMerge branch 'jn/t9010-work-around-broken-svnadmin' into next
Junio C Hamano [Mon, 10 Jan 2011 18:37:25 +0000 (10:37 -0800)]
Merge branch 'jn/t9010-work-around-broken-svnadmin' into next

* jn/t9010-work-around-broken-svnadmin:
  t9010: svnadmin can fail even if available

13 years agoMerge branch 'tr/submodule-relative-scp-url' into next
Junio C Hamano [Mon, 10 Jan 2011 18:37:25 +0000 (10:37 -0800)]
Merge branch 'tr/submodule-relative-scp-url' into next

* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin

13 years agodocs: explain diff.*.binary option
Jeff King [Sun, 9 Jan 2011 20:10:04 +0000 (15:10 -0500)]
docs: explain diff.*.binary option

This was added long ago as part of the userdiff refactoring
for textconv, as internally it made the code simpler and
cleaner. However, there was never a concrete use case for
actually using the config variable.

Now that Matthieu Moy has provided such a use case, it's
easy to explain it using his example.

Signed-off-by: Jeff King <peff@peff.net>
Acked-by: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot9010: svnadmin can fail even if available
Jonathan Nieder [Thu, 6 Jan 2011 18:00:51 +0000 (12:00 -0600)]
t9010: svnadmin can fail even if available

If svn is built against one version of SQLite and run against another,
libsvn_subr needlessly errors out in operations that need to make a
commit.

That is clearly not a bug in git but let us consider the ramifications for
the test suite.  git-svn uses libsvn directly and is probably broken by
that bug; it is right for git-svn tests to fail.  The vcs-svn lib, on the
other hand, does not use libsvn and the test t9010 only uses svn to check
its work.  This points to two possible improvements:

 - do not disable most vcs-svn tests if svn is missing.
 - skip validation rather than failing it when svn fails.

Bring about both by putting the svn invocations into a single test that
builds a repo to compare the test-svn-fe result against.  The test will
always pass but only will set the new SVNREPO test prereq if svn succeeds;
and validation using that repo gets an SVNREPO prerequisite so it only
runs with working svn installations.

Works-around: http://bugs.debian.org/608925
Noticed-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
13 years agosubmodule: fix relative url parsing for scp-style origin
Thomas Rast [Mon, 10 Jan 2011 10:37:26 +0000 (11:37 +0100)]
submodule: fix relative url parsing for scp-style origin

The function resolve_relative_url was not prepared to deal with an
scp-style origin 'user@host:path' in the case where 'path' is only a
single component.  Fix this by extending the logic that strips one
path component from the $remoteurl.

Also add tests for both styles of URLs.

Noticed-by: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/githooks: post-rewrite-copy-notes never existed
Thomas Rast [Mon, 10 Jan 2011 12:42:23 +0000 (13:42 +0100)]
Documentation/githooks: post-rewrite-copy-notes never existed

The documentation for the post-rewrite hook contains a paragraph from
its early development, where the automatic notes copying facilities
were not part of the series and thus this had to be a hook.  Later
versions of the series implemented notes copying as a core feature.

Thus mentioning post-rewrite-copy-notes was never correct.  As the
other hooks do not have a "there is no default hook, but..." sentence
unless they ship a sample hook in either templates or contrib, we
simply remove the whole paragraph.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoDocumentation/git-archive: spell --worktree-attributes correctly
Thomas Rast [Mon, 10 Jan 2011 12:57:43 +0000 (13:57 +0100)]
Documentation/git-archive: spell --worktree-attributes correctly

The --worktree-attributes option was correctly documented in ba053ea
(archive: do not read .gitattributes in working directory,
2009-04-18).  However, later in 9b4c8b0 (archive documentation:
attributes are taken from the tree by default, 2010-02-10) the
misspelling "--work-tree-attributes" was used to refer to it.  Fix
this.

Noticed-by: Jeffrey Phillips Freeman <jeffrey.freeman@syncleus.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'rj/test-fixes' into next
Junio C Hamano [Sun, 9 Jan 2011 07:49:15 +0000 (23:49 -0800)]
Merge branch 'rj/test-fixes' into next

* rj/test-fixes:
  t4135-*.sh: Skip the "backslash" tests on cygwin
  t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
  t3032-*.sh: Pass the -b (--binary) option to sed on cygwin
  t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

Conflicts:
t/t3032-merge-recursive-options.sh

13 years agoMerge branch 'master' into next
Junio C Hamano [Sun, 9 Jan 2011 07:48:57 +0000 (23:48 -0800)]
Merge branch 'master' into next

* master:
  Mark gitk script executable

13 years agoMerge branch 'maint'
Junio C Hamano [Sun, 9 Jan 2011 07:48:47 +0000 (23:48 -0800)]
Merge branch 'maint'

* maint:
  Mark gitk script executable

13 years agot4135-*.sh: Skip the "backslash" tests on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:37:43 +0000 (18:37 +0000)]
t4135-*.sh: Skip the "backslash" tests on cygwin

The BSLASHPSPEC tests (11-13) fail on cygwin, since you can't
create files containing an backslash character in the name.
In order to skip these tests, we simply stop (incorrectly)
asserting the BSLASHPSPEC prerequisite in test-lib.sh.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3032-*.sh: Do not strip CR from line-endings while grepping on MinGW
Ramsay Jones [Tue, 14 Dec 2010 18:35:48 +0000 (18:35 +0000)]
t3032-*.sh: Do not strip CR from line-endings while grepping on MinGW

By default grep reads in text mode and converts CRLF into LF line
endings, which causes tests 4, 6 and 8 to fail. In a similar manner
to commit a94114ad  (Do not strip CR when grepping HTTP headers,
2010-09-12), we set (and export) the GREP_OPTIONS variable to -U so
that grep will use binary mode.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3032-*.sh: Pass the -b (--binary) option to sed on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:34:29 +0000 (18:34 +0000)]
t3032-*.sh: Pass the -b (--binary) option to sed on cygwin

The test using the conflict_hunks helper function (test 9) fails
on cygwin, since sed (by default) throws away the CR from CRLF
line endings. This behaviour is undesirable, since the validation
code expects the CRLF line-ending to be present. In order to fix
the problem we pass the -b (--binary) option to sed, using the
SED_OPTIONS variable. We use the SED_STRIPS_CR prerequisite in the
conditional initialisation of SED_OPTIONS.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot6038-*.sh: Pass the -b (--binary) option to sed on cygwin
Ramsay Jones [Tue, 14 Dec 2010 18:32:12 +0000 (18:32 +0000)]
t6038-*.sh: Pass the -b (--binary) option to sed on cygwin

The tests using the fuzz_conflict helper function (tests 5-6)
fail on cygwin in the same way they used to on MinGW, prior
to commit ca02ad3. The solution is also the same; passing the
-b (--binary) option to sed, using the SED_OPTIONS variable.
We introduce a new prerequisite SED_STRIPS_CR to use in the
conditional initialisation of SED_OPTIONS, rather than MINGW.
The new prerequisite is set in test-lib.sh for both MinGW and
Cygwin.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMark gitk script executable
Anders Kaseorg [Fri, 7 Jan 2011 01:14:41 +0000 (20:14 -0500)]
Mark gitk script executable

The executable bit on gitk-git/gitk was lost (accidentally it seems) by
commit 62ba5143ec2ab9d4083669b1b1679355e7639cd5.  Put it back, so that
gitk can be run directly from a git.git checkout.

Note that the script is already executable in gitk.git, just not in
git.git.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Fri, 7 Jan 2011 23:27:25 +0000 (15:27 -0800)]
Merge branch 'master' into next

* master:
  t9157-*.sh: Add an svn version check
  git svn: fix the final example in man page

13 years agot9157-*.sh: Add an svn version check
Ramsay Jones [Thu, 6 Jan 2011 18:29:23 +0000 (18:29 +0000)]
t9157-*.sh: Add an svn version check

Acked-by: Eric Wong <normalperson@yhbt.net>
Acked-by: Steven Walter <stevenrwalter@gmail.com>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
13 years agogit svn: fix the final example in man page
StephenB [Thu, 6 Jan 2011 19:06:51 +0000 (19:06 +0000)]
git svn: fix the final example in man page

'git-remote add' creates a remote.origin.fetch entry in the config, we
want to replace this entry rather than add another one (which will
cause 'git fetch' to error).

This adds 'git config --remove-section remote.origin' after the fetch
for encouraging users to only use "git svn" for future updates.

[ew: rewording of commit message for present tense]

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: StephenB <mail4stb@gmail.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Fri, 7 Jan 2011 00:40:09 +0000 (16:40 -0800)]
Merge branch 'master' into next

* master:
  t3032: limit sed branch labels to 8 characters
  t0001,t1510,t3301: use sane_unset which always returns with status 0
  trace.c: ensure NULL is not passed to printf

13 years agoMerge branch 'ef/alias-via-run-command' into next
Junio C Hamano [Fri, 7 Jan 2011 00:33:27 +0000 (16:33 -0800)]
Merge branch 'ef/alias-via-run-command' into next

* ef/alias-via-run-command:
  alias: use run_command api to execute aliases

13 years agoalias: use run_command api to execute aliases
Erik Faye-Lund [Thu, 6 Jan 2011 23:00:38 +0000 (00:00 +0100)]
alias: use run_command api to execute aliases

On Windows, system() executes with cmd.exe instead of /bin/sh. This
means that aliases currently has to be batch-scripts instead of
bourne-scripts. On top of that, cmd.exe does not handle single quotes,
which is what the code-path currently uses to handle arguments with
spaces.

To solve both problems in one go, use run_command_v_opt() to execute
the alias. It already does the right thing prepend "sh -c " to the
alias.

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot3032: limit sed branch labels to 8 characters
Brandon Casey [Thu, 6 Jan 2011 00:30:03 +0000 (18:30 -0600)]
t3032: limit sed branch labels to 8 characters

POSIX leaves as unspecified the handling of labels greater than 8
characters.  Apparently, Sun decided to treat them as errors.  Make sed on
Solaris happy by trimming the length of labels to 8 characters.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot0001,t1510,t3301: use sane_unset which always returns with status 0
Brandon Casey [Thu, 6 Jan 2011 00:30:02 +0000 (18:30 -0600)]
t0001,t1510,t3301: use sane_unset which always returns with status 0

On some shells (like /usr/xpg4/bin/sh on Solaris), unset will exit
non-zero when passed the name of a variable that has not been set.  Use
sane_unset instead so that the return value of unset can be ignored while
the && linkage of the test script can be preserved.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agotrace.c: ensure NULL is not passed to printf
Brandon Casey [Thu, 6 Jan 2011 00:30:01 +0000 (18:30 -0600)]
trace.c: ensure NULL is not passed to printf

GNU printf, and many others, will print the string "(null)" if a NULL
pointer is passed as the argument to a "%s" format specifier.  Some
implementations (like on Solaris) do not detect a NULL pointer and will
produce a segfault in this case.

So, fix this by ensuring that pointer variables do not contain the value
NULL.  Assign the string "(null)" to the variables are NULL.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'master' into next
Junio C Hamano [Wed, 5 Jan 2011 22:58:05 +0000 (14:58 -0800)]
Merge branch 'master' into next

* master:
  Git 1.7.4-rc1
  Git 1.7.3.5
  t/t9001-send-email.sh: fix '&&' chain in some tests

13 years agoGit 1.7.4-rc1 v1.7.4-rc1
Junio C Hamano [Wed, 5 Jan 2011 22:46:07 +0000 (14:46 -0800)]
Git 1.7.4-rc1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'maint' to sync with 1.7.3.5
Junio C Hamano [Wed, 5 Jan 2011 22:50:33 +0000 (14:50 -0800)]
Merge branch 'maint' to sync with 1.7.3.5

13 years agoGit 1.7.3.5 v1.7.3.5
Junio C Hamano [Wed, 5 Jan 2011 22:49:19 +0000 (14:49 -0800)]
Git 1.7.3.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'sr/gitweb-hilite-more' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:07 +0000 (14:25 -0800)]
Merge branch 'sr/gitweb-hilite-more' into next

* sr/gitweb-hilite-more:
  gitweb: remove unnecessary test when closing file descriptor
  gitweb: add extensions to highlight feature map

13 years agoMerge branch 'rj/svn-test' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:06 +0000 (14:25 -0800)]
Merge branch 'rj/svn-test' into next

* rj/svn-test:
  lib-git-svn.sh: Move web-server handling code into separate function

13 years agoMerge branch 'cb/setup' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:06 +0000 (14:25 -0800)]
Merge branch 'cb/setup' into next

* cb/setup:
  setup: translate symlinks in filename when using absolute paths

13 years agoMerge branch 'ae/better-template-failure-report' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:05 +0000 (14:25 -0800)]
Merge branch 'ae/better-template-failure-report' into next

* ae/better-template-failure-report:
  Improve error messages when temporary file creation fails

13 years agoMerge branch 'jn/cherry-pick-strategy-option' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:05 +0000 (14:25 -0800)]
Merge branch 'jn/cherry-pick-strategy-option' into next

* jn/cherry-pick-strategy-option:
  cherry-pick/revert: add support for -X/--strategy-option

13 years agoMerge branch 'jn/perl-funcname' into next
Junio C Hamano [Wed, 5 Jan 2011 22:25:05 +0000 (14:25 -0800)]
Merge branch 'jn/perl-funcname' into next

* jn/perl-funcname:
  userdiff/perl: catch BEGIN/END/... and POD as headers
  diff: funcname and word patterns for perl

13 years agoMerge branch 'jn/svn-fe' (early part)
Junio C Hamano [Wed, 5 Jan 2011 21:34:43 +0000 (13:34 -0800)]
Merge branch 'jn/svn-fe' (early part)

* 'jn/svn-fe' (early part):
  vcs-svn: Error out for v3 dumps

Conflicts:
t/t9010-svn-fe.sh

13 years agoMerge branch 'ao/t9001-fix'
Junio C Hamano [Wed, 5 Jan 2011 21:31:25 +0000 (13:31 -0800)]
Merge branch 'ao/t9001-fix'

* ao/t9001-fix:
  t/t9001-send-email.sh: fix '&&' chain in some tests

13 years agoMerge branch 'pw/convert-pathname-substitution'
Junio C Hamano [Wed, 5 Jan 2011 21:31:01 +0000 (13:31 -0800)]
Merge branch 'pw/convert-pathname-substitution'

* pw/convert-pathname-substitution:
  t0021: avoid getting filter killed with SIGPIPE
  convert filter: supply path to external driver

13 years agoMerge branch 'mg/cvsimport'
Junio C Hamano [Wed, 5 Jan 2011 21:30:29 +0000 (13:30 -0800)]
Merge branch 'mg/cvsimport'

* mg/cvsimport:
  cvsimport: handle the parsing of uppercase config options
  cvsimport: partial whitespace cleanup

13 years agoMerge branch 'pw/convert-pathname-substitution' into next
Junio C Hamano [Wed, 5 Jan 2011 00:24:18 +0000 (16:24 -0800)]
Merge branch 'pw/convert-pathname-substitution' into next

* pw/convert-pathname-substitution:
  t0021: avoid getting filter killed with SIGPIPE
  convert filter: supply path to external driver

13 years agoMerge branch 'mg/cvsimport' into next
Junio C Hamano [Wed, 5 Jan 2011 00:24:17 +0000 (16:24 -0800)]
Merge branch 'mg/cvsimport' into next

* mg/cvsimport:
  cvsimport: handle the parsing of uppercase config options
  cvsimport: partial whitespace cleanup

13 years agoMerge branch 'jn/svn-fe' (early part) into next
Junio C Hamano [Wed, 5 Jan 2011 00:22:00 +0000 (16:22 -0800)]
Merge branch 'jn/svn-fe' (early part) into next

* 'jn/svn-fe' (early part):
  vcs-svn: Error out for v3 dumps

Conflicts:
t/t9010-svn-fe.sh

13 years agogitweb: remove unnecessary test when closing file descriptor
Sylvain Rabot [Thu, 30 Dec 2010 21:20:29 +0000 (22:20 +0100)]
gitweb: remove unnecessary test when closing file descriptor

It happens that closing file descriptor fails whereas the blob is
perfectly readable.  According to perlman the reasons could be:

   If the file handle came from a piped open, "close" will additionally
   return false if one of the other system calls involved fails, or if the
   program exits with non-zero status.  (If the only problem was that the
   program exited non-zero, $! will be set to 0.)  Closing a pipe also waits
   for the process executing on the pipe to complete, in case you want to
   look at the output of the pipe afterwards, and implicitly puts the exit
   status value of that command into $?.

   Prematurely closing the read end of a pipe (i.e. before the process writ-
   ing to it at the other end has closed it) will result in a SIGPIPE being
   delivered to the writer.  If the other end can't handle that, be sure to
   read all the data before closing the pipe.

In this case we don't mind that close fails.

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agogitweb: add extensions to highlight feature map
Sylvain Rabot [Thu, 30 Dec 2010 21:20:28 +0000 (22:20 +0100)]
gitweb: add extensions to highlight feature map

added: sql, php5, phps, bash, zsh, ksh, mk, make

Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agot/t9001-send-email.sh: fix '&&' chain in some tests
Antonio Ospite [Tue, 4 Jan 2011 20:56:58 +0000 (21:56 +0100)]
t/t9001-send-email.sh: fix '&&' chain in some tests

t/README recommends chaining test assertions.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agolib-git-svn.sh: Move web-server handling code into separate function
Ramsay Jones [Thu, 30 Dec 2010 19:44:48 +0000 (19:44 +0000)]
lib-git-svn.sh: Move web-server handling code into separate function

This library file is currently sourced by 57 test files, of which
only four may (optionally) start a web-server in order to access
the svn repo via an http url, rather than a file url.

In addition to isolating the current web-server handling code from
the majority of tests, in a new prepare_httpd function, we also
add some more error checking and reporting code to validate the
apache installation. Only those tests which attempt to start the
web-server, by calling start_httpd, will execute this code.

Note that it is important for start_httpd to return an error
indication, if prepare_httpd fails, so that the failure to use
the web-server, as requested by the user, should not go unnoticed.
(Unless the svnrepo variable is set to an http url at the end of
start_httpd, the remaining tests will use file urls, without
comment.)

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agosetup: translate symlinks in filename when using absolute paths
Carlo Marcelo Arenas Belon [Mon, 27 Dec 2010 10:54:37 +0000 (02:54 -0800)]
setup: translate symlinks in filename when using absolute paths

otherwise, comparison to validate against work tree will fail when
the path includes a symlink and the name passed is not canonical.

Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agocvsimport: handle the parsing of uppercase config options
Michael J Gruber [Wed, 29 Dec 2010 21:55:34 +0000 (22:55 +0100)]
cvsimport: handle the parsing of uppercase config options

The current code leads to

  fatal: bad config value for 'cvsimport.r' in .git/config

for a standard use case with cvsimport.r set.

cvsimport sets internal variables by checking the config for each
possible command line option. The problem is that config items are case
insensitive, so config.r and config.R are the same. The ugly error is
due to that fact that cvsimport expects a bool for -R (and thus
config.R) but a remote name for -r (and thus config.r).

Fix this by making cvsimport expect long names for uppercase options.

config options for cvsimport have been undocumented so far, though
present in the code and advertised in several tutorials. So one may read
"enhance" for "fix". Similarly, the names for the options are
"documented" in the code, waitiing for their lowercase equivalents to be
transformed into long config options, as well.

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 years agoMerge branch 'jn/gitweb-no-logo' into next
Junio C Hamano [Tue, 4 Jan 2011 19:24:14 +0000 (11:24 -0800)]
Merge branch 'jn/gitweb-no-logo' into next

* jn/gitweb-no-logo:
  gitweb: make logo optional

13 years agoMerge branch 'master' into next
Junio C Hamano [Tue, 4 Jan 2011 19:23:59 +0000 (11:23 -0800)]
Merge branch 'master' into next

* master:
  daemon: support <directory> arguments again
  Fix typos in the documentation
  gitweb: skip logo in atom feed when there is none
  t9001: Fix test prerequisites

13 years agoMerge branch 'maint'
Junio C Hamano [Tue, 4 Jan 2011 19:23:45 +0000 (11:23 -0800)]
Merge branch 'maint'

* maint:
  gitweb: skip logo in atom feed when there is none
  t9001: Fix test prerequisites