The timestamp that follows "Last updated " is formatted differently
depending on the version of AsciiDoc. Looking at 4604fe56 on "html"
branch, you can see that AsciiDoc 7.0.2 used to give "02-Jul-2008 03:02:14
UTC" but AsciiDoc 8.2.5 gave "2008-09-19 06:33:25 UTC". We haven't been
correctly filtering out phantom changes that result from only the build
date for some time now, it seems.
Just filter lines that begin with "Last updated ".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The two functions defined here are implemented in help.c, so makes more sense
to put the definition of those in help.h instead of in builtin.h.
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
* jn/cherry-revert-message-clean-up:
tests: fix syntax error in "Use advise() for hints" test
cherry-pick/revert: Use advise() for hints
cherry-pick/revert: Use error() for failure message
Introduce advise() to print hints
Eliminate “Finished cherry-pick/revert” message
t3508: add check_head_differs_from() helper function and use it
revert: improve success message by adding abbreviated commit sha1
revert: don't print "Finished one cherry-pick." if commit failed
revert: refactor commit code into a new run_git_commit() function
revert: report success when using option --strategy
* en/d-f-conflict-fix:
merge-recursive: Avoid excessive output for and reprocessing of renames
merge-recursive: Fix multiple file rename across D/F conflict
t6031: Add a testcase covering multiple renames across a D/F conflict
merge-recursive: Fix typo
Mark tests that use symlinks as needing SYMLINKS prerequisite
t/t6035-merge-dir-to-symlink.sh: Remove TODO on passing test
fast-import: Improve robustness when D->F changes provided in wrong order
fast-export: Fix output order of D/F changes
merge_recursive: Fix renames across paths below D/F conflicts
merge-recursive: Fix D/F conflicts
Add a rename + D/F conflict testcase
Add additional testcases for D/F conflicts
Conflicts:
merge-recursive.c
* jn/svn-fe:
t/t9010-svn-fe.sh: add an +x bit to this test
t9010 (svn-fe): avoid symlinks in test
t9010 (svn-fe): use Unix-style path in URI
vcs-svn: Avoid %z in format string
vcs-svn: Rename dirent pool to build on Windows
compat: add strtok_r()
treap: style fix
vcs-svn: remove build artifacts on "make clean"
svn-fe manual: Clarify warning about deltas in dump files
Update svn-fe manual
SVN dump parser
Infrastructure to write revisions in fast-export format
Add stream helper library
Add string-specific memory pool
Add treap implementation
Add memory pool library
Introduce vcs-svn lib
* jn/paginate-fix:
t7006 (pager): add missing TTY prerequisites
merge-file: run setup_git_directory_gently() sooner
var: run setup_git_directory_gently() sooner
ls-remote: run setup_git_directory_gently() sooner
index-pack: run setup_git_directory_gently() sooner
config: run setup_git_directory_gently() sooner
bundle: run setup_git_directory_gently() sooner
apply: run setup_git_directory_gently() sooner
grep: run setup_git_directory_gently() sooner
shortlog: run setup_git_directory_gently() sooner
git wrapper: allow setup_git_directory_gently() be called earlier
setup: remember whether repository was found
git wrapper: introduce startup_info struct
Conflicts:
builtin/index-pack.c
* jn/maint-setup-fix:
setup: split off a function to handle ordinary .git directories
Revert "rehabilitate 'git index-pack' inside the object store"
setup: do not forget working dir from subdir of gitdir
t4111 (apply): refresh index before applying patches to it
setup: split off get_device_or_die helper
setup: split off a function to handle hitting ceiling in repo search
setup: split off code to handle stumbling upon a repository
setup: split off a function to checks working dir for .git file
setup: split off $GIT_DIR-set case from setup_git_directory_gently
tests: try git apply from subdir of toplevel
t1501 (rev-parse): clarify
Conflicts:
builtin/index-pack.c
The same pattern is used in many tests, and makes it easy for new ones to
rely on $HOME being a trashable, clean, directory.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change the test_create_repo code added in v1.2.2~6 to use a subshell
instead of keeping track of the old working directory and cd-ing back
when it's done.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When a test has no prerequisites satisfied (the usual case), instead
of "missing THING of THING", just say "missing THING". This does not
affect the output when a test is skipped due to a missing
prerequisites if another prerequisite is satisfied.
For example: instead of
ok 8 # skip notes work (missing EXPENSIVE of EXPENSIVE)
ok 9 # skip notes timing with /usr/bin/time (missing EXPENSIVE of USR_BIN_TIME,EXPENSIVE)
write
ok 8 # skip notes work (missing EXPENSIVE)
ok 9 # skip notes timing with /usr/bin/time (missing EXPENSIVE of USR_BIN_TIME,EXPENSIVE)
Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change the passing TODO test in t0000-basic.sh to run inside its own
test-lib.sh. The motivation is to have nothing out of the ordinary on
a normal test run for test smoking purposes.
If every normal test run has a passing TODO you're more likely to turn
a blind eye to it and not to investigate cases where things really are
passing unexpectedly.
It also makes the prove(1) output less noisy. Before:
All tests successful.
Test Summary Report
-------------------
./t0000-basic.sh (Wstat: 0 Tests: 46 Failed: 0)
TODO passed: 5
Files=484, Tests=6229, 143 wallclock secs ( 4.00 usr 4.15 sys + 104.77 cusr 351.57 csys = 464.49 CPU)
Result: PASS
And after:
All tests successful.
Files=484, Tests=6228, 139 wallclock secs ( 4.07 usr 4.25 sys + 104.54 cusr 350.85 csys = 463.71 CPU)
Result: PASS
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Tests that test the test-lib.sh itself need to be executed in the
dynamically created trash directory, so we can't assume
$TEST_DIRECTORY is ../ for those.
As a side benefit this change also makes it easy for us to move the
t/*.sh tests into subdirectories if we ever want to do that.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change code that used $TEST_DIRECTORY/.. to use $GIT_BUILD_DIR
instead, the two are equivalent, but the latter is easier to read.
This required moving the assignment od GIT_BUILD_DIR to earlier in the
test-lib.sh file.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Change the redundant calls to $(pwd) to use $TEST_DIRECTORY
instead. None of these were being executed after we cd'd somewhere
else so they weren't actually needed.
This also makes it easier to add support for overriding the test
library location and run tests in a different directory than t/.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Introduce a new variable $GIT_BUILD_DIR which can be used to locate
data that resides under the build directory, and use that instead.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Detect and report hard-to-notice spelling mistakes like
test_might_fail "git config --unset whatever"
(the extra quotes prevent the shell from running git as intended;
instead, the shell looks for a "git config --unset whatever" file).
Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Let test_might_fail say something about its failures for consistency
with test_must_fail.
Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Extend remove_note() in the notes API to return whether or not a note was
actually removed. Use this in 'git notes remove' to skip the creation of
a notes commit when no notes were actually removed.
Also add a test illustrating the change in behavior.
Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Modify handling of the 'core.askpass' option so that it has the same effect as
GIT_ASKPASS also if SSH_ASKPASS is set.
Signed-off-by: Knut Franke <k.franke@science-computing.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Setting this option has the same effect as setting the environment variable
'GIT_ASKPASS'.
Signed-off-by: Knut Franke <k.franke@science-computing.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The point of it is to run a command that produces failure. A
missing command is more likely an error in the test script
(e.g., using 'test_must_fail "command with arguments"', or
relying on a missing command).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Because test_must_fail fails when a command succeeds, the
command frequently does not produce any output (since, after
all, it thought it was succeeding). So let's have
test_must_fail itself report that a problem occurred.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This fixes an XML error when visiting a nonexistent tag
(i.e. "../gitweb.cgi?p=git.git;a=tag;h=refs/tags/BADNAME").
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some tests in detached-stash are calling test_must_fail
in such a way that the arguments to test_must_fail do, indeed, fail
but not in the manner expected by the test.
This patch removes the unnecessary and unhelpful double quotes.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Some tests in maint-reflog-beyond-horizon are calling test_must_fail
in such a way that the arguments to test_must_fail do, indeed, fail
but not in the manner expected by the test.
This patch removes the unnecessary and unhelpful double quotes.
Signed-off-by: Jon Seymour <jon.seymour@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
For "git status" and the diff family the submodule.*.ignore settings from
.git/config and .gitmodules can be used to override the default set via
diff.ignoreSubmodules on a per-submodule basis. Let's do this consistently
and teach checkout to use these settings too.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
While at it, document that checkout uses this flag too in the Documentation.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We can be clever and know by ourselves when we need the behavior
implied by "--remap-to-ancestor". No need to encumber users by having
them exposed to it as a tunable. (Option kept for backward compatibility,
but it's now a no-op.)
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle command silently died with no sign of failure if it
could not create the bundle file. (Eg.: its path resovles to a directory,
or the parent dir is sticky while file already exists and is owned
by someone else.)
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When objectname:short was introduced, it forgot to copy the result of
find_unique_abbrev. Because the result of find_unique_abbrev is a
pointer to static buffer, this resulted in the same value being
substituted in for each ref.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/regexec.c had a weird combination of function declaration in ANSI
style and function definition in K&R style, for example:
static unsigned
re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
int nregs, int regs_allocated) internal_function;
static unsigned
re_copy_regs (regs, pmatch, nregs, regs_allocated)
struct re_registers *regs;
regmatch_t *pmatch;
int nregs, regs_allocated;
{ ... }
with this #define:
#ifndef _LIBC
# ifdef __i386__
# define internal_function __attribute ((regparm (3), stdcall))
# else
# define internal_function
# endif
#endif
The original version as shown above was fine, but with the ANSIfied
function definition and in the case where internal_function is not empty,
gcc identifies the declaration and definition as different and bails out.
Adding internal_function to the definition doesn't help (it results in
a syntax error); hence, remove it from the subset of declarations that gcc
flags as erroneous.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
There was a code comment that referred to the "above two functions" but
over time the functions immediately preceding the comment have changed.
Just mention the relevant functions by name.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When 'git fetch' is supplied a single argument, it tries to match it
against a configured remote and then fetch the refs specified by the
named remote's fetchspec. Additionally, or alternatively, if the current
branch has a merge ref configured, and if the name of the remote supplied
to fetch matches the one in the branch's configuration, then git also adds
the merge ref to the list of refs to update.
If the argument to fetch does not specify a named remote, or if the name
supplied does not match the remote configured for the current branch, then
the current branch's merge configuration should not be considered.
git currently mishandles the case when the argument to fetch specifies a
GIT URL(i.e. not a named remote) and the current branch has a configured
merge ref. In this case, fetch should ignore the branch's merge ref and
attempt to fetch from the remote repository's HEAD branch. But, since
fetch only checks _whether_ the current branch has a merge ref configured,
and does _not_ check whether the branch's configured remote matches the
command line argument (until later), it will mistakenly enter the wrong
branch of an 'if' statement and will not fall back to fetch the HEAD branch.
The fetch ends up doing nothing and returns with a successful zero status.
Fix this by comparing the remote repository's name to the branch's remote
name, in addition to whether it has a configured merge ref, sooner, so that
fetch can correctly decide whether the branch's configuration is interesting
or not, and fall back to fetching from the remote's HEAD branch when
appropriate.
This fixes the test in t5510.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When 'git fetch' is supplied just a repository URL (not a remote name),
and without a fetch refspec, it should fetch from the remote HEAD branch
and update FETCH_HEAD with the fetched ref. Currently, when 'git fetch'
is called like this, it fails to retrieve anything, and does not update
FETCH_HEAD, if the current checked-out branch has a configured merge ref.
i.e. this fetch fails to retrieve anything nor update FETCH_HEAD:
git checkout master
git config branch.master.merge refs/heads/master
git fetch git://git.kernel.org/pub/scm/git/git.git
but this one does:
git config --unset branch.master.merge
git fetch git://git.kernel.org/pub/scm/git/git.git
Add a test to demonstrate this flaw.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When 'git checkout' reports uncommitted changes, it also does so for
submodules.
The default mode is now to look really hard into submodules, not only
for different commits, but also for modified files. Since this can be
pretty expensive when there are a lot (and large) submodules, there is
the diff.ignoreSubmodules option.
Let's respect that setting when 'git checkout' reports the uncommitted
changes, since it does nothing else than a 'git diff --name-status'.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>