Commit graph

34163 commits

Author SHA1 Message Date
Junio C Hamano e6d6911941 Merge branch 'vl/typofix' into maint
* vl/typofix:
  random typofixes (committed missing a 't', successful missing an 's')
2013-07-19 10:42:57 -07:00
Junio C Hamano 0b57758c35 Merge branch 'wk/doc-git-has-grown' into maint
* wk/doc-git-has-grown:
  user-manual: Update download size for Git and the kernel
2013-07-19 10:42:52 -07:00
Junio C Hamano b002bb87f0 Merge branch 'ys/cygstart' into maint
* ys/cygstart:
  web--browse: support /usr/bin/cygstart on Cygwin
2013-07-19 10:42:49 -07:00
Junio C Hamano bd54df0716 Merge branch 'mm/push-force-is-dangerous' into maint
* mm/push-force-is-dangerous:
  Documentation/git-push.txt: explain better cases where --force is dangerous
2013-07-19 10:42:46 -07:00
Junio C Hamano 52c19991cb Merge branch 'rs/logical-vs-binary-or' into maint
* rs/logical-vs-binary-or:
  use logical OR (||) instead of binary OR (|) in logical context
2013-07-19 10:42:18 -07:00
Junio C Hamano 6ddc862e8b Merge branch 'js/test-ln-s-add' into maint
* js/test-ln-s-add:
  t4011: remove SYMLINKS prerequisite
  t6035: use test_ln_s_add to remove SYMLINKS prerequisite
  t3509, t4023, t4114: use test_ln_s_add to remove SYMLINKS prerequisite
  t3100: use test_ln_s_add to remove SYMLINKS prerequisite
  t3030: use test_ln_s_add to remove SYMLINKS prerequisite
  t0000: use test_ln_s_add to remove SYMLINKS prerequisite
  tests: use test_ln_s_add to remove SYMLINKS prerequisite (trivial cases)
  tests: introduce test_ln_s_add
  t3010: modernize style
  test-chmtime: Fix exit code on Windows
2013-07-19 10:41:23 -07:00
Junio C Hamano 211e76d48b Merge branch 'jk/apache-test-for-2.4' into maint
Allow our tests to run with newer Apache.

* jk/apache-test-for-2.4:
  lib-httpd/apache.conf: check version only after mod_version loads
  t/lib-httpd/apache.conf: configure an MPM module for apache 2.4
  t/lib-httpd/apache.conf: load compat access module in apache 2.4
  t/lib-httpd/apache.conf: load extra auth modules in apache 2.4
  t/lib-httpd/apache.conf: do not use LockFile in apache >= 2.4
2013-07-19 10:41:01 -07:00
Junio C Hamano 8589a74b19 Merge branch 'tr/test-commit-only-on-orphan' into maint
* tr/test-commit-only-on-orphan:
  Test 'commit --only' after 'checkout --orphan'
2013-07-19 10:40:57 -07:00
Junio C Hamano 509152d3fa Merge branch 'sb/archive-zip-double-assignment-fix' into maint
* sb/archive-zip-double-assignment-fix:
  archive-zip:write_zip_entry: Remove second reset of size variable to zero.
2013-07-19 10:40:53 -07:00
Junio C Hamano 6741edcc50 Merge branch 'th/bisect-skip-report-range-fix' into maint
The bisect log listed incorrect commits when bisection ends with
only skipped ones.

* th/bisect-skip-report-range-fix:
  bisect: Fix log output for multi-parent skip ranges
2013-07-19 10:39:12 -07:00
Junio C Hamano afebd687f8 Merge branch 'rs/tar-tests' into maint
* rs/tar-tests:
  t5000: test long filenames
  t5000: simplify tar-tree tests
  t5000: use check_tar for prefix test
  t5000: factor out check_tar
  t5000, t5003: create directories for extracted files lazily
  t5000: integrate export-subst tests into regular tests
2013-07-19 10:39:10 -07:00
Junio C Hamano 439b55b37c Merge branch 'rr/column-doc' into maint
* rr/column-doc:
  column doc: rewrite documentation for column.ui
2013-07-19 10:39:06 -07:00
Junio C Hamano 65ed8684c4 Merge branch 'rs/discard-index-discard-array' into maint
* rs/discard-index-discard-array:
  read-cache: free cache in discard_index
  read-cache: add simple performance test
2013-07-19 10:39:01 -07:00
Junio C Hamano 7f05e4a617 Merge branch 'tr/coverage' into maint
The test coverage framework was left broken for some time.

* tr/coverage:
  coverage: build coverage-untested-functions by default
  coverage: set DEFAULT_TEST_TARGET to avoid using prove
  coverage: do not delete .gcno files before building
  coverage: split build target into compile and test
