Commit graph

22773 commits

Author SHA1 Message Date
Ævar Arnfjörð Bjarmason f0e5a4b7f3 git add: Add --ignore-missing to SYNOPSIS
All the git add options were listed in the synopsis until the
--ignore-missing option was added. Change that so that the git add
documentation now has the complete listing.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:11:46 -07:00
Ævar Arnfjörð Bjarmason 1f74574ba2 git submodule add: Remove old docs about implicit -f
git submodule add no longer implicitly adds with --force. Remove
references to the old functionality in the documentation.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:11:07 -07:00
Jens Lehmann d27b876b28 git submodule add: Require the new --force option to add ignored paths
To make the behavior of "git submodule add" more consistent with "git add"
ignored submodule paths should not be silently added when they match an
entry in a .gitignore file. To be able to override that default behavior
in the same way as we can do that for "git add", the new option "--force"
is introduced.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 11:10:43 -07:00
Junio C Hamano 8fbe9b32ce Merge branch 'jl/add-n-ignore-missing'
* jl/add-n-ignore-missing:
  git add: Add the "--ignore-missing" option for the dry run
2010-07-19 11:09:38 -07:00
David Aguilar d1cc4621ed Documentation: Explain git-mergetool's use of temporary files
'git mergetool' creates '*.orig' backup files in its
default configuration.  Mention this in its documentation.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-19 09:16:09 -07:00
Sergey Vlasov 8ac3a66702 git-svn: write memoized data explicitly to avoid Storable bug
Apparently using the Storable module during global destruction is
unsafe - there is a bug which can cause segmentation faults:

  http://rt.cpan.org/Public/Bug/Display.html?id=36087
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482355

The persistent memoization support introduced in commit 8bff7c538
relied on global destruction to write cached data, which was leading
to segfaults in some Perl configurations.  Calling Memoize::unmemoize
in the END block forces the cache writeout to be performed earlier,
thus avoiding the bug.

Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-07-19 06:31:04 +00:00
Junio C Hamano 24e7a5be37 Merge branch 'jc/diff-merge-base-multi'
* jc/diff-merge-base-multi:
  diff A...B: do not limit the syntax too narrowly
2010-07-16 15:45:35 -07:00
Thomas Rast 7ea3ddf818 Only run aggregate-results over actual counts
The current make target 'aggregate-results' scanned all files matching
test-results/t*-*.  Normally these are only the test counts (and the
exit values, which are ignored), but with --tee the suite also dumps
all output.  Furthermore, with --verbose t1450 contains several lines
starting with "broken link from ..." which matches the criteria used
by aggregate-results.sh.

Rename the counts output files to *.counts, and only scan those.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16 13:25:01 -07:00
Jonathan Nieder e605164d1d Add a sample user for the svndump library
The svn-fe tool takes a Subversion dump file as input and produces
a fast-import stream as output.  This can be useful as a low-level
tool in building other importers, or for debugging the vcs-svn
library.

 make svn-fe
 make svn-fe.1

to test.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-16 13:21:47 -07:00
Junio C Hamano 7a0e4d7c39 diff A...B: do not limit the syntax too narrowly
Earlier we tried to make sure that the trees we get are what A...B
syntax produced, by checking that earlier ones are all marked
uninteresting (which has to be true as they are merge bases),
there are two remaining ones that are interesting, and they are
marked as non-symmetric-left and symmetric-left respectively.

The "the last two must be interesting" condition is however wrong when one
is an ancestor of the other between A and B (i.e. fast-forward).  In such
a case, one of them is marked uninteresting.
2010-07-16 12:08:27 -07:00
Junio C Hamano 53b304224a Merge branch 'jn/paginate-fix'
* jn/paginate-fix:
  git --paginate: paginate external commands again
  git --paginate: do not commit pager choice too early
  tests: local config file should be honored from subdirs of toplevel
  t7006: test pager configuration for several git commands
  t7006 (pager): introduce helper for parameterized tests

Conflicts:
	t/t7006-pager.sh
2010-07-15 12:09:14 -07:00
Junio C Hamano ea56a7ed97 Merge branch 'wp/merge-tree-fix'
* wp/merge-tree-fix:
  merge-tree: fix where two branches share no changes
  add basic tests for merge-tree
