Compare commits

..

58 Commits

Author SHA1 Message Date
adf872e783 Git 1.7.4-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-13 12:14:18 -08:00
477039c53c Merge branch 'jn/gitweb-no-logo'
* jn/gitweb-no-logo:
  gitweb: make logo optional
2011-01-13 11:39:18 -08:00
17e1c9e2fd Merge branch 'jn/perl-funcname'
* jn/perl-funcname:
  userdiff/perl: catch BEGIN/END/... and POD as headers
  diff: funcname and word patterns for perl
2011-01-13 11:38:05 -08:00
17fd68d0d8 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
2011-01-13 11:36:12 -08:00
857ba709df Merge branch 'rj/svn-test'
* rj/svn-test:
  lib-git-svn.sh: Move web-server handling code into separate function
2011-01-13 11:36:05 -08:00
7810c6b6d6 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
2011-01-13 11:35:28 -08:00
37ee62bc6b Merge branch 'jk/diff-driver-binary-doc'
* jk/diff-driver-binary-doc:
  docs: explain diff.*.binary option
2011-01-13 11:34:56 -08:00
4b297df9b2 Merge branch 'jn/t9010-work-around-broken-svnadmin'
* jn/t9010-work-around-broken-svnadmin:
  t9010: svnadmin can fail even if available
2011-01-13 11:34:52 -08:00
4f93fc745a Merge branch 'tr/submodule-relative-scp-url'
* tr/submodule-relative-scp-url:
  submodule: fix relative url parsing for scp-style origin
2011-01-13 11:34:39 -08:00
3e70e37e72 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>
2011-01-13 11:32:39 -08:00
9cf3f14766 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>
2011-01-13 11:32:31 -08:00
d2f15e29a6 Merge branch 'maint'
* maint:
  commit: suggest --amend --reset-author to fix commiter identity
2011-01-12 21:26:51 -08:00
3f14246899 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>
2011-01-12 12:43:58 -08:00
7fad99e14a 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>
2011-01-11 13:01:43 -08:00
a6fd3d4925 Merge branch 'maint'
* maint:
  Documentation/githooks: post-rewrite-copy-notes never existed
  Documentation/git-archive: spell --worktree-attributes correctly
2011-01-10 10:39:38 -08:00
54f4cd9e8c 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
2011-01-10 10:39:28 -08:00
7a876edf5d 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
2011-01-10 10:39:18 -08:00
567323d387 Merge branch 'maint-1.7.0' into maint-1.7.1
* maint-1.7.0:
  Documentation/git-archive: spell --worktree-attributes correctly
2011-01-10 10:39:04 -08:00
ab4356111a 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>
2011-01-10 10:00:14 -08:00
0316bba80f 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>
2011-01-10 09:35:17 -08:00
ea640cc691 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>
2011-01-10 09:10:54 -08:00
920a5d436b 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>
2011-01-10 09:09:02 -08:00
fc7642a096 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>
2011-01-10 09:07:24 -08:00
2cf08b6a0a Merge branch 'maint'
* maint:
  Mark gitk script executable
2011-01-08 23:48:47 -08:00
5b5d53cbe5 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>
2011-01-08 23:36:37 -08:00
a28adc2d79 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>
2011-01-08 23:36:37 -08:00
906a9a7d1d 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>
2011-01-08 23:36:37 -08:00
a31d066524 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>
2011-01-08 23:36:37 -08:00
b393515f8e Mark gitk script executable
The executable bit on gitk-git/gitk was lost (accidentally it seems) by
commit 62ba5143ec.  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>
2011-01-08 23:34:02 -08:00
e17aa8a9dc 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>
2011-01-07 22:14:36 +00:00
9cfdbf9bef 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>
2011-01-07 21:50:11 +00:00
bc2d159421 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>
2011-01-06 12:34:52 -08:00
ed40ec551d 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>
2011-01-06 12:22:36 -08:00
e83c267f71 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>
2011-01-06 12:21:49 -08:00
685e9d9145 Git 1.7.4-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-05 14:57:19 -08:00
8594495cd6 Merge branch 'maint' to sync with 1.7.3.5 2011-01-05 14:50:33 -08:00
6e97ef31ce Git 1.7.3.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-05 14:49:19 -08:00
bf9b46c16d 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
2011-01-05 13:34:43 -08:00
d3cae60efc Merge branch 'ao/t9001-fix'
* ao/t9001-fix:
  t/t9001-send-email.sh: fix '&&' chain in some tests
2011-01-05 13:31:25 -08:00
9e98354ab9 Merge branch 'pw/convert-pathname-substitution'
* pw/convert-pathname-substitution:
  t0021: avoid getting filter killed with SIGPIPE
  convert filter: supply path to external driver
2011-01-05 13:31:01 -08:00
0c30ed0cb5 Merge branch 'mg/cvsimport'
* mg/cvsimport:
  cvsimport: handle the parsing of uppercase config options
  cvsimport: partial whitespace cleanup
2011-01-05 13:30:29 -08:00
3ca7353cab 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>
2011-01-04 15:59:26 -08:00
3ce19eb857 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>
2011-01-04 15:58:57 -08:00
cc7e81674b 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>
2011-01-04 15:46:29 -08:00
3aa3047106 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>
2011-01-04 15:31:04 -08:00
60d5985dab 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>
2011-01-04 13:31:03 -08:00
f2665ec9fa Merge branch 'maint'
* maint:
  gitweb: skip logo in atom feed when there is none
  t9001: Fix test prerequisites
2011-01-04 11:23:45 -08:00
081f84ee9e daemon: support <directory> arguments again
Ever since v1.7.4-rc0~125^2~8 (daemon: use run-command api for async
serving, 2010-11-04), git daemon spawns child processes instead of
forking to serve requests.  The child processes learn that they are
being run for this purpose from the presence of the --serve command
line flag.

When running with <ok_path> arguments, the --serve flag is treated
as one of the path arguments and the special child behavior does
not kick in.  So the child becomes an ordinary git daemon process,
notices that all the addresses it needs are in use, and exits with
the message "fatal: unable to allocate any listen sockets on port
9418".

Fix it by putting --serve at the beginning of the command line,
where the flag cannot be mistaken for a path argument.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 11:23:42 -08:00
469bfc962d Fix typos in the documentation
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 11:23:42 -08:00
6822052427 gitweb: make logo optional
Some sites may not want to have a logo at all.