2013-07-19 10:38:18 -07:00
Stefan Beller debecc5558 Documentation: "git reset <tree-ish> <pathspec>" takes a tree-ish, not tree-sh
Reported-By: Ibrahim M. Ghazal <imgx64@gmail.com>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19 10:15:09 -07:00
Ramsay Jones 9fe3edc47f Add the LAST_ARG_MUST_BE_NULL macro
The sentinel function attribute is not understood by versions of
the gcc compiler prior to v4.0. At present, for earlier versions
of gcc, the build issues 108 warnings related to the unknown
attribute. In order to suppress the warnings, we conditionally
define the LAST_ARG_MUST_BE_NULL macro to provide the sentinel attribute
for gcc v4.0 and newer.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-19 09:26:15 -07:00
Ramkumar Ramachandra 35035bbf07 send-email: be explicit with SSL certificate verification
When initiating an SSL connection without explicitly specifying the
SSL certificate verification mode, Net::SMTP::SSL defaults to no
verification, but recent versions of the module gives a warning
against this use of the default.

Enable certificate verification by default, using /etc/ssl/certs as
the default path for certificates of certificate authorities.  This
path can be overriden by the --smtp-ssl-cert-path command line
option and the sendemail.smtpSSLCertPath configuration variable.

Passing an empty string as the path for CA certificates path disables
the SSL certificate verification explicitly, which does not trigger
the warning from recent versions of Net::SMTP::SSL.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Helped-by: Brian M. Carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 16:01:30 -07:00
Junio C Hamano adfc1857bd describe: fix --contains when a tag is given as input
"git describe" takes a commit and gives it a name based on tags in
its neighbourhood.  The command does take a commit-ish but when
given a tag that points at a commit, it should dereference the tag
before computing the name for the commit.

As the whole processing is internally delegated to name-rev, if we
unwrap tags down to the underlying commit when invoking name-rev, it
will make the name-rev issue an error message based on the unwrapped
object name (i.e. either 40-hex object name, or "$tag^0") that is
different from what the end-user gave to the command when the commit
cannot be described.  Introduce an internal option --peel-tag to the
name-rev to tell it to unwrap a tag in its input from the command
line.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 15:16:23 -07:00
Junio C Hamano 118aa4acff name-rev: differentiate between tags and commits they point at
"git name-rev --stdin" has been fixed to convert an object name that
points at a tag to a refname of the tag.  The codepath to handle its
command line arguments, however, fed the commit that the tag points
at to the underlying naming machinery.

With this fix, you will get this:

    $ git name-rev --refs=tags/\* --name-only $(git rev-parse v1.8.3 v1.8.3^0)
    v1.8.3
    v1.8.3^0

which is the same as what you would get from the fixed "--stdin" variant:

    $ git rev-parse v1.8.3 v1.8.3^0 | git name-rev --refs=tags/\* --name-only
    v1.8.3
    v1.8.3^0

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 15:16:23 -07:00
Junio C Hamano b72c6161f1 Update draft release notes to 1.8.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 13:00:08 -07:00
Junio C Hamano 30f7ad08e6 Merge branch 'jc/revert-clone-doc-update-for-push-from-shallow'
* jc/revert-clone-doc-update-for-push-from-shallow:
  Revert "git-clone.txt: remove the restriction on pushing from a shallow clone"
2013-07-18 13:00:00 -07:00
Junio C Hamano cbc7fdf81d Merge branch 'rs/mailmap-himself'
* rs/mailmap-himself:
  .mailmap: René Scharfe has a new email address
2013-07-18 12:59:58 -07:00
Junio C Hamano ec1b80b9c4 Merge branch 'sb/mailmap-updates'
* sb/mailmap-updates:
  .mailmap: combine more (email, name) to individual persons
  .mailmap: Combine more (email, name) to individual persons
  .mailmap: Map email addresses to names
2013-07-18 12:59:56 -07:00
Junio C Hamano 802f878b86 Merge branch 'jk/in-pack-size-measurement'
"git cat-file --batch-check=<format>" is added, primarily to allow
on-disk footprint of objects in packfiles (often they are a lot
smaller than their true size, when expressed as deltas) to be
reported.

* jk/in-pack-size-measurement:
  pack-revindex: radix-sort the revindex
  pack-revindex: use unsigned to store number of objects
  cat-file: split --batch input lines on whitespace
  cat-file: add %(objectsize:disk) format atom
  cat-file: add --batch-check=<format>
  cat-file: refactor --batch option parsing
  cat-file: teach --batch to stream blob objects
  t1006: modernize output comparisons
  teach sha1_object_info_extended a "disk_size" query
  zero-initialize object_info structs