2010-07-15 12:08:41 -07:00
Junio C Hamano 4bd874c8f3 Merge branch 'js/merge-rr-fix'
* js/merge-rr-fix:
  MERGE_RR is in .git, not .git/rr-cache
2010-07-15 12:08:36 -07:00
Junio C Hamano 4cd1b99c32 Merge branch 'jc/diff-merge-base-multi'
* jc/diff-merge-base-multi:
  diff A...B: give one possible diff when there are more than one merge-base
2010-07-15 12:08:25 -07:00
Junio C Hamano a8b7fcffdd Merge branch 'ns/merge-recursive-uptodate'
* ns/merge-recursive-uptodate:
  merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency
2010-07-15 12:08:11 -07:00
Junio C Hamano c257bbb559 Merge branch 'jn/tests'
* jn/tests:
  t3000 (ls-files -o): modernize style
2010-07-15 12:08:04 -07:00
Junio C Hamano 90a0f1b44b Merge branch 'eb/doc-log-manpage'
* eb/doc-log-manpage:
  Reorganize `git-log' man page to clarify common diff options.
2010-07-15 12:07:56 -07:00
Junio C Hamano a7d7853463 Merge branch 'jn/grep-open'
* jn/grep-open:
  grep -O: Do not pass color sequences as filenames to pager
2010-07-15 12:07:18 -07:00
Junio C Hamano cb597adb5c Merge branch 'mg/revision-doc'
* mg/revision-doc:
  Documentation: link to gitrevisions rather than git-rev-parse
  Documentation: gitrevisions
  Documentation: split off rev doc into include file
2010-07-15 12:07:01 -07:00
Junio C Hamano bff6e86b3d Merge branch 'jk/maint-status-keep-index-timestamp'
* jk/maint-status-keep-index-timestamp:
  do not write out index when status does not have to
2010-07-15 12:06:55 -07:00
Junio C Hamano 754e66b7a0 Merge branch 'jc/rebase-i-commit-msg-fix'
* jc/rebase-i-commit-msg-fix:
  rebase-i: do not get fooled by a log message ending with backslash
  rebase-i: style fix
2010-07-15 12:06:48 -07:00
Junio C Hamano 849865733f Merge branch 'ab/submodule-add-f'
* ab/submodule-add-f:
  git submodule: add submodules with git add -f <path>
2010-07-15 12:06:25 -07:00
Junio C Hamano aa57328d60 Merge branch 'bc/maint-makefile-fixes'
* bc/maint-makefile-fixes:
  Makefile: work around ksh's failure to handle missing list argument to for loop
  Makefile: remove some unnecessary curly braces
2010-07-15 12:06:11 -07:00
Junio C Hamano c255a70b5e Merge branch 'maint'
* maint:
  Documentation: add submodule.* to the big configuration variable list
  gitmodules.5: url can be a relative path
  gitweb: fix esc_url
2010-07-15 12:04:32 -07:00
Jonathan Nieder 0ad0a61f05 Documentation: add submodule.* to the big configuration variable list
The url, path, and the update items in [submodule "foo"] stanzas
are nicely explained in the .gitmodules and ‘git submodule’
documentation.  Point there from the config documentation.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15 12:00:50 -07:00
Jonathan Nieder 47dc5d5fda gitmodules.5: url can be a relative path
There is already excellent documentation for this facility in
git-submodule.1, but it is not so discoverable.

Relative paths in .gitmodules can be useful for serving the
same repository over multiple protocols, for example.
Thanks to Peter for pointing this out.

Cc: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Johan Herland <johan@herland.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15 11:59:57 -07:00
Pavan Kumar Sunkara 109988f2cb gitweb: fix esc_url
Earlier, 452e225 (gitweb: fix esc_param, 2009-10-13) fixed CGI escaping
rules used in esc_url.  A very similar logic exists in esc_param and needs
to be fixed the same way.

Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-15 11:59:37 -07:00
Jonathan Nieder 030149a4dc git --paginate: paginate external commands again
73e25e7c (git --paginate: do not commit pager choice too early,
2010-06-26) failed to take some cases into account.

1b. Builtins that do not use RUN_SETUP (like git config) do
    not find GIT_DIR set correctly when the pager is launched
    from run_builtin().  So the core.pager configuration is
    not honored from subdirectories of the toplevel for them.

4a. External git commands (like git request-pull) relied on the
    early pager launch to take care of handling the -p option.
    Ever since 73e25e7c, they do not honor the -p option at all.

4b. Commands invoked through ! aliases (like ls) were also relying
    on the early pager launch.

Fix (4a) by launching the pager (if requested) before running such a
“dashed external”.  For simplicity, this still does not search for a
.git directory before running the external command; when run from a
subdirectory of the toplevel, therefore, the “[core] pager”
configuration is still not honored.

Fix (4b) by launching pager if requested before carrying out such an
alias.  Actually doing this has no effect, since the pager (if any)
would have already been launched in a failed attempt to try a
dashed external first.  The choice-of-pager-not-honored-from-
subdirectory bug still applies here, too.

(1b) is not a regression.  There is no need to fix it yet.

Noticed by Junio.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 16:07:34 -07:00
Jay Soffian 3ca399d40a MERGE_RR is in .git, not .git/rr-cache
0af0ac7 (Move MERGE_RR from .git/rr-cache/ into .git/) moved the
location of MERGE_RR but I found a few references to the old
location.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 13:04:25 -07:00
Will Palmer 21baa6e0c5 merge-tree: fix where two branches share no changes
15b4f7a (merge-tree: use ll_merge() not xdl_merge(), 2010-01-16)
introduced a regression to merge-tree to cause it to segfault when merging
files which existed in one branch, but not in the other or in the
merge-base. This was caused by referencing entry->path at a time when
entry was known to be possibly-NULL.

To correct the problem, we save the path of the entry we came in with,
as the path should be the same among all the stages no matter which
sides are involved in the merge.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 12:56:49 -07:00
Will Palmer f32e9852d4 add basic tests for merge-tree
merge-tree had no test cases, so here we add some very basic tests for
it, including some known-breakages.

[jc: with obvious/trivial fixups]

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 12:55:15 -07:00
Junio C Hamano fc051572a3 Git 1.7.2-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 09:42:24 -07:00
Junio C Hamano c9a9766328 Merge branch 'jc/read-tree-cache-tree-fix'
* jc/read-tree-cache-tree-fix:
  Fix "read-tree -m A B" priming the cache-tree
2010-07-14 09:34:23 -07:00
Raja R Harinath c7d1d1b132 Use dev_t for device id (st_dev) from stat in setup_git_directory_gently()
The original declaration was int, which seems to cause trouble on my
machine.  It causes spurious "filesystem boundary" errors when running
the testsuite.  The cause seems to be

  $ stat -c%d .
  2147549952

which is too large for a 32-bit int type.

Using the correct type, dev_t, solves the issue.  (Because I'm
paranoid and forgetful, I checked -- yes, Unix v7 had dev_t.)

Other uses of st_dev seem to be reasonably safe.   fill_stat_cache_info
truncates it to an 'unsigned int', but that value seems to be used only
to validate the cache, and only if USE_STDEV is defined.

Signed-off-by: Raja R Harinath <harinath@hurrynot.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-14 07:57:08 -07:00
Junio C Hamano c008c0ff20 diff A...B: give one possible diff when there are more than one merge-base
We instead showed a combined diff that explains one of the randomly
chosen merge-base as if it were the result of merging all the other
merge bases and two tips given, which made no sense at all.

An alternative is to simply fail such a request, telling the user that
there are criss-cross merges, but it wouldn't be so helpful.

Noticed by James Pickens.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13 13:53:20 -07:00
Junio C Hamano 449aeb10d5 Merge branch 'maint'
* maint:
  git fetch documentation: describe short '-p' synonym to '--prune' option
  format-patch: document the format.to configuration setting
2010-07-13 09:14:35 -07:00
Oren Held 1b79d1c2a8 git fetch documentation: describe short '-p' synonym to '--prune' option
It's already implemented, just undocumented.

Signed-off-by: Oren Held <orenhe@il.ibm.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13 09:13:34 -07:00
Miklos Vajna 312a30eb5d format-patch: document the format.to configuration setting
[jc: with simplification from Jonathan Nieder]

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-13 09:02:59 -07:00
Jens Lehmann 108da0db12 git add: Add the "--ignore-missing" option for the dry run
Sometimes it is useful to know if a file or directory will be ignored
before it is added to the work tree. An example is "git submodule add",
where it would be really nice to be able to fail with an appropriate
error message before the submodule is cloned and checked out.

Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-12 15:13:54 -07:00
Michael J Gruber 637ab29b86 test-lib: TAP compliance for skipping tests on request
Make the output TAP compliant for tests skipped on request (GIT_SKIP_TESTS).

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-12 07:53:08 -07:00
Michael J Gruber 47e67d479b test-lib: simplify GIT_SKIP_TESTS loop
04ece59 (GIT_SKIP_TESTS: allow users to omit tests that are known to break, 2006-12-28)
introduced GIT_SKIP_TESTS, and since then we have had two nested loops
iterating over GIT_SKIP_TESTS with the same loop variable.

Reduce this to one loop.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-12 07:52:52 -07:00
Junio C Hamano 609eb9f7ff Merge branch 'maint'
* maint:
  Documentation: Spelling fix in protocol-capabilities.txt
  checkout: accord documentation to what git does
  t0005: work around strange $? in ksh when program terminated by a signal
2010-07-11 23:47:29 -07:00
Jonathan Nieder bcefed419a t3000 (ls-files -o): modernize style
This script is part of the second batch of tests, from the same day
the test infrastructure was added to git.  Update it to use a more
modern style in the spirit of v1.6.4-rc0~45^2~2 (2009-05-22).
In particular:

 - Put setup code inside test assertions, to avoid unexpected
   breakages and avoid stray output without -v (as t/README
   recommends); and

 - Put the test title on the same line as the "test_expect_success",
   and end the line with a single-quote to begin the body of the test
   which is one multi-line string.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-11 23:14:17 -07:00
Heiko Voigt b963d11827 git-gui: fix usage of themed widgets variable
There was one forgotten global so NS was not visible to the method
which resulted in an error.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
2010-07-10 23:41:54 +01:00
Pat Thoyts 13a3d637b2 git-gui: Handle failure of core.worktree to identify the working directory.
Commit 21985a11 'git-gui: handle non-standard worktree locations' attempts
to use either GIT_WORK_TREE or core.worktree to set the _gitworktree
variable but these may not be set which leads to a failure to launch
gitk to review history. Use _gitdir to set the location for a standard
git layout where the parent of the .git directory is the working tree.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-07-10 23:40:59 +01:00
Fredrik Skolmli 5d1e34158a Documentation: Spelling fix in protocol-capabilities.txt
Signed-off-by: Fredrik Skolmli <fredrik@frsk.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09 17:36:28 -07:00
Nicolas Sebrecht 5e5ffa091b merge-recursive: use "up-to-date" instead of "uptodate" in error message for consistency
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09 16:28:46 -07:00
Nicolas Sebrecht 142183d096 checkout: accord documentation to what git does
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09 16:28:21 -07:00
Johannes Sixt 0e418e568f t0005: work around strange $? in ksh when program terminated by a signal
ksh93 is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells (ksh's behavior is still POSIX compliant in this regard).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-07-09 16:27:31 -07:00
Junio C Hamano 037c43c68e Merge remote branch 'ko/master' into jc/read-tree-cache-tree-fix
* ko/master: (2325 commits)
  Git 1.7.2-rc2
  backmerge a few more fixes to 1.7.1.X series
  fix git branch -m in presence of cross devices
  t/t0006: specify timezone as EST5 not EST to comply with POSIX
  add missing && to submodule-merge testcase
  t/README: document more test helpers
  test-date: fix sscanf type conversion
  xdiff: optimise for no whitespace difference when ignoring whitespace.
  gitweb: Move evaluate_gitweb_config out of run_request
  parse_date: fix signedness in timezone calculation
  t0006: test timezone parsing
  rerere.txt: Document forget subcommand
  t/README: proposed rewording...
  t/README: Document the do's and don'ts of tests
  t/README: Add a section about skipping tests
  t/README: Document test_expect_code
  t/README: Document test_external*
  t/README: Document the prereq functions, and 3-arg test_*
  t/README: Typo: paralell -> parallel
  t/README: The trash is in 't/trash directory.$name'
  ...

Conflicts:
	builtin-read-tree.c
2010-07-08 18:55:50 -07:00