Commit graph

18319 commits

Author SHA1 Message Date
Chris Johnsen dad3211503 Documentation: asciidoc.conf: always use <literallayout> for [blocktext]
Make the docbook-xsl-no-raw-roff variant match the
no-docbook-xsl-no-raw-roff variant in terms of which XML tag is
used to wrap listing block text (delimited with lines of dashes).

e920b56 (Tweak asciidoc output to work with broken docbook-xsl,
2006-03-05) says docbook-xsl 1.68 needs <literallayout>. This
<screen> usages was in the old, 1.72-only section. But since it
is now the "roff-less" section, it probably makes sense to make it
symmetric with the "roff-ful" section.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen 34c800b8fc Documentation: move "spurious .sp" code into manpage-base.xsl
The "spurious .sp" code should be independent of docbook-xsl
versions.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen 9d8d13a8c5 Documentation: move quieting params into manpage-base.xsl
Move a couple of XSL parameters that act to silence
informational/warning messages generated when running xmlto from
manpage-1.72.xsl to manpage-base.xsl.

Since unused parameters are silently ignored, there is no problem
if some version of docbook-xsl does not know about these
parameters. The only problem might be if a version of docbook-xsl
uses the parameters for alternate functionality. Since both
parameters have fairly specific names such a situation is
unlikely.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen 8fa2b45f3a Documentation: rename docbook-xsl-172 attribute to git-asciidoc-no-roff
It seems that the ability to use raw roff codes in asciidoc.conf
was eliminated by docbook-xsl 1.72.0 _and later_. Unlike the
1.72.0-specific XSLT problem, this behavior was not reverted in
later releases.

This patch aims to make it clear that the affected asciidoc
attribute (flag) can be reasonably used with docbook-xsl versions
other than 1.72.0.

Also, document which make variables should be set for various
versions of asciidoc and docbook-xsl.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen ae8d09b8fa Documentation: use parametrized manpage-base.xsl with manpage-{1.72,normal}.xsl
Parametrize the backslash and dot characters that are used to
generate roff control sequences in manpage-base.xsl.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen c30e948523 Documentation: move callouts.xsl to manpage-{base,normal}.xsl
Each of manpage-base.xsl and manpage-normal.xsl gets a copy of
the contents of callouts.xsl and the original is removed. The
Makefile is adjusted to refer to manpage-normal.xsl instead of
callouts.xsl. manpage-base.xsl will be later made into a common
base for -normal and -1.72.

Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:33:19 -07:00
Chris Johnsen c6a5ad21e5 Documentation/Makefile: break up texi pipeline
Most shells define the exit value of a pipeline as the exit value
of the last process. For each texi rule, run the DOCBOOK2X_TEXI
tool and the "fixup" script in their own non-pipeline commands so
that make will notice an error exit code.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:29:39 -07:00
Chris Johnsen bb2300976b Documentation/Makefile: make most operations "quiet"
This adapts the "quiet make" implementation from the main
Makefile.

Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-27 00:28:51 -07:00
Junio C Hamano 9856dd811e Merge branch 'db/push-cleanup'
* db/push-cleanup:
  builtin-send-pack.c: avoid empty structure initialization
2009-03-26 21:01:44 -07:00
Brandon Casey 6828f72ffe builtin-send-pack.c: avoid empty structure initialization
The IRIX6.5 MIPSpro Compiler doesn't like it.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-26 21:01:34 -07:00
Wincent Colaiuta 9fe00538c6 Grammar fix for "git merge" man page
As spotted by the eagle eyes of Jeff King.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-26 09:38:58 -07:00
Junio C Hamano eed1fcd76d Merge branch 'maint'
* maint:
  documentation: update cvsimport description of "-r" for recent clone
2009-03-26 00:29:05 -07:00
Junio C Hamano f23336f5c1 Merge branch 'db/push-cleanup'
* db/push-cleanup:
  Move push matching and reporting logic into transport.c
  Use a common function to get the pretty name of refs

Conflicts:
	transport.c
2009-03-26 00:28:46 -07:00
Junio C Hamano 3fcee259d0 Merge branch 'jc/maint-1.6.0-blame-s'
* jc/maint-1.6.0-blame-s:
  blame: read custom grafts given by -S before calling setup_revisions()

Conflicts:
	builtin-blame.c
2009-03-26 00:28:22 -07:00
Junio C Hamano 6422c6af38 Merge branch 'mg/http-auth'
* mg/http-auth:
  http-push.c: use a faux remote to pass to http_init
  Do not name "repo" struct "remote" in push_http.c
  http.c: CURLOPT_NETRC_OPTIONAL is not available in ancient versions of cURL
  http authentication via prompts
  http_init(): Fix config file parsing
  http.c: style cleanups

