Commit graph

35246 commits

Author SHA1 Message Date
Felipe Contreras 70eabce801 t: trivial whitespace cleanups
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 13:24:21 -08:00
Felipe Contreras e46c92e4ef abspath: trivial style fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-09 13:19:56 -08:00
Junio C Hamano 077f43447c Start 1.9 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-06 11:20:04 -08:00
Junio C Hamano dd1cec578d Merge branch 'jk/remove-experimental-loose-object-support'
* jk/remove-experimental-loose-object-support:
  drop support for "experimental" loose objects
2013-12-06 11:09:43 -08:00
Junio C Hamano e2bcd4f779 Merge branch 'nd/magic-pathspec'
"git diff -- ':(icase)makefile'" were rejected unnecessarily.
This needs to be merged to 'maint' later.

* nd/magic-pathspec:
  diff: restrict pathspec limitations to diff b/f case only
2013-12-06 11:09:41 -08:00
Junio C Hamano cb6bd5722f Merge branch 'rr/for-each-ref-decoration'
Add a few formatting directives to "git for-each-ref --format=...",
to paint them in color, etc.

* rr/for-each-ref-decoration:
  for-each-ref: avoid color leakage
  for-each-ref: introduce %(color:...) for color
  for-each-ref: introduce %(upstream:track[short])
  for-each-ref: introduce %(HEAD) asterisk marker
  t6300 (for-each-ref): don't hardcode SHA-1 hexes
  t6300 (for-each-ref): clearly demarcate setup
2013-12-06 11:07:21 -08:00
Junio C Hamano 10a36382ac Merge branch 'jc/bundle'
Code clean-up.

* jc/bundle:
  bundle: use argv-array
2013-12-06 11:07:15 -08:00
Junio C Hamano ef63eb55cd Merge branch 'rh/remote-hg-bzr-updates'
Updates to remote-bzr and remote-hg in contrib.

* rh/remote-hg-bzr-updates:
  remote-bzr, remote-hg: fix email address regular expression
  test-hg.sh: help user correlate verbose output with email test
  test-hg.sh: fix duplicate content strings in author tests
  test-hg.sh: avoid obsolete 'test' syntax
  test-hg.sh: eliminate 'local' bashism
  test-bzr.sh, test-hg.sh: prepare for change to push.default=simple
  test-bzr.sh, test-hg.sh: allow running from any dir
  test-lib.sh: convert $TEST_DIRECTORY to an absolute path
2013-12-06 11:06:53 -08:00
Junio C Hamano 128c5d07c5 Merge branch 'jn/perl-lib-extra'
Allow customizing the paths to Perl modules with the new
PERLLIB_EXTRA makefile variable.

* jn/perl-lib-extra:
  Makefile: add PERLLIB_EXTRA variable that adds to default perl path
  Makefile: rebuild perl scripts when perl paths change
2013-12-06 11:05:39 -08:00
Junio C Hamano b00d2440f7 Merge branch 'gj/push-more-verbose-advice' (early part)
* 'gj/push-more-verbose-advice' (early part):
  push: enhance unspecified push default warning
2013-12-05 14:03:32 -08:00
Junio C Hamano 968182a49d Merge branch 'jn/mediawiki-makefile-updates'
Build and installation procedure clean-up.

* jn/mediawiki-makefile-updates:
  git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace
  git-remote-mediawiki build: make 'install' command configurable
  git-remote-mediawiki: honor DESTDIR in "make install"
  git-remote-mediawiki: do not remove installed files in "clean" target
2013-12-05 13:00:23 -08:00
Junio C Hamano c83386d14d Merge branch 'jl/submodule-update-retire-orig-flags'
Code clean-up.

* jl/submodule-update-retire-orig-flags:
  submodule update: remove unnecessary orig_flags variable
2013-12-05 13:00:20 -08:00
Junio C Hamano c3dc3827d6 Merge branch 'nd/wt-status-align-i18n'
An attempt to automatically align the names in the "git status"
output, taking the display width of (translated) section labels
into account.

* nd/wt-status-align-i18n:
  wt-status: take the alignment burden off translators
2013-12-05 13:00:17 -08:00
Junio C Hamano c17fa972d3 Merge branch 'sb/sha1-loose-object-info-check-existence'
"git cat-file --batch-check=ok" did not check the existence of the
named object.