2013-07-18 12:59:41 -07:00
Junio C Hamano b12aecda2c Merge branch 'bp/mediawiki-preview'
Add a command to allow previewing the contents locally before
pushing it out, when working with a MediaWiki remote.

I personally do not think this belongs to Git.  If you are working
on a set of AsciiDoc source files, you sure do want to locally
format to preview what you will be pushing out, and if you are
working on a set of C or Java source files, you do want to test it
before pushing it out, too.  That kind of thing belongs to your
build script, not to your SCM.

But I'll let it pass, as this is only a contrib/ thing.

* bp/mediawiki-preview:
  git-remote-mediawiki: add preview subcommand into git mw
  git-remote-mediawiki: add git-mw command
  git-remote-mediawiki: factoring code between git-remote-mediawiki and Git::Mediawiki
  git-remote-mediawiki: update tests to run with the new bin-wrapper
  git-remote-mediawiki: add a git bin-wrapper for developement
  wrap-for-bin: make bin-wrappers chainable
  git-remote-mediawiki: introduction of Git::Mediawiki.pm
2013-07-18 12:59:34 -07:00
Junio C Hamano 73f4c9a104 Merge branch 'bc/commit-invalid-utf8'
Logic to auto-detect character encodings in the commit log message
did not reject overlong and invalid UTF-8 characters.

* bc/commit-invalid-utf8:
  commit: reject non-characters
  commit: reject overlong UTF-8 sequences
  commit: reject invalid UTF-8 codepoints
2013-07-18 12:58:19 -07:00
Junio C Hamano 0d64cdf8e2 Merge branch 'es/overlapping-range-set'
* es/overlapping-range-set:
  range_set: fix coalescing bug when range is a subset of another
  t4211: fix broken test when one -L range is subset of another
2013-07-18 12:58:17 -07:00
Junio C Hamano 45ed4afabe Merge branch 'jk/maint-clone-shared-no-connectivity-validation'
"git clone -s/-l" is a filesystem level copy and does not offer any
protection against source repository being corrupt.  While the
connectivity validation checks commits and trees being readable, it
made the otherwise instantaneous local modes of clone much more
expensive, without protecting blob data from bitflips.

* jk/maint-clone-shared-no-connectivity-validation:
  clone: drop connectivity check for local clones
2013-07-18 12:48:29 -07:00
Junio C Hamano db1a848421 Merge branch 'bc/push-match-many-refs'
Pushing to repositories with many refs employed O(m*n) algorithm
where n is the number of refs on the receiving end.

* bc/push-match-many-refs:
  remote.c: avoid O(m*n) behavior in match_push_refs
2013-07-18 12:48:25 -07:00
Junio C Hamano afbfcaa983 Merge branch 'rr/rebase-reflog-message-reword'
"git rebase [-i]" used to leave just "rebase" as its reflog message
for some operations. This rewords them to be more informative.

* rr/rebase-reflog-message-reword:
  rebase -i: use a better reflog message
  rebase: use a better reflog message
2013-07-18 12:48:20 -07:00
Thomas Rast 465cf8ce45 show-branch: fix description of --date-order
The existing description reads as if it somehow applies a filter.
Change it to explain that it is merely about the ordering.

Message-proposed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 10:57:01 -07:00
Thomas Rast 42063f95a0 apply, entry: speak of submodules instead of subprojects
There are only four (with some generous rounding) instances in the
current source code where we speak of "subproject" instead of
"submodule".  They are as follows:

* one error message in git-apply and two in entry.c

* the patch format for submodule changes

The latter was introduced in 0478675 (Expose subprojects as special
files to "git diff" machinery, 2007-04-15), apparently before the
terminology was settled.  We can of course not change the patch
format.

Let's at least change the error messages to consistently call them
"submodule".

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-18 10:56:06 -07:00
Stefan Beller c07a6bc572 .mailmap: combine more (email, name) to individual persons
I got more responses from people regarding the .mailmap file.
All added persons gave permission to add them to the .mailmap file.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:11:27 -07:00
Stefan Beller 8e92e8f242 parse_object_buffer: correct freeing the buffer
If we exit early in the function parse_object_buffer, we did not
write to *eaten_p. Then the calling function parse_object, which looks
like the following with respect to the eaten variable, cannot rely on a
proper value set in eaten, hence the freeing of the buffer depends
on random values in memory.

	struct object *parse_object(const unsigned char *sha1)
	{
		int eaten;
		...
		obj = parse_object_buffer(sha1, type, size, buffer, &eaten);
		if (!eaten)
			free(buffer);
	}

