Subversion ignores all blank lines in svn:ignore properties. The old
git-svn code ignored blank lines everywhere except for the first line
of the svn:ignore property. This patch makes the "git svn
show-ignore" and "git svn create-ignore" commands ignore leading blank
lines, too.
Also include leading blank lines in the test suite.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Acked-by: Eric Wong <normalperson@yhbt.net>
Most users who type
git svn init file:///tmp/repo --prefix=my-svn/
would expect the root of the svn repository to be tracked by
refs/remotes/my-svn/git-svn.
Acked-by: Eric Wong <normalperson@yhbt.net>
It was probably intended for the test to fail unless all of the
commands succeed.
[ew: fixed tests to actually work]
Signed-off-by: Eric Wong <normalperson@yhbt.net>
This is useful if you want to specify GIT_TEST_OPTS that you
always use.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The tests generate a large amount of I/O activity creating
and destroying repositories and files. We can improve the
time it takes to run the test suite by creating trash
directories on filesystems with better performance
characteristic, even though we may not want the rest of the
git repository on those filesystems (e.g., because they are
not network connected, or because they are temporary
ramdisks).
For example, on a dual processor system:
$ cd t && time make -j32
real 1m51.562s
user 0m59.260s
sys 1m20.933s
# /dev/shm is tmpfs
$ cd t && time make -j32 GIT_TEST_OPTS="--root=/dev/shm"
real 1m1.484s
user 0m53.555s
sys 1m5.264s
We almost halve the wall clock time, and we utilize the
dual processors much better.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Most scripts don't care about the absolute path to the trash
directory. The one exception was t4014 script, which pieced
together $TEST_DIRECTORY and $test itself to get an absolute
directory.
Instead, let's provide a $TRASH_DIRECTORY which specifies
the same thing. This keeps the $test variable internal to
test-lib.sh and paves the way for trash directories in other
locations.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The $TEST_DIRECTORY variable allows tests to find the
top-level test directory regardless of the current working
directory.
In the past, this has been used to accomodate tests which
change directories, but it is also the first step to being
able to move trash directories outside of the
$TEST_DIRECTORY hierarchy.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The test for correct permissions after init created a deep directory
must be guarded by POSIXPERM. But testing that the deep dirctory exists
is good even on platforms that do not provide the POSIXPERM prerequiste.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Without this change, grep fails because it does not find the file
instead of because it does not find the text in the file.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When making a histogram of delta chain length in the pack, the program
collects number of objects whose delta depth exceeds the MAX_CHAIN limit
in histogram[0], and showed it as the number of items that exceeds the
limit correctly. HOWEVER, it also showed the same number labeled as
"chain length = 0".
In fact, we are not showing the number of objects whose chain length is
zero, i.e. the base objects. Correct this.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The test ignored the exit status from verify pack command, and also relied
on not seeing any delta chain statistics.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If we find no refs that may be used for git-describe with the current
options, then die early instead of pointlessly walking the whole
history.
In git.git with all the tags dropped, this makes "git describe" go down
from 0.244 to 0.003 seconds for me. This is especially noticeable with
"git submodule status" which calls describe with increasing levels of
allowed refs to be matched. For a submodule without tags, this means
that it walks the whole history in the submodule twice (first annotated,
then plain tags), just to find out that it can't describe the commit
anyway.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Previous version expose the output of the plumbing update-index to the
user, which novice users have difficulty to understand.
We still need to run update-index to refresh the cache (if
diff.autorefreshindex is false, git diff won't do it).
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Explain briefly what characters are prohibited in tag <name>
and point to git-check-ref-format(1) manual page for
further information.
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
If one thinks of a revision as the set of commits which can be reached
from the rev, and of ^rev as the complement, then multiple arguments to
git rev-list can be neither understood as the intersection nor the union
of the individual sets.
But set language is the natural as well as logical language in which to
phrase this. So, add a paragraph which explains multiple arguments using
set language.
Suggested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sb/parse-options:
prune-packed: migrate to parse-options
verify-pack: migrate to parse-options
verify-tag: migrate to parse-options
write-tree: migrate to parse-options
The option --merge was missing for submodule update and --cached for
submodule summary.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Currently, the documentation suggests that 'git merge-base -a' and 'git
show-branch --merge-base' are equivalent (in fact it claims that the
former cannot handle more than two revs).
Alas, the handling of more than two revs is very different. Document
this by tests and correct the documentation to reflect this.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Make sure that usage strings and documentation coincide with each other
and with the actual code.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
...so that it is easier to reuse it for other tests.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Importing the popen2 module in Python-2.6 results in the
"DeprecationWarning: The popen2 module is deprecated. Use the
subprocess module." message. The module itself isn't used in fact, so
just removing it solves the problem.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Equality between file_parent and file_name was being checked without a
preliminary check for existence of the parameters.
Fix by wrapping the equality check in appropriate if (defined ...),
rearranging the lines to prevent excessive length.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
With extra fixes from Thadeu and Carlos as well.
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The current documentation states that servers typically listen on port
465 and calls this "ssmtp". While it's true that many mail servers use
port 465 for SSL smtp, this is non-standard, and hails from the days
before smtp and submission TLS support, that arrived in RFC2487 and
RFC3207. Port 465 is actually assigned by IANA for unrelated purposes,
and is mostly still used by mail servers today only to support Outlook
Express.
In any case, this patch helps the documentation better reflect both
standards and reality, while still helpfully mentioning ports numbers
that a user may wish to specify.
Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The current documentation confuses non-standard SSL smtp port 465 with
submission port 587 (RFC 4406). This patch just changes the referenced
number.
Signed-off-by: Wesley J. Landaker <wjl@icecavern.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Configuration values are expected to be quoted when they have leading or
trailing whitespace, but inner whitespace should be kept verbatim even if
the value is not quoted. This is already documented in git-config(1), but
the code caused inner whitespace to be collapsed to a single space,
breaking, for example, clones from a path that has two consecutive spaces
in it, as future fetches would only see a single space.
Reported-by: John te Bokkel <tanj.tanj@gmail.com>
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When using git fast-export and git fast-import to rewrite the history
of a repository with large binary files, almost all of the time is
spent dealing with blobs. This is extremely inefficient if all we want
to do is rewrite the commits and tree structure. --no-data skips the
output of blobs and writes SHA-1s instead of marks, which provides a
massive speedup.
Signed-off-by: Geoffrey Irving <irving@naml.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
It is usually better to have positive options, to avoid confusing double
negations. However, sometimes it is desirable to show the negative option
in the help.
Introduce the flag PARSE_OPT_NEGHELP to do that.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>