While at it, use $cgi->img to simplify this code.  (CGI.pm learned
most HTML4 tags by version 2.79, so this should be portable to perl
5.8, though I haven't tested.)

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 10:49:32 -08:00
9d9f5e72dc gitweb: skip logo in atom feed when there is none
With v1.5.0-rc0~169 (gitweb: Fix Atom feed <logo>: it is $logo,
not $logo_url, 2006-12-04), the logo URI to be written to Atom
feeds was corrected but the case of no logo forgotten.

Acked-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-01-04 10:48:37 -08:00
57da204264 t9001: Fix test prerequisites
Add in missing Perl prerequisites for new tests of send-email.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-29 13:39:05 -08:00
a25e47377d userdiff/perl: catch BEGIN/END/... and POD as headers
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-27 09:19:38 -08:00
71a5d4bc0e diff: funcname and word patterns for perl
The default function name discovery already works quite well for Perl
code... with the exception of here-documents (or rather their ending).

 sub foo {
	print <<END
 here-document
 END
	return 1;
 }

The default funcname pattern treats the unindented END line as a
function declaration and puts it in the @@ line of diff and "grep
--show-function" output.

With a little knowledge of perl syntax, we can do better.  You can
try it out by adding "*.perl diff=perl" to the gitattributes file.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-27 08:47:21 -08:00
4290f69067 t0021: avoid getting filter killed with SIGPIPE
The fake filter did not read from the standard input at all,
which caused the calling side to die with SIGPIPE, depending
on the timing.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 15:18:47 -08:00
a2b665de4b convert filter: supply path to external driver
Filtering to support keyword expansion may need the name of
the file being filtered.  In particular, to support p4 keywords
like

    $File: //depot/product/dir/script.sh $

the smudge filter needs to know the name of the file it is
smudging.

Allow "%f" in the custom filter command line specified in the
configuration.  This will be substituted by the filename
inside a single-quote pair to be passed to the shell.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-22 10:19:32 -08:00
549ad6d2f3 cvsimport: partial whitespace cleanup
in preparation of the config parse patch

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-29 17:08:22 -08:00
b3e5bce1aa vcs-svn: Error out for v3 dumps
By ignoring the Text-Delta and Prop-Delta node fields, current svn-fe
happily mistakes deltas for full text and instead of cleanly erroring
out, it produces a valid but semantically bogus fast-import stream
when fed a dump file in the modern "svnadmin dump --deltas" format.

Dump file parsers are supposed to ignore header fields they don't
understand (to allow for backward-compatible extensions), but they are
also supposed to check the SVN-fs-dump-format-version header to
prevent misinterpretation of non backward-compatible extensions.
Do so.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-24 14:48:52 -08:00
43 changed files with 475 additions and 213 deletions

View File

@ -157,7 +157,7 @@ Writing Documentation:
--sort=<key>
--abbrev[=<n>]
Possibility of multiple occurences is indicated by three dots:
Possibility of multiple occurrences is indicated by three dots:
<file>...
(One or more of <file>.)

View File

@ -30,3 +30,5 @@ Git 1.7.3.5 Release Notes
* "git rebase --skip" to skip the last commit in a series used to fail
to run post-rewrite hook and to copy notes from old commits that have
successfully been rebased so far. Now it do (backmerge ef88ad2).
* "gitweb" tried to show a wrong feed logo when none was specified.

View File

@ -8,15 +8,14 @@ Updates since v1.7.3
docbook-xsl >= 1.73. If you have older versions, you can set
ASCIIDOC7 and ASCIIDOC_ROFF, respectively.
* The option parsers of various commands that create new branch (or
* The option parsers of various commands that create new branches (or
rename existing ones to a new name) were too loose and users were
allowed to call a branch with a name that begins with a dash by
creative abuse of their command line options, which only lead to
burn themselves. The name of a branch cannot begin with a dash
now.
allowed to give a branch a name that begins with a dash by creative
abuse of their command line options, which only led to burning
themselves. The name of a branch cannot begin with a dash now.
* System-wide fallback default attributes can be stored in
/etc/gitattributes; core.attributesfile configuration variable can
/etc/gitattributes; the core.attributesfile configuration variable can
be used to customize the path to this file.
* The thread structure generated by "git send-email" has changed
@ -26,34 +25,39 @@ Updates since v1.7.3
cover letter of the previous series; this has been changed to make
the patches in the new series replies to the new cover letter.
* Bash completion script in contrib/ has been adjusted to be usable with
Bash 4 (options with '=value' didn't complete) It has been also made
* The Bash completion script in contrib/ has been adjusted to be usable with
Bash 4 (options with '=value' didn't complete). It has been also made
usable with zsh.
* Different pagers can be chosen depending on which subcommand is
being run under the pager, using "pager.<subcommand>" variable.
being run under the pager, using the "pager.<subcommand>" variable.
* The hardcoded tab-width of 8 used in whitespace breakage checks is now
* The hardcoded tab-width of 8 that is used in whitespace breakage checks is now
configurable via the attributes mechanism.
* Support of case insensitive filesystems (i.e. "core.ignorecase") has
been improved. For example, the gitignore mechanism didn't pay attention
to the case insensitivity.
to case insensitivity.
* The <tree>:<path> syntax to name a blob in a tree, and :<path>
syntax to name a blob in the index (e.g. "master:Makefile",
* The <tree>:<path> syntax for naming a blob in a tree, and the :<path>
syntax for naming a blob in the index (e.g. "master:Makefile",
":hello.c") have been extended. You can start <path> with "./" to
implicitly have the (sub)directory you are in prefixed to the
lookup. Similarly, ":../Makefile" from a subdirectory would mean
"the Makefile of the parent directory in the index".
* "git blame" learned --show-email option to display the e-mail
* "git blame" learned the --show-email option to display the e-mail
addresses instead of the names of authors.
* "git commit" learned --fixup and --squash options to help later invocation
of the interactive rebase.
* "git commit" learned the --fixup and --squash options to help later invocation
of interactive rebase.
* "git daemon" can be built in MinGW environment.
* Command line options to "git cvsimport" whose names are in capital
letters (-A, -M, -R and -S) can now be specified as the default in
the .git/config file by their longer names (cvsimport.authorsFile,
cvsimport.mergeRegex, cvsimport.trackRevisions, cvsimport.ignorePaths).
* "git daemon" can be built in the MinGW environment.
* "git daemon" can take more than one --listen option to listen to
multiple addresses.
@ -61,13 +65,13 @@ Updates since v1.7.3
* "git describe --exact-match" was optimized not to read commit
objects unnecessarily.
* "git diff" and "git grep" learned how functions and subroutines
in Fortran look like.
* "git diff" and "git grep" learned what functions and subroutines
in Fortran and Perl look like.
* "git fetch" learned "--recurse-submodules" option.
* "git fetch" learned the "--recurse-submodules" option.
* "git mergetool" tells vim/gvim to show three-way diff by default
(use vimdiff2/gvimdiff2 as the tool name for old behaviour).
* "git mergetool" tells vim/gvim to show a three-way diff by default
(use vimdiff2/gvimdiff2 as the tool name for old behavior).
* "git log -G<pattern>" limits the output to commits whose change has
added or deleted lines that match the given pattern.
@ -87,12 +91,20 @@ Updates since v1.7.3
directory in one branch while a new file is created in place of that
directory in the other branch.
* "git rebase --autosquash" can use SHA-1 object names to name which
commit to fix up (e.g. "fixup! e83c5163").
* "git merge" learned the "--abort" option, synonymous to
"git reset --merge" when a merge is in progress.
* The default "recursive" merge strategy learned --rename-threshold
* "git notes" learned the "merge" subcommand to merge notes refs.
In addition to the default manual conflict resolution, there are
also several notes merge strategies for automatically resolving
notes merge conflicts.
* "git rebase --autosquash" can use SHA-1 object names to name the
commit which is to be fixed up (e.g. "fixup! e83c5163").
* The default "recursive" merge strategy learned the --rename-threshold
option to influence the rename detection, similar to the -M option
of "git diff". From "git merge" frontend, "-X<strategy option>"
of "git diff". From the "git merge" frontend, the "-X<strategy option>"
interface, e.g. "git merge -Xrename-threshold=50% ...", can be used
to trigger this.
@ -100,21 +112,21 @@ Updates since v1.7.3
changes; the most notable is -Xignore-space-at-eol.
* "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read
recipient list from a command output.
the recipient list from a command output.
* "git send-email" learned to read and use "To:" from its input files.
* you can extend "git shell", which is often used on boxes that allow
git-only login over ssh as login shell, with custom set of
git-only login over ssh as login shell, with a custom set of
commands.
* The current branch name in "git status" output can be colored differently
from the generic header color by setting "color.status.branch" variable.
from the generic header color by setting the "color.status.branch" variable.
* "git submodule sync" updates metainformation for all submodules,
not just the ones that have been checked out.
* gitweb can use custom 'highlight' command with its configuration file.
* gitweb can use a custom 'highlight' command with its configuration file.
* other gitweb updates.
@ -125,7 +137,7 @@ Also contains various documentation updates.
Fixes since v1.7.3
------------------
All of the fixes in v1.7.3.X maintenance series are included in this
All of the fixes in the v1.7.3.X maintenance series are included in this
release, unless otherwise noted.
* "git log --author=me --author=her" did not find commits written by
@ -142,6 +154,6 @@ release, unless otherwise noted.
---
exec >/var/tmp/1
O=v1.7.3.4-687-g2cd900f
O=v1.7.4-rc2
echo O=$(git describe master)
git shortlog --no-merges ^maint ^$O master

View File

@ -892,7 +892,7 @@ diff.wordRegex::
fetch.recurseSubmodules::
A boolean value which changes the behavior for fetch and pull, the
default is to not recursively fetch populated sumodules unless
default is to not recursively fetch populated submodules unless
configured otherwise.
fetch.unpackLimit::
@ -1811,7 +1811,7 @@ submodule.<name>.update::
submodule.<name>.fetchRecurseSubmodules::
This option can be used to enable/disable recursive fetching of this
submodule. It can be overriden by using the --[no-]recurse-submodules
submodule. It can be overridden by using the --[no-]recurse-submodules
command line option to "git fetch" and "git pull".
This setting will override that from in the linkgit:gitmodules[5]
file.

View File

@ -333,7 +333,7 @@ likely to introduce confusing changes to the index.
There are also more complex operations that can be performed. But beware
that because the patch is applied only to the index and not the working
tree, the working tree will appear to "undo" the change in the index.
For example, introducing a a new line into the index that is in neither
For example, introducing a new line into the index that is in neither
the HEAD nor the working tree will stage the new line for commit, but
the line will appear to be reverted in the working tree.

View File

@ -116,7 +116,7 @@ Note that attributes are by default taken from the `.gitattributes` files
in the tree that is being archived. If you want to tweak the way the
output is generated after the fact (e.g. you committed without adding an
appropriate export-ignore in its `.gitattributes`), adjust the checked out
`.gitattributes` file as necessary and use `--work-tree-attributes`
`.gitattributes` file as necessary and use `--worktree-attributes`
option. Alternatively you can keep necessary attributes that should apply
while archiving any tree in your `$GIT_DIR/info/attributes` file.

View File

@ -59,7 +59,7 @@ unbundle <file>::
<git-rev-list-args>::
A list of arguments, acceptable to 'git rev-parse' and
'git rev-list' (and containg a named ref, see SPECIFYING REFERENCES
'git rev-list' (and containing a named ref, see SPECIFYING REFERENCES
below), that specifies the specific objects and references
to transport. For example, `master{tilde}10..master` causes the
current master reference to be packaged along with all objects

View File

@ -57,7 +57,7 @@ merge.log::
In addition to branch names, populate the log message with at
most the specified number of one-line descriptions from the
actual commits that are being merged. Defaults to false, and
true is a synoym for 20.
true is a synonym for 20.
merge.summary::
Synonym to `merge.log`; this is deprecated and will be removed in

View File

@ -15,12 +15,12 @@ This remote helper uses the specified 'program' to connect
to a remote git server.
Data written to stdin of this specified 'program' is assumed
to be sent to git:// server, git-upload-pack, git-receive-pack
to be sent to a git:// server, git-upload-pack, git-receive-pack
or git-upload-archive (depending on situation), and data read
from stdout of this program is assumed to be received from
the same service.
Command and arguments are separated by unescaped space.
Command and arguments are separated by an unescaped space.
The following sequences have a special meaning:
@ -39,19 +39,19 @@ The following sequences have a special meaning:
git-upload-pack, or git-upload-archive) of the service
git wants to invoke.
'%G' (must be first characters in argument)::
'%G' (must be the first characters in an argument)::
This argument will not be passed to 'program'. Instead, it
will cause helper to start by sending git:// service request to
remote side with service field set to approiate value and
repository field set to rest of the argument. Default is not to send
such request.
will cause the helper to start by sending git:// service requests to
the remote side with the service field set to an appropriate value and
the repository field set to rest of the argument. Default is not to send
such a request.
+
This is useful if remote side is git:// server accessed over
some tunnel.
'%V' (must be first characters in argument)::
This argument will not be passed to 'program'. Instead it sets
the vhost field in git:// service request (to rest of the argument).
the vhost field in the git:// service request (to rest of the argument).
Default is not to send vhost in such request (if sent).
ENVIRONMENT VARIABLES:

View File

@ -11,20 +11,20 @@ SYNOPSIS
DESCRIPTION
-----------
This helper uses specified file descriptors to connect to remote git server.
This helper uses specified file descriptors to connect to a remote git server.
This is not meant for end users but for programs and scripts calling git
fetch, push or archive.
If only <infd> is given, it is assumed to be bidirectional socket connected
If only <infd> is given, it is assumed to be a bidirectional socket connected
to remote git server (git-upload-pack, git-receive-pack or
git-upload-achive). If both <infd> and <outfd> are given, they are assumed
to be pipes connected to remote git server (<infd> being the inbound pipe
to be pipes connected to a remote git server (<infd> being the inbound pipe
and <outfd> being the outbound pipe.
It is assumed that any handshaking procedures have already been completed
(such as sending service request for git://) before this helper is started.
<anything> can be any string. It is ignored. It is meant for provoding
<anything> can be any string. It is ignored. It is meant for providing
information to user in the URL in case that URL is displayed in some
context.

View File

@ -613,7 +613,7 @@ old references to SVN revision numbers in existing documentation, bug
reports and archives. If you plan to eventually migrate from SVN to git
and are certain about dropping SVN history, consider
linkgit:git-filter-branch[1] instead. filter-branch also allows
reformating of metadata for ease-of-reading and rewriting authorship
reformatting of metadata for ease-of-reading and rewriting authorship
info for non-"svn.authorsFile" users.
svn.useSvmProps::
@ -729,8 +729,11 @@ have each person clone that repository with 'git clone':
cd project
git init
git remote add origin server:/pub/project
git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
git fetch
# Prevent fetch/pull from remote git server in the future,
# we only want to use git svn for future updates
git config --remove-section remote.origin
# Create a local branch from one of the branches just fetched
git checkout -b master FETCH_HEAD
# Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)

View File

@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
branch of the `git.git` repository.
Documentation for older releases are available here:
* link:v1.7.3.4/git.html[documentation for release 1.7.3.4]
* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
* release notes for
link:RelNotes/1.7.3.5.txt[1.7.3.5],
link:RelNotes/1.7.3.4.txt[1.7.3.4],
link:RelNotes/1.7.3.3.txt[1.7.3.3],
link:RelNotes/1.7.3.2.txt[1.7.3.2],

View File

@ -335,6 +335,16 @@ input that is already correctly indented. In this case, the lack of a
smudge filter means that the clean filter _must_ accept its own output
without modifying it.
Sequence "%f" on the filter command line is replaced with the name of
the file the filter is working on. A filter might use this in keyword
substitution. For example:
------------------------
[filter "p4"]
clean = git-p4-filter --clean %f
smudge = git-p4-filter --smudge %f
------------------------
Interaction between checkin/checkout attributes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -494,6 +504,8 @@ patterns are available:
- `pascal` suitable for source code in the Pascal/Delphi language.
- `perl` suitable for source code in the Perl language.
- `php` suitable for source code in the PHP language.
- `python` suitable for source code in the Python language.
@ -581,6 +593,39 @@ and now produces better output), you can remove the cache
manually with `git update-ref -d refs/notes/textconv/jpg` (where
"jpg" is the name of the diff driver, as in the example above).
Marking files as binary
^^^^^^^^^^^^^^^^^^^^^^^
Git usually guesses correctly whether a blob contains text or binary
data by examining the beginning of the contents. However, sometimes you
may want to override its decision, either because a blob contains binary
data later in the file, or because the content, while technically
composed of text characters, is opaque to a human reader. For example,
many postscript files contain only ascii characters, but produce noisy
and meaningless diffs.
The simplest way to mark a file as binary is to unset the diff
attribute in the `.gitattributes` file:
------------------------
*.ps -diff
------------------------
This will cause git to generate `Binary files differ` (or a binary
patch, if binary patches are enabled) instead of a regular diff.
However, one may also want to specify other diff driver attributes. For
example, you might want to use `textconv` to convert postscript files to
an ascii representation for human viewing, but otherwise treat them as
binary files. You cannot specify both `-diff` and `diff=ps` attributes.
The solution is to use the `diff.*.binary` config option:
------------------------
[diff "ps"]
textconv = ps2ascii
binary = true
------------------------
Performing a three-way merge
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -350,10 +350,6 @@ rebase::
The commits are guaranteed to be listed in the order that they were
processed by rebase.
There is no default 'post-rewrite' hook, but see the
`post-receive-copy-notes` script in `contrib/hooks` for an example
that copies your git-notes to the rewritten commits.
GIT
---

View File

@ -49,7 +49,7 @@ submodule.<name>.fetchRecurseSubmodules::
submodule. If this option is also present in the submodules entry in
.git/config of the superproject, the setting there will override the
one found in .gitmodules.
Both settings can be overriden on the command line by using the
Both settings can be overridden on the command line by using the
"--[no-]recurse-submodules" option to "git fetch" and "git pull"..
submodule.<name>.ignore::

View File

@ -10,7 +10,7 @@ merge.log::
In addition to branch names, populate the log message with at
most the specified number of one-line descriptions from the
actual commits that are being merged. Defaults to false, and
true is a synoym for 20.
true is a synonym for 20.
merge.renameLimit::
The number of files to consider when performing rename detection

View File

@ -32,7 +32,7 @@ and installation code should look something like:
}
------------------------------------------
Handlers are given the typdef of sigchain_fun. This is the same type
Handlers are given the typedef of sigchain_fun. This is the same type
that is given to signal() or sigaction(). It is perfectly reasonable to
push SIG_DFL or SIG_IGN onto the stack.

View File

@ -1,7 +1,7 @@
#!/bin/sh
GVF=GIT-VERSION-FILE
DEF_VER=v1.7.4-rc0
DEF_VER=v1.7.4-rc2
LF='
'

View File

@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
" git config --global user.name \"Your Name\"\n"
" git config --global user.email you@example.com\n"
"\n"
"If the identity used for this commit is wrong, you can fix it with:\n"
"After doing this, you may fix the identity used for this commit with:\n"
"\n"
" git commit --amend --author='Your Name <you@example.com>'\n";
" git commit --amend --reset-author\n";
static const char empty_amend_advice[] =
"You asked to amend the most recent commit, but doing so would make\n"

View File

@ -1,6 +1,7 @@
#include "cache.h"
#include "attr.h"
#include "run-command.h"
#include "quote.h"
/*
* convert.c - convert a file when checking it out and checking it in.
@ -318,6 +319,7 @@ struct filter_params {
const char *src;
unsigned long size;
const char *cmd;
const char *path;
};
static int filter_buffer(int in, int out, void *data)
@ -330,7 +332,23 @@ static int filter_buffer(int in, int out, void *data)
int write_err, status;
const char *argv[] = { NULL, NULL };
argv[0] = params->cmd;
/* apply % substitution to cmd */
struct strbuf cmd = STRBUF_INIT;
struct strbuf path = STRBUF_INIT;
struct strbuf_expand_dict_entry dict[] = {
{ "f", NULL, },
{ NULL, NULL, },
};
/* quote the path to preserve spaces, etc. */
sq_quote_buf(&path, params->path);
dict[0].value = path.buf;
/* expand all %f with the quoted path */
strbuf_expand(&cmd, params->cmd, strbuf_expand_dict_cb, &dict);
strbuf_release(&path);
argv[0] = cmd.buf;
memset(&child_process, 0, sizeof(child_process));
child_process.argv = argv;
@ -350,6 +368,8 @@ static int filter_buffer(int in, int out, void *data)
status = finish_command(&child_process);
if (status)
error("external filter %s failed %d", params->cmd, status);
strbuf_release(&cmd);
return (write_err || status);
}
@ -377,6 +397,7 @@ static int apply_filter(const char *path, const char *src, size_t len,
params.src = src;
params.size = len;
params.cmd = cmd;
params.path = path;
fflush(NULL);
if (start_async(&async))

View File

@ -1226,9 +1226,10 @@ int main(int argc, char **argv)
/* prepare argv for serving-processes */
cld_argv = xmalloc(sizeof (char *) * (argc + 2));
for (i = 0; i < argc; ++i)
cld_argv[i] = argv[i];
cld_argv[argc] = "--serve";
cld_argv[0] = argv[0]; /* git-daemon */
cld_argv[1] = "--serve";
for (i = 1; i < argc; ++i)
cld_argv[i+1] = argv[i];
cld_argv[argc+1] = NULL;
return serve(&listen_addr, listen_port, cred);

View File

@ -90,23 +90,40 @@ sub write_author_info($) {
}
# convert getopts specs for use by git config
my %longmap = (
'A:' => 'authors-file',
'M:' => 'merge-regex',
'P:' => undef,
'R' => 'track-revisions',
'S:' => 'ignore-paths',
);
sub read_repo_config {
# Split the string between characters, unless there is a ':'
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
# Split the string between characters, unless there is a ':'
# So "abc:de" becomes ["a", "b", "c:", "d", "e"]
my @opts = split(/ *(?!:)/, shift);
foreach my $o (@opts) {
my $key = $o;
$key =~ s/://g;
my $arg = 'git config';
$arg .= ' --bool' if ($o !~ /:$/);
my $ckey = $key;
chomp(my $tmp = `$arg --get cvsimport.$key`);
if (exists $longmap{$o}) {
# An uppercase option like -R cannot be
# expressed in the configuration, as the
# variable names are downcased.
$ckey = $longmap{$o};
next if (! defined $ckey);
$ckey =~ s/-//g;
}
chomp(my $tmp = `$arg --get cvsimport.$ckey`);
if ($tmp && !($arg =~ /--bool/ && $tmp eq 'false')) {
no strict 'refs';
my $opt_name = "opt_" . $key;
if (!$$opt_name) {
$$opt_name = $tmp;
}
no strict 'refs';
my $opt_name = "opt_" . $key;
if (!$$opt_name) {
$$opt_name = $tmp;
}
}
}
}

View File

@ -37,12 +37,24 @@ resolve_relative_url ()
die "remote ($remote) does not have a url defined in .git/config"
url="$1"
remoteurl=${remoteurl%/}
sep=/
while test -n "$url"
do
case "$url" in
../*)
url="${url#../}"
remoteurl="${remoteurl%/*}"
case "$remoteurl" in
*/*)
remoteurl="${remoteurl%/*}"
;;
*:*)
remoteurl="${remoteurl%:*}"
sep=:
;;
*)
die "cannot strip one component off url '$remoteurl'"
;;
esac
;;
./*)
url="${url#./}"
@ -51,7 +63,7 @@ resolve_relative_url ()
break;;
esac
done
echo "$remoteurl/${url%/}"
echo "$remoteurl$sep${url%/}"
}
#

0
gitk-git/gitk Normal file → Executable file
View File

View File

@ -250,13 +250,14 @@ our %highlight_ext = (
# main extensions, defining name of syntax;
# see files in /usr/share/highlight/langDefs/ directory
map { $_ => $_ }
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl),
qw(py c cpp rb java css php sh pl js tex bib xml awk bat ini spec tcl sql make),
# alternate extensions, see /etc/highlight/filetypes.conf
'h' => 'c',
map { $_ => 'sh' } qw(bash zsh ksh),
map { $_ => 'cpp' } qw(cxx c++ cc),
map { $_ => 'php' } qw(php3 php4),
map { $_ => 'php' } qw(php3 php4 php5 phps),
map { $_ => 'pl' } qw(perl pm), # perhaps also 'cgi'
'mak' => 'make',
map { $_ => 'make'} qw(mak mk),
map { $_ => 'xml' } qw(xhtml html htm),
);
@ -3464,8 +3465,7 @@ sub run_highlighter {
my ($fd, $highlight, $syntax) = @_;
return $fd unless ($highlight && defined $syntax);
close $fd
or die_error(404, "Reading blob failed");
close $fd;
open $fd, quote_command(git_cmd(), "cat-file", "blob", $hash)." | ".
quote_command($highlight_bin).
" --xhtml --fragment --syntax $syntax |"
@ -3601,10 +3601,15 @@ EOF
insert_file($site_header);
}
print "<div class=\"page_header\">\n" .
$cgi->a({-href => esc_url($logo_url),
-title => $logo_label},
qq(<img src=").esc_url($logo).qq(" width="72" height="27" alt="git" class="logo"/>));
print "<div class=\"page_header\">\n";
if (defined $logo) {
print $cgi->a({-href => esc_url($logo_url),
-title => $logo_label},
$cgi->img({-src => esc_url($logo),
-width => 72, -height => 27,
-alt => "git",
-class => "logo"}));
}
print $cgi->a({-href => esc_url($home_link)}, $home_link_str) . " / ";
if (defined $project) {
print $cgi->a({-href => href(action=>"summary")}, esc_html($project));
@ -7169,7 +7174,7 @@ XML
if (defined $favicon) {
print "<icon>" . esc_url($favicon) . "</icon>\n";
}
if (defined $logo_url) {
if (defined $logo) {
# not twice as wide as tall: 72 x 27 pixels
print "<logo>" . esc_url($logo) . "</logo>\n";
}

View File

@ -68,8 +68,7 @@ svn_cmd () {
svn "$orig_svncmd" --config-dir "$svnconf" "$@"
}
if test -n "$SVN_HTTPD_PORT"
then
prepare_httpd () {
for d in \
"$SVN_HTTPD_PATH" \
/usr/sbin/apache2 \
@ -83,8 +82,8 @@ then
done
if test -z "$SVN_HTTPD_PATH"
then
skip_all='skipping git svn tests, Apache not found'
test_done
echo >&2 '*** error: Apache not found'
return 1
fi
for d in \
"$SVN_HTTPD_MODULE_PATH" \
@ -99,23 +98,16 @@ then
done
if test -z "$SVN_HTTPD_MODULE_PATH"
then
skip_all='skipping git svn tests, Apache module dir not found'
test_done
echo >&2 '*** error: Apache module dir not found'
return 1
fi
fi
start_httpd () {
repo_base_path="$1"
if test -z "$SVN_HTTPD_PORT"
if test ! -f "$SVN_HTTPD_MODULE_PATH/mod_dav_svn.so"
then
echo >&2 'SVN_HTTPD_PORT is not defined!'
return
fi
if test -z "$repo_base_path"
then
repo_base_path=svn
echo >&2 '*** error: Apache module "mod_dav_svn" not found'
return 1
fi
repo_base_path="${1-svn}"
mkdir "$GIT_DIR"/logs
cat > "$GIT_DIR/httpd.conf" <<EOF
@ -132,12 +124,24 @@ LoadModule dav_svn_module $SVN_HTTPD_MODULE_PATH/mod_dav_svn.so
SVNPath "$rawsvnrepo"
</Location>
EOF
}
start_httpd () {
if test -z "$SVN_HTTPD_PORT"
then
echo >&2 'SVN_HTTPD_PORT is not defined!'
return
fi
prepare_httpd "$1" || return 1
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k start
svnrepo="http://127.0.0.1:$SVN_HTTPD_PORT/$repo_base_path"
}
stop_httpd () {
test -z "$SVN_HTTPD_PORT" && return
test ! -f "$GIT_DIR/httpd.conf" && return
"$SVN_HTTPD_PATH" -f "$GIT_DIR"/httpd.conf -k stop
}

View File

@ -80,11 +80,11 @@ EOF
chmod +x passing-todo.sh &&
./passing-todo.sh >out 2>err &&
! test -s err &&
cat >expect <<EOF &&
ok 1 - pretend we have fixed a known breakage # TODO known breakage
# fixed 1 known breakage(s)
# passed all 1 test(s)
1..1
sed -e 's/^> //' >expect <<EOF &&
> ok 1 - pretend we have fixed a known breakage # TODO known breakage
> # fixed 1 known breakage(s)
> # passed all 1 test(s)
> 1..1
EOF
test_cmp expect out)
"
@ -164,19 +164,19 @@ EOF
test_must_fail ./failing-cleanup.sh >out 2>err &&
! test -s err &&
! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
sed -e 's/Z$//' >expect <<\EOF &&
not ok - 1 tests clean up even after a failure
# Z
# touch clean-after-failure &&
# test_when_finished rm clean-after-failure &&
# (exit 1)
# Z
not ok - 2 failure to clean up causes the test to fail
# Z
# test_when_finished \"(exit 2)\"
# Z
# failed 2 among 2 test(s)
1..2
sed -e 's/Z$//' -e 's/^> //' >expect <<\EOF &&
> not ok - 1 tests clean up even after a failure
> # Z
> # touch clean-after-failure &&
> # test_when_finished rm clean-after-failure &&
> # (exit 1)
> # Z
> not ok - 2 failure to clean up causes the test to fail
> # Z
> # test_when_finished \"(exit 2)\"
> # Z
> # failed 2 among 2 test(s)
> 1..2
EOF
test_cmp expect out)
"

View File

@ -35,7 +35,7 @@ test_expect_success 'plain' '
test_expect_success 'plain nested in bare' '
(
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
git init --bare bare-ancestor.git &&
cd bare-ancestor.git &&
mkdir plain-nested &&
@ -47,7 +47,7 @@ test_expect_success 'plain nested in bare' '
test_expect_success 'plain through aliased command, outside any git repo' '
(
unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
HOME=$(pwd)/alias-config &&
export HOME &&
mkdir alias-config &&
@ -65,7 +65,7 @@ test_expect_success 'plain through aliased command, outside any git repo' '
test_expect_failure 'plain nested through aliased command' '
(
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
git init plain-ancestor-aliased &&
cd plain-ancestor-aliased &&
echo "[alias] aliasedinit = init" >>.git/config &&
@ -78,7 +78,7 @@ test_expect_failure 'plain nested through aliased command' '
test_expect_failure 'plain nested in bare through aliased command' '
(
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
git init --bare bare-ancestor-aliased.git &&
cd bare-ancestor-aliased.git &&
echo "[alias] aliasedinit = init" >>config &&

View File

@ -93,4 +93,47 @@ test_expect_success expanded_in_repo '
cmp expanded-keywords expected-output
'
# The use of %f in a filter definition is expanded to the path to
# the filename being smudged or cleaned. It must be shell escaped.
# First, set up some interesting file names and pet them in
# .gitattributes.
test_expect_success 'filter shell-escaped filenames' '
cat >argc.sh <<-EOF &&
#!$SHELL_PATH
cat >/dev/null
echo argc: \$# "\$@"
EOF
normal=name-no-magic &&
special="name with '\''sq'\'' and \$x" &&
echo some test text >"$normal" &&
echo some test text >"$special" &&
git add "$normal" "$special" &&
git commit -q -m "add files" &&
echo "name* filter=argc" >.gitattributes &&
# delete the files and check them out again, using a smudge filter
# that will count the args and echo the command-line back to us
git config filter.argc.smudge "sh ./argc.sh %f" &&
rm "$normal" "$special" &&
git checkout -- "$normal" "$special" &&
# make sure argc.sh counted the right number of args
echo "argc: 1 $normal" >expect &&
test_cmp expect "$normal" &&
echo "argc: 1 $special" >expect &&
test_cmp expect "$special" &&
# do the same thing, but with more args in the filter expression
git config filter.argc.smudge "sh ./argc.sh %f --my-extra-arg" &&
rm "$normal" "$special" &&
git checkout -- "$normal" "$special" &&
# make sure argc.sh counted the right number of args
echo "argc: 2 $normal --my-extra-arg" >expect &&
test_cmp expect "$normal" &&
echo "argc: 2 $special --my-extra-arg" >expect &&
test_cmp expect "$special" &&
:
'
test_done

View File

@ -80,7 +80,7 @@ test_repo() {
# - cwd can't be outside worktree
test_expect_success '#0: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 0 0/sub &&
cd 0 && git init && cd ..
'
@ -123,7 +123,7 @@ EOF
# GIT_WORK_TREE is ignored -> #0
test_expect_success '#1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub &&
cd 1 &&
git init &&
@ -174,7 +174,7 @@ EOF
# - cwd can't be outside worktree
test_expect_success '#2: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 2 2/sub &&
cd 2 && git init && cd ..
'
@ -241,7 +241,7 @@ EOF
# - cwd can be outside worktree
test_expect_success '#3: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 3 3/sub 3/sub/sub 3.wt 3.wt/sub 3/wt 3/wt/sub &&
cd 3 && git init && cd ..
'
@ -504,7 +504,7 @@ EOF
# core.worktree is ignored -> #0
test_expect_success '#4: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 4 4/sub &&
cd 4 &&
git init &&
@ -550,7 +550,7 @@ EOF
# GIT_WORK_TREE/core.worktree are ignored -> #0
test_expect_success '#5: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 5 5/sub &&
cd 5 &&
git init &&
@ -602,7 +602,7 @@ EOF
# - cwd can be outside worktree
test_expect_success '#6: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 6 6/sub 6/sub/sub 6.wt 6.wt/sub 6/wt 6/wt/sub &&
cd 6 && git init && cd ..
'
@ -889,7 +889,7 @@ EOF
# core.worktree is overridden by GIT_WORK_TREE -> #3
test_expect_success '#7: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub &&
cd 7 &&
git init &&
@ -1155,7 +1155,7 @@ EOF
# #0 except that git_dir is set by .git file
test_expect_success '#8: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 8 8/sub &&
cd 8 &&
git init &&
@ -1202,7 +1202,7 @@ EOF
# #1 except that git_dir is set by .git file
test_expect_success '#9: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub &&
cd 9 &&
git init &&
@ -1251,7 +1251,7 @@ EOF
# #2 except that git_dir is set by .git file
test_expect_success '#10: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 10 10/sub &&
cd 10 &&
git init &&
@ -1318,7 +1318,7 @@ EOF
# #3 except that git_dir is set by .git file
test_expect_success '#11: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub &&
cd 11 &&
git init &&
@ -1586,7 +1586,7 @@ EOF
test_expect_success '#12: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 12 12/sub 12/sub/sub 12.wt 12.wt/sub 12/wt 12/wt/sub &&
cd 12 &&
git init &&
@ -1634,7 +1634,7 @@ EOF
# #5 except that git_dir is set by .git file
test_expect_success '#13: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 13 13/sub 13/sub/sub 13.wt 13.wt/sub 13/wt 13/wt/sub &&
cd 13 &&
git init &&
@ -1684,7 +1684,7 @@ EOF
# #6 except that git_dir is set by .git file
test_expect_success '#14: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub &&
cd 14 &&
git init &&
@ -1975,7 +1975,7 @@ EOF
# #7 except that git_dir is set by .git file
test_expect_success '#15: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub &&
cd 15 &&
git init &&
@ -2247,7 +2247,7 @@ EOF
# - cwd can't be outside worktree
test_expect_success '#16.1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 16 16/sub &&
cd 16 &&
git init &&
@ -2378,7 +2378,7 @@ EOF
# GIT_WORK_TREE is ignored -> #16.1 (with warnings perhaps)
test_expect_success '#17.1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 17 17/sub &&
cd 17 &&
git init &&
@ -2511,7 +2511,7 @@ EOF
# - cwd can't be outside worktree
test_expect_success '#18: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 18 18/sub &&
cd 18 &&
git init &&
@ -2578,7 +2578,7 @@ EOF
# bare repo is overridden by GIT_WORK_TREE -> #3
test_expect_success '#19: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub &&
cd 19 &&
git init &&
@ -2844,7 +2844,7 @@ EOF
# core.worktree is ignored -> #16.1
test_expect_success '#20.1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 20 20/sub &&
cd 20 &&
git init &&
@ -2972,7 +2972,7 @@ EOF
# GIT_WORK_TREE/core.worktree are ignored -> #20.1
test_expect_success '#21.1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 21 21/sub &&
cd 21 &&
git init &&
@ -3108,7 +3108,7 @@ EOF
# - cwd can be outside worktree
test_expect_success '#22.1: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 22 &&
cd 22 &&
git init &&
@ -3439,7 +3439,7 @@ test_expect_success '#22.2: at root' '
# core.worktree is overridden by GIT_WORK_TREE -> #19
test_expect_success '#23: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub &&
cd 23 &&
git init &&
@ -3706,7 +3706,7 @@ EOF
# #16.2 except git_dir is set according to .git file
test_expect_success '#24: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 24 24/sub &&
cd 24 &&
git init &&
@ -3754,7 +3754,7 @@ EOF
# #17.2 except git_dir is set according to .git file
test_expect_success '#25: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 25 25/sub &&
cd 25 &&
git init &&
@ -3804,7 +3804,7 @@ EOF
# #18 except git_dir is set according to .git file
test_expect_success '#26: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 26 26/sub &&
cd 26 &&
git init &&
@ -3872,7 +3872,7 @@ EOF
# #19 except git_dir is set according to .git file
test_expect_success '#27: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub &&
cd 27 &&
git init &&
@ -4140,7 +4140,7 @@ EOF
# core.worktree is ignored -> #24
test_expect_success '#28: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 28 28/sub &&
cd 28 &&
git init &&
@ -4189,7 +4189,7 @@ EOF
# GIT_WORK_TREE/core.worktree are ignored -> #28
test_expect_success '#29: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 29 29/sub &&
cd 29 &&
git init &&
@ -4239,7 +4239,7 @@ EOF
# core.worktree and core.bare conflict, won't fly.
test_expect_success '#30: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 30 &&
cd 30 &&
git init &&
@ -4278,7 +4278,7 @@ test_expect_success '#30: at root' '
# #23 except git_dir is set according to .git file
test_expect_success '#31: setup' '
unset GIT_DIR GIT_WORK_TREE &&
sane_unset GIT_DIR GIT_WORK_TREE &&
mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub &&
cd 31 &&
git init &&

View File

@ -13,16 +13,19 @@ test_description='merge-recursive options
. ./test-lib.sh
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
test_have_prereq MINGW && export GREP_OPTIONS=-U
test_expect_success 'setup' '
conflict_hunks () {
sed -n -e "
/^<<<</ b inconflict
sed $SED_OPTIONS -n -e "
/^<<<</ b conflict
b
: inconflict
: conflict
p
/^>>>>/ b
n
b inconflict
b conflict
" "$@"
} &&

View File

@ -1067,7 +1067,7 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
test_expect_success 'git notes get-ref (no overrides)' '
git config --unset core.notesRef &&
unset GIT_NOTES_REF &&
sane_unset GIT_NOTES_REF &&
test "$(git notes get-ref)" = "refs/notes/commits"
'

View File

@ -32,7 +32,7 @@ EOF
sed 's/beer\\/beer,\\/' < Beer.java > Beer-correct.java
builtin_patterns="bibtex cpp csharp fortran html java objc pascal php python ruby tex"
builtin_patterns="bibtex cpp csharp fortran html java objc pascal perl php python ruby tex"
for p in $builtin_patterns
do
test_expect_success "builtin $p pattern compiles" '

View File

@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
. ./test-lib.sh
test_have_prereq MINGW && SED_OPTIONS=-b
test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
test_expect_success setup '
git config core.autocrlf false &&

View File

@ -446,4 +446,42 @@ test_expect_success 'add should fail when path is used by an existing directory'
)
'
test_expect_success 'set up for relative path tests' '
mkdir reltest &&
(
cd reltest &&
git init &&
mkdir sub &&
(
cd sub &&
git init &&
test_commit foo
) &&
git add sub &&
git config -f .gitmodules submodule.sub.path sub &&
git config -f .gitmodules submodule.sub.url ../subrepo &&
cp .git/config pristine-.git-config
)
'
test_expect_success 'relative path works with URL' '
(
cd reltest &&
cp pristine-.git-config .git/config &&
git config remote.origin.url ssh://hostname/repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = ssh://hostname/subrepo
)
'
test_expect_success 'relative path works with user@host:path' '
(
cd reltest &&
cp pristine-.git-config .git/config &&
git config remote.origin.url user@host:repo &&
git submodule init &&
test "$(git config submodule.sub.url)" = user@host:subrepo
)
'
test_done

View File

@ -265,7 +265,7 @@ test_expect_success $PREREQ 'Author From: in message body' '
--to=nobody@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches &&
sed "1,/^\$/d" < msgtxt1 > msgbody1
sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
grep "From: A <author@example.com>" msgbody1
'
@ -276,7 +276,7 @@ test_expect_success $PREREQ 'Author From: not in message body' '
--to=nobody@example.com \
--smtp-server="$(pwd)/fake.sendmail" \
$patches &&
sed "1,/^\$/d" < msgtxt1 > msgbody1
sed "1,/^\$/d" < msgtxt1 > msgbody1 &&
! grep "From: A <author@example.com>" msgbody1
'
@ -298,7 +298,7 @@ test_expect_success $PREREQ 'Invalid In-Reply-To' '
--in-reply-to=" " \
--smtp-server="$(pwd)/fake.sendmail" \
$patches \
2>errors
2>errors &&
! grep "^In-Reply-To: < *>" msgtxt1
'
@ -617,7 +617,7 @@ EOF
"
test_expect_success $PREREQ '--suppress-cc=sob' '
git config --unset sendemail.cccmd
test_might_fail git config --unset sendemail.cccmd &&
test_suppression sob
'
@ -1135,7 +1135,7 @@ test_expect_success $PREREQ '--8bit-encoding also treats subject' '
# Note that the patches in this test are deliberately out of order; we
# want to make sure it works even if the cover-letter is not in the
# first mail.
test_expect_success 'refusing to send cover letter template' '
test_expect_success $PREREQ 'refusing to send cover letter template' '
clean_fake_sendmail &&
rm -fr outdir &&
git format-patch --cover-letter -2 -o outdir &&
@ -1151,7 +1151,7 @@ test_expect_success 'refusing to send cover letter template' '
test -z "$(ls msgtxt*)"
'
test_expect_success '--force sends cover letter template anyway' '
test_expect_success $PREREQ '--force sends cover letter template anyway' '
clean_fake_sendmail &&
rm -fr outdir &&
git format-patch --cover-letter -2 -o outdir &&

View File

@ -4,45 +4,55 @@ test_description='check svn dumpfile importer'
. ./test-lib.sh
if ! svnadmin -h >/dev/null 2>&1
then
skip_all='skipping svn-fe tests, svn not available'
test_done
fi
reinit_git () {
rm -fr .git &&
git init
}
svnconf=$PWD/svnconf
export svnconf
>empty
svn_cmd () {
subcommand=$1 &&
shift &&
test_expect_success 'empty dump' '
reinit_git &&
echo "SVN-fs-dump-format-version: 2" >input &&
test-svn-fe input >stream &&
git fast-import <stream
'
test_expect_success 'v3 dumps not supported' '
reinit_git &&
echo "SVN-fs-dump-format-version: 3" >input &&
test_must_fail test-svn-fe input >stream &&
test_cmp empty stream
'
test_expect_success 'set up svn repo' '
svnconf=$PWD/svnconf &&
mkdir -p "$svnconf" &&
svn "$subcommand" --config-dir "$svnconf" "$@"
}
test_dump () {
label=$1
dump=$2
test_expect_success "$dump" '
svnadmin create "$label-svn" &&
svnadmin load "$label-svn" < "$TEST_DIRECTORY/$dump" &&
svn_cmd export "file://$PWD/$label-svn" "$label-svnco" &&
git init "$label-git" &&
test-svn-fe "$TEST_DIRECTORY/$dump" >"$label.fe" &&
(
cd "$label-git" &&
git fast-import < ../"$label.fe"
) &&
(
cd "$label-svnco" &&
git init &&
git add . &&
git fetch "../$label-git" master &&
git diff --exit-code FETCH_HEAD
)
'
}
if
svnadmin -h >/dev/null 2>&1 &&
svnadmin create simple-svn &&
svnadmin load simple-svn <"$TEST_DIRECTORY/t9135/svn.dump" &&
svn export --config-dir "$svnconf" "file://$PWD/simple-svn" simple-svnco
then
test_set_prereq SVNREPO
fi
'
test_dump simple t9135/svn.dump
test_expect_success SVNREPO 't9135/svn.dump' '
git init simple-git &&
test-svn-fe "$TEST_DIRECTORY/t9135/svn.dump" >simple.fe &&
(
cd simple-git &&
git fast-import <../simple.fe
) &&
(
cd simple-svnco &&
git init &&
git add . &&
git fetch ../simple-git master &&
git diff --exit-code FETCH_HEAD
)
'
test_done

View File

@ -6,6 +6,14 @@
test_description='git svn merge detection'
. ./lib-git-svn.sh
svn_ver="$(svn --version --quiet)"
case $svn_ver in
0.* | 1.[0-4].*)
skip_all="skipping git-svn test - SVN too old ($svn_ver)"
test_done
;;
esac
test_expect_success 'initialize source svn repo' '
svn_cmd mkdir -m x "$svnrepo"/trunk &&
svn_cmd mkdir -m x "$svnrepo"/branches &&

View File

@ -89,7 +89,8 @@ EOF
test_expect_success PERL 'update git module' '
(cd module-git &&
git cvsimport -a -R -z 0 module &&
git config cvsimport.trackRevisions true &&
git cvsimport -a -z 0 module &&
git merge origin
) &&
test_cmp module-cvs/o_fortuna module-git/o_fortuna
@ -117,7 +118,8 @@ test_expect_success PERL 'cvsimport.module config works' '
(cd module-git &&
git config cvsimport.module module &&
git cvsimport -a -R -z0 &&
git config cvsimport.trackRevisions true &&
git cvsimport -a -z0 &&
git merge origin
) &&
test_cmp module-cvs/tick module-git/tick
@ -137,6 +139,7 @@ test_expect_success PERL 'import from a CVS working tree' '
$CVS co -d import-from-wt module &&
(cd import-from-wt &&
git config cvsimport.trackRevisions false &&
git cvsimport -a -z0 &&
echo 1 >expect &&
git log -1 --pretty=format:%s%n >actual &&

View File

@ -1057,6 +1057,13 @@ case $(uname -s) in
# backslashes in pathspec are converted to '/'
# exec does not inherit the PID
test_set_prereq MINGW
test_set_prereq SED_STRIPS_CR
;;
*CYGWIN*)
test_set_prereq POSIXPERM
test_set_prereq EXECKEEPSPID
test_set_prereq NOT_MINGW
test_set_prereq SED_STRIPS_CR
;;
*)
test_set_prereq POSIXPERM

View File

@ -154,6 +154,7 @@ static const char *quote_crnl(const char *path)
/* FIXME: move prefix to startup_info struct and get rid of this arg */
void trace_repo_setup(const char *prefix)
{
const char *git_work_tree;
char cwd[PATH_MAX];
char *trace = getenv("GIT_TRACE");
@ -164,8 +165,14 @@ void trace_repo_setup(const char *prefix)
if (!getcwd(cwd, PATH_MAX))
die("Unable to get current working directory");
if (!(git_work_tree = get_git_work_tree()))
git_work_tree = "(null)";
if (!prefix)
prefix = "(null)";
trace_printf("setup: git_dir: %s\n", quote_crnl(get_git_dir()));
trace_printf("setup: worktree: %s\n", quote_crnl(get_git_work_tree()));
trace_printf("setup: worktree: %s\n", quote_crnl(git_work_tree));
trace_printf("setup: cwd: %s\n", quote_crnl(cwd));
trace_printf("setup: prefix: %s\n", quote_crnl(prefix));
}

View File

@ -61,6 +61,23 @@ PATTERNS("pascal",
"|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+"
"|<>|<=|>=|:=|\\.\\."
"|[^[:space:]]|[\x80-\xff]+"),
PATTERNS("perl",
"^[ \t]*package .*;\n"
"^[ \t]*sub .* \\{\n"
"^[A-Z]+ \\{\n" /* BEGIN, END, ... */
"^=head[0-9] ", /* POD */
/* -- */
"[[:alpha:]_'][[:alnum:]_']*"
"|0[xb]?[0-9a-fA-F_]*"
/* taking care not to interpret 3..5 as (3.)(.5) */
"|[0-9a-fA-F_]+(\\.[0-9a-fA-F_]+)?([eE][-+]?[0-9_]+)?"
"|=>|-[rwxoRWXOezsfdlpSugkbctTBMAC>]|~~|::"
"|&&=|\\|\\|=|//=|\\*\\*="
"|&&|\\|\\||//|\\+\\+|--|\\*\\*|\\.\\.\\.?"
"|[-+*/%.^&<>=!|]="
"|=~|!~"
"|<<|<>|<=>|>>"
"|[^[:space:]]"),
PATTERNS("php",
"^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
"^[\t ]*(class.*)$",

View File

@ -51,14 +51,14 @@ static struct {
} rev_ctx;
static struct {
uint32_t uuid, url;
uint32_t version, uuid, url;
} dump_ctx;
static struct {
uint32_t svn_log, svn_author, svn_date, svn_executable, svn_special, uuid,
revision_number, node_path, node_kind, node_action,
node_copyfrom_path, node_copyfrom_rev, text_content_length,
prop_content_length, content_length;
prop_content_length, content_length, svn_fs_dump_format_version;
} keys;
static void reset_node_ctx(char *fname)
@ -85,6 +85,7 @@ static void reset_rev_ctx(uint32_t revision)
static void reset_dump_ctx(uint32_t url)
{
dump_ctx.url = url;
dump_ctx.version = 1;
dump_ctx.uuid = ~0;
}
@ -105,6 +106,7 @@ static void init_keys(void)
keys.text_content_length = pool_intern("Text-content-length");
keys.prop_content_length = pool_intern("Prop-content-length");
keys.content_length = pool_intern("Content-length");
keys.svn_fs_dump_format_version = pool_intern("SVN-fs-dump-format-version");
}
static void read_props(void)
@ -206,7 +208,12 @@ void svndump_read(const char *url)
*val++ = '\0';
key = pool_intern(t);
if (key == keys.uuid) {
if (key == keys.svn_fs_dump_format_version) {
dump_ctx.version = atoi(val);
if (dump_ctx.version > 2)
die("expected svn dump format version <= 2, found %d",
dump_ctx.version);
} else if (key == keys.uuid) {
dump_ctx.uuid = pool_intern(val);
} else if (key == keys.revision_number) {
if (active_ctx == NODE_CTX)