This change makes sure, the buffer freeing condition is deterministic.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:10:51 -07:00
Eric Sunshine df83d5cf67 blame-options.txt: explain that -L <start> and <end> are optional
The ability to omit either end of the -L range is a handy but
undocumented shortcut, and is thus not easily discovered. Fix this
shortcoming.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:22 -07:00
Eric Sunshine e6d2b9f6e7 blame-options.txt: place each -L option variation on its own line
Standard practice in Git documentation is for each variation of an
option (such as: -p / --porcelain) to be placed on its own line in the
OPTIONS table. The -L option does not follow suit. It cuddles
"-L <start>,<end>" and "-L :<regex>", separated by a comma. This is
inconsistent and potentially confusing since the comma separating them
is typeset the same as the comma in "<start>,<end>". Fix this by placing
each variation on its own line.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:22 -07:00
Eric Sunshine 5a9830cb71 t8001/t8002 (blame): add blame -L :funcname tests
git-blame inherited "-L :funcname" support when "-L :funcname:file" was
implemented for git-log. Add tests.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:22 -07:00
Eric Sunshine 03e15fc0b6 t8001/t8002 (blame): add blame -L tests
With the exception of a couple "corner case" checks in t8003 (and some
indirect tests in t4211 of -L parsing code shared by log -L), there is
no systematic checking of blame -L.  Add tests to check blame -L
directly.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:22 -07:00
Eric Sunshine e37f39c134 t8001/t8002 (blame): modernize style
In particular,

- indent with tabs
- cuddle test description and opening body quote with test_expect_foo
- normalize test descriptions and case
- remove whitepsace following redirection operator
- use standardized filenames (such as "actual", "expected")

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:21 -07:00
Eric Sunshine 3bf65f9e62 line-range: fix "blame -L X,-N" regression
"blame -L X,-N" is documented as blaming "N lines ending at X".  In
practice, the behavior is achieved by swapping the two range endpoints
if the second is less than the first.  25ed3412 (Refactor parse_loc;
2013-03-28) broke this interpretation by removing the swapping code from
blame.c and failing to add it to line-range.c along with other code
relocated from blame.c. Thus, such a range is effectively treated as
empty.  Fix this regression.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 18:02:12 -07:00
René Scharfe 76053e77ef .mailmap: René Scharfe has a new email address
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:55:05 -07:00
Doug Bell 3f3d0cea61 show-ref: make --head always show the HEAD ref
The docs seem to say that doing

	git show-ref --head --tags

would show both the HEAD ref and all the tag refs. However, doing
both --head and either of --tags or --heads would filter out the HEAD
ref.

Also update the documentation to describe the new behavior and add
tests for the show-ref command.

[jc: Doug did proofread the tests, but it was done by me and bugs in
it are mine].

Signed-off-by: Doug Bell <madcityzen@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:52:28 -07:00
Matthieu Moy 4ba258b7e1 Documentation/git-log.txt: capitalize section names
This is the convention in most other files and even at the beginning of
git-log.txt

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Matthieu Moy 7b02c83463 Documentation: move description of -s, --no-patch to diff-options.txt
Technically, "-s, --no-patch" is implemented in diff.c ("git diff
--no-patch" is essentially useless, but valid). From the user point of
view, this allows the documentation to show up in "git show --help",
which is one of the most useful use of the option.

While we're there, add a sentence explaining why the option can be
useful.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Matthieu Moy 0791ab02c2 Documentation/git-show.txt: include common diff options, like git-log.txt
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Matthieu Moy 71482d389d diff: allow --patch & cie to override -s/--no-patch
All options that trigger a patch output now override --no-patch.

The case of --binary deserves extra attention: the name may suggest that
it turns a normal patch into a binary patch, but it actually already
enables patch output when normally disabled (e.g. "git log --binary"
displays a patch), hence it makes sense for "git show --no-patch
--binary" to display the binary patch.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Matthieu Moy d09cd15d19 diff: allow --no-patch as synonym for -s
This follows the usual convention of having a --no-foo option to negate
--foo.

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Matthieu Moy 8ade9b140f t4000-diff-format.sh: modernize style
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 17:50:56 -07:00
Eric Sunshine 001b0976af git-log.txt: fix typesetting of example "git-log -L" invocation
All surrounding examples are typeset as monospaced text. Follow suit.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 12:58:36 -07:00
Thomas Rast a11c39646c git: ensure 0/1/2 are open in main()
Not having an open FD in the 0--2 range can lead to strange results,
for example, a subsequent open() may return 2 (stderr) and then a
die() would clobber this file.

git-daemon and git-shell already guarded against this, but apparently
users also manage to trip over it in other git commands.  So we call
sanitize_stdfds() during main git startup.

Since these FDs are inherited, this covers all use of 'git foo ...',
and all internal C commands when called directly.  It does not fix
shell/perl commands called directly.

Signed-off-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-07-17 12:52:16 -07:00