Conflicts:
	http-push.c
2009-03-26 00:27:59 -07:00
Junio C Hamano f504fa2acb Merge branch 'jk/reflog-date'
* jk/reflog-date:
  make oneline reflog dates more consistent with multiline format
2009-03-26 00:27:37 -07:00
Junio C Hamano 6ba8b079cb Merge branch 'jc/attributes-checkout'
* jc/attributes-checkout:
  Add a test for checking whether gitattributes is honored by checkout.
  Read attributes from the index that is being checked out
2009-03-26 00:27:33 -07:00
Junio C Hamano b71fdc590d Merge branch 'js/maint-diff-temp-smudge'
* js/maint-diff-temp-smudge:
  Smudge the files fed to external diff and textconv
2009-03-26 00:27:30 -07:00
Junio C Hamano b2aa958dc2 Merge branch 'js/maint-1.6.0-exec-path-env'
* js/maint-1.6.0-exec-path-env:
  Propagate --exec-path setting to external commands via GIT_EXEC_PATH
2009-03-26 00:27:03 -07:00
Junio C Hamano 23fd723c9d Merge branch 'bc/maint-1.6.1-branch-deleted-was'
* bc/maint-1.6.1-branch-deleted-was:
  git-branch: display "was sha1" on branch deletion rather than just "sha1"

Conflicts:
	builtin-branch.c
2009-03-26 00:26:47 -07:00
Junio C Hamano 2545c089e3 Merge branch 'fg/push-default'
* fg/push-default:
  builtin-push.c: Fix typo: "anythig" -> "anything"
  Display warning for default git push with no push.default config
  New config push.default to decide default behavior for push

Conflicts:
	Documentation/config.txt
2009-03-26 00:26:25 -07:00
Junio C Hamano 0b3035fe15 Merge branch 'dm/maint-docco'
* dm/maint-docco:
  Documentation: Remove spurious uses of "you" in git-bisect.txt.
  Documentation: minor grammatical fix in git-check-ref-format.txt
  Documentation: minor grammatical fixes in git-check-attr.txt
  Documentation: minor grammatical fixes in git-cat-file.txt
  Documentation: minor grammatical fixes and rewording in git-bundle.txt
  Documentation: remove some uses of the passive voice in git-bisect.txt
2009-03-26 00:26:04 -07:00
Carlo Marcelo Arenas Belon a8fac795dd documentation: update cvsimport description of "-r" for recent clone
the "--use-separate-remote" option no longer exists, having since
become the default for a clone.

Signed-off-by: Carlo Marcelo Arenas Belon <carenas@sajinet.com.pe>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-26 00:24:26 -07:00
Elijah Newren ebeec7dbc5 fast-export: Avoid dropping files from commits
When exporting a subset of commits on a branch that do not go back to a
root commit (e.g. master~2..master), we still want each exported commit to
have the same files in the exported tree as in the original tree.

Previously, when given such a range, we would omit master~2 as a parent of
master~1, but we would still diff against master~2 when selecting the list
of files to include in master~1.  This would result in only files that
had changed in the given range showing up in the resulting export.  In such
cases, we should diff master~1 against the root instead (i.e. use
diff_root_tree_sha1 instead of diff_tree_sha1).

There's a special case to consider here: incremental exports (i.e. exports
where the --import-marks flag is specified).  If master~2 is an imported
mark, then we still want to diff master~1 against master~2 when selecting
the list of files to include.

We can handle all cases, including the special case, by just checking
whether master~2 corresponds to a known object mark when deciding what to
diff against.

Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 22:53:45 -07:00
David J. Mellor 19fa5e8c4d Documentation: Remove spurious uses of "you" in git-bisect.txt.
These were added by accident in a42dea3.

This patch also rewords the description of how ranges of commits can be
skipped.

Signed-off-by: David J. Mellor <dmellor@whistlingcat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 20:47:29 -07:00
Wincent Colaiuta 4fa535a179 Grammar fixes to "merge" and "patch-id" docs
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 17:28:33 -07:00
Elijah Newren 98e1a4186a Correct missing SP characters in grammar comment at top of fast-import.c
Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 16:36:16 -07:00
Elijah Newren d5b0c97d13 git-filter-branch: avoid collisions with variables in eval'ed commands
Avoid using simple variable names like 'i', since user commands are eval'ed
and may clash with and overwrite our values.

