Commit graph

21920 commits

Author SHA1 Message Date
Gary V. Vaughan f9f33cdc78 Allow disabling "inline"
Compiler support for inline is sometimes buggy, and occasionally
missing entirely.  This patch adds a test for inline support, and
redefines the keyword with the preprocessor if necessary at compile
time.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan e88a135bc5 Some platforms lack socklen_t type
Some platforms do not have a socklen_t type declaration.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan 5a857c74ba Make NO_{INET_NTOP,INET_PTON} configured independently
Being careful not to overwrite the results of testing for hstrerror in
libresolv, also test whether inet_ntop/inet_pton are available from
that library.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan 0a9b167ede Makefile: some platforms do not have hstrerror anywhere
This patch improves the logic of the test for hstrerror, not to
blindly assume that if there is no hstrerror in libc that it must
exist in libresolv.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan fcf3a21acc git-compat-util.h: some platforms with mmap() lack MAP_FAILED definition
Some platforms with mmap() lack MAP_FAILED definition.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Gary V. Vaughan b2b0026eed test_cmp: do not use "diff -u" on platforms that lack one
By default the testsuite calls 'diff -u' whenever a file comparison is
called for.  Unfortunately that throws a "diff: unknown option '-u'"
error for most non-GNU diffs.

This patch sets GIT_TEST_CMP to 'cmp' on all the architectures where
that happens.  The previous version of this patch forgot to export
GIT_TEST_CMP from t/Makefile, which is why 'make test' continued to
fail most tests on most architectures - test-lib.sh was falling back
on its default of `diff -u' for GIT_TEST_CMP.  This version of this
patch shows a vast improvement in testsuite results where either GNU
diff is in the path at configure time, or where Makefile knows that
GIT_TEST_CMP=cmp is required.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:36:27 -07:00
Junio C Hamano 7b3bdbb335 fixup: do not unconditionally disable "diff -u"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 17:35:20 -07:00
Gary V. Vaughan 4fdf71be1c tests: use "test_cmp", not "diff", when verifying the result
In tests, call test_cmp rather than raw diff where possible (i.e. if
the output does not go to a pipe), to allow the use of, say, 'cmp'
when the default 'diff -u' is not compatible with a vendor diff.

When that is not possible, use $DIFF, as set in GIT-BUILD-OPTIONS.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:27 -07:00
Gary V. Vaughan d1b1a91946 Do not use "diff" found on PATH while building and installing
Some of the flags used with the first diff found in PATH cause the
vendor diff to choke.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:27 -07:00
Gary V. Vaughan 4b05548fc0 enums: omit trailing comma for portability
Without this patch at least IBM VisualAge C 5.0 (I have 5.0.2) on AIX
5.1 fails to compile git.

enum style is inconsistent already, with some enums declared on one
line, some over 3 lines with the enum values all on the middle line,
sometimes with 1 enum value per line... and independently of that the
trailing comma is sometimes present and other times absent, often
mixing with/without trailing comma styles in a single file, and
sometimes in consecutive enum declarations.

Clearly, omitting the comma is the more portable style, and this patch
changes all enum declarations to use the portable omitted dangling
comma style consistently.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:27 -07:00
Gary V. Vaughan 48793cf46a Makefile: -lpthread may still be necessary when libc has only pthread stubs
Without this patch, systems that provide stubs for pthread functions
in libc, but which still require libpthread for full the pthread
implementation are not detected correctly.

Also, some systems require -pthread in CFLAGS for each compilation
unit for a successful link of an mt binary, which is also addressed by
this patch.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:26 -07:00
Gary V. Vaughan 66dbfd55e3 Rewrite dynamic structure initializations to runtime assignment
Unfortunately, there are still plenty of production systems with
vendor compilers that choke unless all compound declarations can be
determined statically at compile time, for example hpux10.20 (I can
provide a comprehensive list of our supported platforms that exhibit
this problem if necessary).

This patch simply breaks apart any compound declarations with dynamic
initialisation expressions, and moves the initialisation until after
the last declaration in the same block, in all the places necessary to
have the offending compilers accept the code.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:26 -07:00
Gary V. Vaughan ebef827765 Makefile: pass CPPFLAGS through to fllow customization
Without this patch there is no straight forward way to pass additional
CPPFLAGS at configure-time.  At TWW, everything non-vendor package is
installed to its own subdirectory, so we need the following to show
the preprocessor where the headers for the libraries we will link
later can be found:

	$SHELL ./configure \
	CPPFLAGS="-I${SB_VAR_CURL_INC}\
	 -I${SB_VAR_LIBEXPAT_INC}\
	 -I${SB_VAR_LIBZ_INC}\
	${CPPFLAGS+ $CPPFLAGS}" <<...>>

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-05-31 16:59:26 -07:00
Junio C Hamano d599e0484f Git 1.7.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-23 18:27:17 -07:00
Junio C Hamano 34c071aea4 Merge branch 'maint'
* maint:
  Documentation improvements for the description of short format.
2010-04-23 18:24:32 -07:00
Eric Raymond e92e9cd3c3 Documentation improvements for the description of short format.
Incorporates the detailed explanation from Jeff King in
<20100410040959.GA11977@coredump.intra.peff.net> and fixes
the bug noted by Junio C Hamano in
<7vmxxc1i8g.fsf@alter.siamese.dyndns.org>.

Signed-off-by: Eric S. Raymond <esr@thyrsus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-23 12:33:41 -07:00
Junio C Hamano 08641d022d Sync with 1.7.0.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22 23:05:49 -07:00
Junio C Hamano 66cfd1026f Git 1.7.0.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-22 23:04:21 -07:00
Junio C Hamano 5deb15e47e Merge branch 'mg/use-default-abbrev-length-in-rev-list' into maint
* mg/use-default-abbrev-length-in-rev-list:
  rev-list: use default abbrev length when abbrev-commit is in effect
2010-04-22 22:39:26 -07:00
Junio C Hamano 0737975d16 Merge branch 'wp/doc-filter-direction' into maint
* wp/doc-filter-direction:
  documentation: clarify direction of core.autocrlf
2010-04-22 22:29:50 -07:00
Junio C Hamano 4fd8145c0c Merge branch 'jk/maint-diffstat-overflow' into maint
* jk/maint-diffstat-overflow:
  diff: use large integers for diffstat calculations
2010-04-22 22:29:13 -07:00
Junio C Hamano dd0c5133c6 Merge branch 'da/maint-python-startup' into maint
* da/maint-python-startup:
  Makefile: Remove usage of deprecated Python "has_key" method
2010-04-22 22:29:07 -07:00
Junio C Hamano 3e7f1e6ccb Merge branch 'maint'
* maint:
  Documentation/Makefile: fix interrupted builds of user-manual.xml
2010-04-21 23:54:04 -07:00
Jonathan Nieder f9dae0d3e6 Documentation/Makefile: fix interrupted builds of user-manual.xml
Unlike gcc, asciidoc does not atomically write its output file or
delete it when interrupted.  If it is interrupted in the middle of
writing an XML file, the result will be truncated input for xsltproc.

	XSLTPROC user-manual.html
	user-manual.xml:998: parser error : Premature end of data in t

Take care of this case by writing to a temporary and renaming it when
finished.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-21 23:46:51 -07:00
Junio C Hamano ddd02b70f0 Merge branch 'maint'
* maint:
  t7012: Mark missing tests as TODO
  reflog: remove 'show' from 'expire's usage string
  MSVC: Fix build by adding missing termios.h dummy
2010-04-19 22:41:30 -07:00
Michael J Gruber 3d8167677d t7012: Mark missing tests as TODO
Currently, there are 6 tests which are not even written but are
'test_expect_failure message false'.
Do not abuse test_expect_failure as a to do marker, but mark them as
'#TODO' instead.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Acked-by: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19 18:05:00 -07:00
SZEDER Gábor 580b7d3605 reflog: remove 'show' from 'expire's usage string
Most of 'expire's options are not recognized by the 'show' subcommand,
hence it errors out.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19 17:52:14 -07:00
Junio C Hamano 8165952517 Merge branch 'maint-1.6.6' into maint
* maint-1.6.6:
  MSVC: Fix build by adding missing termios.h dummy
2010-04-19 01:28:27 -07:00
Johannes Sixt b75686455c MSVC: Fix build by adding missing termios.h dummy
A use of this header file was introduced in eb80042 (Add missing #include
to support TIOCGWINSZ on Solaris, 2010-01-11).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-19 01:28:21 -07:00
Junio C Hamano 5469e2dab1 Git 1.7.1-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 22:19:04 -07:00
Junio C Hamano 407a963cae Merge branch 'rr/remote-helper-doc'
* rr/remote-helper-doc:
  Documentation/remote-helpers: Fix typos and improve language
  Fixup: Second argument may be any arbitrary string
  Documentation/remote-helpers: Add invocation section
  Documentation/urls: Rewrite to accomodate <transport>::<address>
  Documentation/remote-helpers: Rewrite description
2010-04-18 21:32:25 -07:00
Junio C Hamano c4df50c2d8 Merge branch 'wp/doc-filter-direction'
* wp/doc-filter-direction:
  documentation: clarify direction of core.autocrlf
2010-04-18 21:32:21 -07:00
Junio C Hamano bc32d342c2 Merge branch 'jk/maint-diffstat-overflow'
* jk/maint-diffstat-overflow:
  diff: use large integers for diffstat calculations
2010-04-18 21:31:50 -07:00
Junio C Hamano 779f9467eb Merge branch 'jg/auto-initialize-notes-with-percent-n-in-format'
* jg/auto-initialize-notes-with-percent-n-in-format:
  t3301: add tests to use --format="%N"
  pretty: Initialize notes if %N is used
2010-04-18 21:31:29 -07:00
Junio C Hamano fab45027e0 Merge branch 'maint'
* maint:
  Documentation: Describe other situations where -z affects git diff
2010-04-18 21:31:20 -07:00
Junio C Hamano e8a1228053 Merge git://git.kernel.org/pub/scm/gitk/gitk
* git://git.kernel.org/pub/scm/gitk/gitk:
  gitk: Display dirty submodules correctly
  gitk: Fix display of copyright symbol
  gitk: Add emacs editor variable block
  gitk: Avoid calling tk_setPalette on Windows
  gitk: Don't clobber "Remember this view" setting
  gitk: Add comments to explain encode_view_opts and decode_view_opts
  gitk: Use consistent font for all text input fields
  gitk: Set the font for all listbox widgets
  gitk: Set the font for all spinbox widgets
  gitk: Remove forced use of sans-serif font
  gitk: Add Ctrl-W shortcut for closing the active window
2010-04-18 18:36:41 -07:00
Ramkumar Ramachandra d43427d3d9 Documentation/remote-helpers: Fix typos and improve language
Fix some typos and errors in grammar and tense.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:56:29 -07:00
Ramkumar Ramachandra 272a36b67b Fixup: Second argument may be any arbitrary string
This is intended to be a fixup for commit ad466d1 in pu. As Jonathan
Neider pointed out, the second argument may be any arbitrary string,
and need not conform to any URL-like shape.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:56:24 -07:00
Ramkumar Ramachandra b6c8d2d663 Documentation/remote-helpers: Add invocation section
Add an 'Invocation' section to specify what the command line arguments
mean. Also include a link to git-remote in the 'See Also' section.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:56:17 -07:00
Ramkumar Ramachandra 5ce4f4e3bf Documentation/urls: Rewrite to accomodate <transport>::<address>
Rewrite the first part of the document to explicitly show differences
between the URLs that can be used with different transport
protocols. Mention <transport>::<address> format to explicitly invoke
a remote helper.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:56:05 -07:00
Ramkumar Ramachandra 00b84e9dbf Documentation/remote-helpers: Rewrite description
Rewrite the description section to describe what exactly remote
helpers are and the need for them. Also mention the curl family of
remote helpers as an example.

[jc: with readability fixes from Jonathan squashed in]

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:55:41 -07:00
Charles Bailey 03aa87ed99 Documentation: Describe other situations where -z affects git diff
-z also alters the behaviour of --name-only and --name-status.

Signed-off-by: Charles Bailey <charles@hashpling.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 13:43:53 -07:00
Jeff King 77bc694907 rebase-interactive: silence warning when no commits rewritten
If you do a "rebase -i" and don't change any commits,
nothing is rewritten, and we have no REWRITTEN_LIST. The
shell prints out an ugly message:

  $ GIT_EDITOR=true git rebase -i HEAD^
  /path/to/git-rebase--interactive: 1: cannot open
    /path/to/repo/.git/rebase-merge/rewritten-list: No such file
  Successfully rebased and updated refs/heads/master.

We can fix it by not running "notes copy" at all if nothing
was rewritten.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 11:41:53 -07:00
Junio C Hamano 636db2c036 t3301: add tests to use --format="%N"
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-18 11:19:39 -07:00
Junio C Hamano f3bd6ab7ea Merge branch 'maint'
* maint:
  t1010-mktree: Adjust expected result to code and documentation
  combined diff: correctly handle truncated file
  Document new "already-merged" rule for branch -d
2010-04-17 12:40:45 -07:00
Matthew Ogilvie f02dd06e26 t6006: do not write to /tmp
Signed-off-by: Matthew Ogilvie <mmogilvi_git@miniinfo.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17 12:40:20 -07:00
Chris Webb 39407304f1 git-instaweb: pass through invoking user's path to gitweb CGI scripts
When used with lighttpd or mongoose, git-instaweb previously passed a
hard-coded, default value of PATH to the gitweb CGI script. Use the invoking
user's value for PATH for this instead. (This is already implicitly the
behaviour for other web servers supported by git-instaweb.)

Signed-off-by: Chris Webb <chris@arachsys.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2010-04-17 12:40:20 -07:00
Junio C Hamano 8de096b671 gitweb: simplify gitweb.min.* generation and clean-up rules
GITWEB_CSS and GITWEB_JS are meant to be "what URI should the installed
cgi script use to refer to the stylesheet and JavaScript", never "this
is the name of the file we are building".  Don't use them to decide what
file to build minified versions in.

While we are at it, lose FILES that is used only for "clean" target in a
misguided way.  "make clean" should try to remove all the potential
build artifacts regardless of a minor configuration change. Instead of
trying to remove only the build product "make clean" would have created
if it were run without "clean", explicitly list the three potential build
products for removal.

Tested-by: Mark Rada <marada@uwaterloo.co>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17 12:40:19 -07:00
Jonathan Nieder a6ccbbdb66 tag -v: use RUN_GIT_CMD to run verify-tag
This is the preferred way to run a git command.

The only obvious observable effects I can think of are that the exec
is properly reported in GIT_TRACE output and that verifying signed
tags will still work if the git-verify-tag hard link in gitexecdir
goes missing.

Helped-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17 12:40:19 -07:00
Will Palmer c308b9c25d documentation: clarify direction of core.autocrlf
The description for core.autocrlf refers to reads from / writes to
"the filesystem", the only use of this rather ambiguous term, which
technically could be referring to the git object database. (All other
mentions are part of phrases such as "..filesystems (like NFS)..").

Other sections, including the section on core.safecrlf, use the term
"work tree" for the same purpose as the term "the filesystem" is used in
the core.autocrlf section, so that seems like a good alternative, which
makes it clearer what direction the addition/removal of CR characters
occurs in.

Signed-off-by: Will Palmer <wmpalmer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-04-17 11:50:32 -07:00