* sb/sha1-loose-object-info-check-existence:
  sha1_loose_object_info(): do not return success on missing object
2013-12-05 13:00:12 -08:00
Junio C Hamano 3979580265 Merge branch 'jk/two-way-merge-corner-case-fix'
Fix a rather longstanding corner-case bug in twoway "reset to
there" merge, which is most often seen in "git am --abort".

* jk/two-way-merge-corner-case-fix:
  t1005: add test for "read-tree --reset -u A B"
  t1005: reindent
  unpack-trees: fix "read-tree -u --reset A B" with conflicted index
2013-12-05 12:59:25 -08:00
Junio C Hamano 10167eb251 Merge branch 'jc/ref-excludes'
People often wished a way to tell "git log --branches" (and "git
log --remotes --not --branches") to exclude some local branches
from the expansion of "--branches" (similarly for "--tags", "--all"
and "--glob=<pattern>").  Now they have one.

* jc/ref-excludes:
  rev-parse: introduce --exclude=<glob> to tame wildcards
  rev-list --exclude: export add/clear-ref-exclusion and ref-excluded API
  rev-list --exclude: tests
  document --exclude option
  revision: introduce --exclude=<glob> to tame wildcards
2013-12-05 12:59:09 -08:00
Junio C Hamano 3576f113cb Merge branch 'nv/parseopt-opt-arg'
Enhance "rev-parse --parseopt" mode to help parsing options with
an optional parameter.

* nv/parseopt-opt-arg:
  rev-parse --parseopt: add the --stuck-long mode
  Use the word 'stuck' instead of 'sticked'
2013-12-05 12:59:04 -08:00
Junio C Hamano c5a77e8f92 Merge branch 'bc/http-100-continue'
Issue "100 Continue" responses to help use of GSS-Negotiate
authentication scheme over HTTP transport when needed.

* bc/http-100-continue:
  remote-curl: fix large pushes with GSSAPI
  remote-curl: pass curl slot_results back through run_slot
  http: return curl's AUTHAVAIL via slot_results
2013-12-05 12:58:59 -08:00
Junio C Hamano 07d406b742 Merge branch 'jc/merge-base-reflog'
Code the logic in "pull --rebase" that figures out a fork point
from reflog entries in C.

* jc/merge-base-reflog:
  merge-base: teach "--fork-point" mode
  merge-base: use OPT_CMDMODE and clarify the command line parsing
2013-12-05 12:58:27 -08:00
Junio C Hamano 219ea0e79d Merge branch 'jk/replace-perl-in-built-scripts'
* jk/replace-perl-in-built-scripts:
  use @@PERL@@ in built scripts
2013-12-05 12:58:21 -08:00
Junio C Hamano 86cd8dc8e7 Merge branch 'jh/loose-object-dirs-creation-race'
When two processes created one loose object file each, which fell
into the same fan-out bucket that previously did not have any
objects, they both tried to do an equivalent of

    mkdir .git/objects/$fanout &&
    chmod $shared_perm .git/objects/$fanout

before writing into their file .git/objects/$fanout/$remainder,
one of which could have failed unnecessarily when the second
invocation of mkdir found that the directory already has been
created by the first one.

* jh/loose-object-dirs-creation-race:
  sha1_file.c:create_tmpfile(): Fix race when creating loose object dirs
2013-12-05 12:54:14 -08:00
Junio C Hamano 5bb62059f2 Merge branch 'jk/robustify-parse-commit'
* jk/robustify-parse-commit:
  checkout: do not die when leaving broken detached HEAD
  use parse_commit_or_die instead of custom message
  use parse_commit_or_die instead of segfaulting
  assume parse_commit checks for NULL commit
  assume parse_commit checks commit->object.parsed
  log_tree_diff: die when we fail to parse a commit
2013-12-05 12:54:01 -08:00
Junio C Hamano b2a0afd96a Merge branch 'ak/submodule-foreach-quoting'
A behavior change, but a worthwhile one: "git submodule foreach"
was treating its arguments as part of a single command to be
concatenated and passed to a shell, making writing buggy
scripts too easy.

This patch preserves the old "just pass it to the shell" behavior
when a single argument is passed to 'git submodule foreach' and
moves to a new "skip the shell and use the arguments passed
unmolested" behavior when more than one argument is passed.

The old behavior (always concatenating and passing to the shell)
was similar to the 'ssh' command, while the new behavior (switching
on the number of arguments) is what 'xterm -e' does.

May need more thought to make sure this change is advertised well
so that scripts that used multiple arguments but added their own
extra layer of quoting are not broken.

* ak/submodule-foreach-quoting:
  submodule foreach: skip eval for more than one argument
2013-12-05 12:53:17 -08:00
Junio C Hamano daad3aa255 Sync with 1.8.5.1
* maint:
  Git 1.8.5.1
  ref-iteration doc: add_submodule_odb() returns 0 for success
2013-12-03 11:44:12 -08:00
Junio C Hamano 34f4a75f1e Merge branch 'nd/glossary-content-pathspec-markup'
* nd/glossary-content-pathspec-markup:
  glossary-content.txt: fix documentation of "**" patterns
2013-12-03 11:41:52 -08:00
Junio C Hamano 0b6f39b060 Merge branch 'jj/doc-markup-gitcli'
* jj/doc-markup-gitcli:
  Documentation/gitcli.txt: fix double quotes
2013-12-03 11:41:46 -08:00
Junio C Hamano f0c9253ef9 Merge branch 'jj/doc-markup-hints-in-coding-guidelines'
* jj/doc-markup-hints-in-coding-guidelines:
  State correct usage of literal examples in man pages in the coding standards
2013-12-03 11:41:44 -08:00
Junio C Hamano a2cb44c61d Merge branch 'jj/log-doc'
Mark-up fixes.

* jj/log-doc:
  Documentation/git-log.txt: mark-up fix and minor rephasing
  Documentation/git-log: update "--log-size" description
2013-12-03 11:41:41 -08:00
Junio C Hamano a8cb37fb39 Merge branch 'jj/rev-list-options-doc'
Mark-up and grammo fixes.

* jj/rev-list-options-doc:
  Documentation/rev-list-options.txt: fix some grammatical issues and typos
  Documentation/rev-list-options.txt: fix mark-up
2013-12-03 11:41:37 -08:00
Junio C Hamano 144d84644f Merge branch 'mi/typofixes'
* mi/typofixes:
  contrib: typofixes
  Documentation/technical/http-protocol.txt: typofixes
  typofixes: fix misspelt comments
2013-12-03 11:41:33 -08:00
Junio C Hamano 23ca729228 Merge branch 'tb/doc-fetch-pack-url'
* tb/doc-fetch-pack-url:
  git-fetch-pack uses URLs like git-fetch
2013-12-03 11:41:31 -08:00
Junio C Hamano a155a5f075 Git 1.8.5.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03 11:16:56 -08:00
Nick Townsend 2951add0e9 ref-iteration doc: add_submodule_odb() returns 0 for success
The usage sample of add_submodule_odb() function in the Submodules
section expects non-zero return value for success, but the function
actually reports success with zero.

Helped-by: René Scharfe <l.s.r@web.de>
Reviewed-by: Heiko Voigt <hvoigt@hvoigt.net>
Signed-off-by: Nick Townsend <nick.townsend@mac.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-03 10:40:40 -08:00
Junio C Hamano be38bee862 Sync with 1.8.4.5 2013-12-02 15:34:44 -08:00
Junio C Hamano 2f93541d88 Git 1.8.4.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02 15:33:30 -08:00
Junio C Hamano ac1fbbda20 submodule: do not copy unknown update mode from .gitmodules
When submodule.$name.update is given as hint from the upstream in
the .gitmodules file, we used to blindly copy it to .git/config,
unless there already is a value defined for the submodule.

However, there is no reason to expect that the update mode hinted by
the upstream is available in the version of Git the user is using,
and a really custom "!cmd" prepared by an upstream person running on
Linux may not even be available to a user on Windows.  It is simply
irresponsible to copy the setting blindly and to attempt to use it
during a later "submodule update" without validating it first.

Just show the suggested value to the diagnostic output, and set the
value to 'none' in the configuration, if it is not one of the ones
that are known to be supported by this version of Git.

Helped-by: Jens Lehmann <Jens.Lehmann@web.de>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-12-02 13:48:06 -08:00
Junio C Hamano d2446dfd7f Git 1.8.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27 12:14:45 -08:00
Junio C Hamano 4a3fc52d34 Sync with maint
* maint:
  remote-hg: don't decode UTF-8 paths into Unicode objects
2013-11-27 12:13:29 -08:00
Richard Hansen 5c1d2e8af9 remote-hg: don't decode UTF-8 paths into Unicode objects
The internal mercurial API expects ordinary 8-bit string objects, not
Unicode string objects.  With this change, the test-hg.sh unit tests
pass again.

Signed-off-by: Richard Hansen <rhansen@bbn.com>
Reviewed-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-27 12:09:50 -08:00
Junio C Hamano c302941cd7 Merge branch 'rh/remote-hg-bzr-updates' (early part)
Unbreaks a recent breakage due to use of unquote-c-style.

This may need to be cherry-picked down to 1.8.4.x series.

* 'rh/remote-hg-bzr-updates' (early part):
  remote-hg: don't decode UTF-8 paths into Unicode objects
2013-11-25 08:20:02 -08:00
Jeff King b039718d92 drop support for "experimental" loose objects
In git v1.4.3, we introduced a new loose object format that
encoded some object information outside of the zlib stream.
Ultimately the format was dropped in v1.5.3, but we kept the
reading side around to help people migrate objects. Each
time we open a loose object, we use a heuristic to check
whether it is in the normal loose format, or the
experimental one.

This heuristic is robust in the face of valid data, but it
tends to treat corrupted or garbage data as an experimental
object. With the regular format, we would notice quickly
that zlib's crc does not check out and complain. With the
experimental object, we are likely to extract a nonsensical
object size and try to allocate a huge buffer, resulting in
xmalloc calling "die".

This latter behavior is much worse, for two reasons. One,
git reports an allocation error when the real error is
corruption. And two, the program dies unconditionally, so
you cannot even run fsck (which would otherwise ignore the
broken object and keep going).

We could try to improve the heuristic to err on the side of
normal objects in the face of corruption, but there is
really little point. The experimental format is long-dead,
and was never enabled by default to begin with. We can
instead simply remove it. The only affected repository would
be one that explicitly set core.legacyheaders in 2007, and
then never repacked in the intervening 6 years.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-21 11:43:42 -08:00
Nguyễn Thái Ngọc Duy 746be68d31 glossary-content.txt: fix documentation of "**" patterns
"**" means bold in ASCIIDOC, so we need to escape it. This is similar
to 8447dc8 (gitignore.txt: fix documentation of "**" patterns -
2013-11-07)

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-21 10:33:40 -08:00
Jason St. John 0b7e4e0da4 Documentation/gitcli.txt: fix double quotes
Replace double quotes around literal examples with backticks

Signed-off-by: Jason St. John <jstjohn@purdue.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 15:18:39 -08:00
Nguyễn Thái Ngọc Duy 887c6c18ba diff: restrict pathspec limitations to diff b/f case only
builtin_diff_b_f() needs a path, not pathspec. Other modes in diff
can deal with pathspec just fine. But because of the current
GUARD_PATHSPEC() location, other modes also reject :(glob) and
:(icase).

Move GUARD_PATHSPEC(), and the "path" assignment statement, which is
the reason of this GUARD_PATHSPEC(), inside builtin_diff_b_f().

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 15:04:51 -08:00
Junio C Hamano 5fd09df393 Git 1.8.5-rc3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 11:27:26 -08:00
Junio C Hamano 039a6d2463 Sync with 1.8.4.4 2013-11-20 11:26:59 -08:00
Junio C Hamano becb4336cb Git 1.8.4.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-20 11:26:08 -08:00
Junio C Hamano a39afc08cb Merge branch 'mb/relnotes-1.8.5-fix'
* mb/relnotes-1.8.5-fix:
  RelNotes: spelling & grammar fixes
2013-11-20 11:15:25 -08:00
Ramkumar Ramachandra db64eb655b for-each-ref: avoid color leakage
To make sure that an invocation like the following doesn't leak color,

  $ git for-each-ref --format='%(subject)%(color:green)'

auto-reset at the end of the format string when the last color token
seen in the format string isn't a color-reset.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-19 10:14:15 -08:00
Ramkumar Ramachandra fddb74c947 for-each-ref: introduce %(color:...) for color
Enhance 'git for-each-ref' with color formatting options.  You can now
use the following format in for-each-ref:

  %(color:green)%(refname:short)%(color:reset)

where color names are described in color.branch.*.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-11-19 10:14:15 -08:00