Signed-off-by: Elijah Newren <newren@gmail.com>
Acked-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 16:35:52 -07:00
Junio C Hamano 8befac5d6f Merge branch 'for-junio' of git://repo.or.cz/git/mingw/j6t
* 'for-junio' of git://repo.or.cz/git/mingw/j6t:
  t7502-commit: Skip SIGTERM test on Windows
  t7005-editor: Use $SHELL_PATH in the editor scripts
2009-03-25 15:08:09 -07:00
Kevin Ballard b2655cdae9 builtin-push.c: Fix typo: "anythig" -> "anything"
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 15:05:46 -07:00
Johannes Sixt fb9a2beab2 t7502-commit: Skip SIGTERM test on Windows
The implementation of exec on Windows is just a rough approximation of the
POSIX behavior. In particular, no real process "overlay" happens (a new
process is spawned instead and the parent process waits until the child
terminates). In particular, the process ID cannot be taken by the exec'd
process. But there is one test in t7502-commit.sh that depends on this.
We have to skip it on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-25 21:25:57 +01:00
Johannes Sixt 80f0e53d6b t7005-editor: Use $SHELL_PATH in the editor scripts
The test sets up various shell scripts and uses them as commit message
editors.  On Windows, we need a shebang line in order to recognize the
files as executable shell scripts.  This adds it.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
2009-03-25 21:25:53 +01:00
Johannes Sixt 5d83f9c198 diff --no-index: Do not generate patch output if other output is requested
Previously, 'git diff --no-index --stat a b' generated patch output in
addition to the --stat output (or whatever other output format was
requested). Now only the requested output is generated, and patch
output remains the default.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 12:15:30 -07:00
Johannes Schindelin 5c928c06e2 Guard a few Makefile variables against user environments
Some variables are not initialized in the Makefile, but appended to.  If
the user has those variables in her environment, it will break the
build.

The variable names were found using these commands:

	$ s='[ \t]';
	$ S='[^ \t]';
	$ comm -23 \
		<(sed -n "s/^$s*\($S*\)$s$s*+=.*/\1/p" < Makefile |
		  sort | uniq) \
		<(sed -n "s/^$s*\($S*\)$s$s*=.*/\1/p" < Makefile |
		  sort | uniq)

This fixes msysGit issue 216.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-25 12:12:35 -07:00
Junio C Hamano 89fbda2425 Merge branch 'maint'
* maint:
  Increase the size of the die/warning buffer to avoid truncation
  close_sha1_file(): make it easier to diagnose errors
  avoid possible overflow in delta size filtering computation
2009-03-24 19:45:57 -07:00
Heiko Voigt 7c98213abc Add warning about known issues to documentation of cvsimport
The described issues are compiled from the tests by Michael Haggerty and me.
Because it is not apparent that these can be fixed anytime soon at least warn
unwary users not to rely on the inbuilt cvsimport to much.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 19:44:56 -07:00
Stephen Boyd e1d37937ac completion: add --thread=deep/shallow to format-patch
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 19:17:33 -07:00
Stephen Boyd 3f7df3a71a completion: add --cc and --no-attachment option to format-patch
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 19:17:33 -07:00
Stephen Boyd 77813151f9 completion: add --annotate option to send-email
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Trivially-Acked-By: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 19:17:33 -07:00
Shawn O. Pearce 3e262b95c5 Don't permit ref/branch names to end with ".lock"
We already skip over loose refs under $GIT_DIR/refs if the name
ends with ".lock", so creating a branch named "foo.lock" will not
appear in the output of "git branch", "git for-each-ref", nor will
its commit be considered reachable by "git rev-list --all".

In the latter case this is especially evil, as it may cause
repository corruption when objects reachable only through such a
ref are deleted by "git prune".

It should be reasonably safe to deny use of ".lock" as a ref suffix.
In prior versions of Git such branches would be "phantom branches";
you can create it, but you can't see it in "git branch" output.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 17:02:20 -07:00
Shawn O. Pearce 389d176771 Increase the size of the die/warning buffer to avoid truncation
Long messages like those from lockfile.c when a lock can't be
obtained truncate with only 256 bytes in the message buffer.
Bump it to 1024 to give more space for these longer cases.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 16:58:20 -07:00
Junio C Hamano b0de555410 Merge branch 'maint-1.6.1' into maint
* maint-1.6.1:
  close_sha1_file(): make it easier to diagnose errors
  avoid possible overflow in delta size filtering computation
2009-03-24 15:31:21 -07:00
Junio C Hamano 2a5643da73 Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0:
  close_sha1_file(): make it easier to diagnose errors
  avoid possible overflow in delta size filtering computation
2009-03-24 15:31:15 -07:00
Johannes Sixt 3aea1a5a89 MinGW: Quote arguments for subprocesses that contain a single-quote
Before a process can be spawned by mingw_spawnve, arguments must be
surrounded by double-quotes if special characters are present.  This is
necessary because the startup code of the spawned process will expand
arguments that look like glob patterns.  "Normal" Windows command line
utilities expand only * and ?, but MSYS programs, including bash, are
different: They also expand braces, and this has already been taken care
of by compat/mingw.c:quote_arg().

But MSYS programs also treat single-quotes in a special way: Arguments
between single-quotes are spliced together (with spaces) into a word.
With this patch this treatment is avoided by quoting arguments that contain
single-quotes.

This lets t4252 pass on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 14:42:59 -07:00
Junio C Hamano 78360b576a Merge branch 'js/windows-tests'
* js/windows-tests:
  t0060: fix whitespace in "wc -c" invocation
  t5503: GIT_DEBUG_SEND_PACK is not supported on MinGW
  t7004: Use prerequisite tags to skip tests that need gpg
  Use prerequisites to skip tests that need unzip
  t3700: Skip a test with backslashes in pathspec
  Skip tests that require a filesystem that obeys POSIX permissions
  t0060: Fix tests on Windows
  Use prerequisite tags to skip tests that depend on symbolic links
  t9100, t9129: Use prerequisite tags for UTF-8 tests
  t5302: Use prerequisite tags to skip 64-bit offset tests
  Skip tests that fail if the executable bit is not handled by the filesystem
  t3600: Use test prerequisite tags
  test-lib: Infrastructure to test and check for prerequisites
  t0050: Check whether git init detected symbolic link support correctly
  Tests on Windows: $(pwd) must return Windows-style paths
  test-lib: Work around missing sum on Windows
  test-lib: Work around incompatible sort and find on Windows

Conflicts:
	t/t3000-ls-files-others.sh
2009-03-24 14:42:50 -07:00
Linus Torvalds e8bd78c3fc close_sha1_file(): make it easier to diagnose errors
A bug report with "unable to write sha1 file" made us realize that we do
not have enough information to guess why close() is failing.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 14:39:20 -07:00
Nicolas Pitre 720fe22d50 avoid possible overflow in delta size filtering computation
On a 32-bit system, the maximum possible size for an object is less than
4GB, while 64-bit systems may cope with larger objects.  Due to this
limitation, variables holding object sizes are using an unsigned long
type (32 bits on 32-bit systems, or 64 bits on 64-bit systems).

When large objects are encountered, and/or people play with large delta
depth values, it is possible for the maximum allowed delta size
computation to overflow, especially on a 32-bit system.  When this
occurs, surviving result bits may represent a value much smaller than
what it is supposed to be, or even zero.  This prevents some objects
from being deltified although they do get deltified when a smaller depth
limit is used.  Fix this by always performing a 64-bit multiplication.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 14:37:30 -07:00
Junio C Hamano cbdffe4093 check_ref_format(): tighten refname rules
This changes the rules for refnames to forbid:

 (1) a refname that contains "@{" in it.

     Some people and foreign SCM converter may have named their branches
     as frotz@24 and we still want to keep supporting it.

     However, "git branch frotz@{24}" is a disaster.  It cannot even
     checked out because "git checkout frotz@{24}" will interpret it as
     "detach the HEAD at twenty-fourth reflog entry of the frotz branch".

 (2) a refname that ends with a dot.

     We already reject a path component that begins with a dot, primarily
     to avoid ambiguous range interpretation.  If we allowed ".B" as a
     valid ref, it is unclear if "A...B" means "in dot-B but not in A" or
     "either in A or B but not in both".

     But for this to be complete, we need also to forbid "A." to avoid "in
     B but not in A-dot".  This was not a problem in the original range
     notation, but we should have added this restriction when three-dot
     notation was introduced.

     Unlike "no dot at the beginning of any path component" rule, this
     rule does not have to be "no dot at the end of any path component",
     because you cannot abbreviate the tail end away, similar to you can
     say "dot-B" to mean "refs/heads/dot-B".

For these reasons, it is not likely people created branches with these
names on purpose, but we have allowed such names to be used for quite some
time, and it is possible that people created such branches by mistake or
by accident.

To help people with branches with such unfortunate names to recover,
we still allow "branch -d 'bad.'" to delete such branches, and also allow
"branch -m bad. good" to rename them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-24 00:53:03 -07:00
Miklos Vajna edbc25c5b3 refs: use warning() instead of fprintf(stderr, "warning: ")
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-23 21:02:28 -07:00
Miklos Vajna 5620e77e30 builtin-show-ref: use warning() instead of fprintf(stderr, "warning: ")
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-03-23 21:02:27 -07:00