OSDN Git Service

git-core/git.git
7 years agoMerge branch 'jk/diff-submodule-diff-inline'
Junio C Hamano [Mon, 29 May 2017 03:34:42 +0000 (12:34 +0900)]
Merge branch 'jk/diff-submodule-diff-inline'

"git diff --submodule=diff" now recurses into nested submodules.

* jk/diff-submodule-diff-inline:
  diff: recurse into nested submodules for inline diff

7 years agoMerge branch 'bw/dir-c-stops-relying-on-the-index'
Junio C Hamano [Mon, 29 May 2017 03:34:41 +0000 (12:34 +0900)]
Merge branch 'bw/dir-c-stops-relying-on-the-index'

API update.

* bw/dir-c-stops-relying-on-the-index:
  dir: convert fill_directory to take an index
  dir: convert read_directory to take an index
  dir: convert read_directory_recursive to take an index
  dir: convert open_cached_dir to take an index
  dir: convert is_excluded to take an index
  dir: convert prep_exclude to take an index
  dir: convert add_excludes to take an index
  dir: convert is_excluded_from_list to take an index
  dir: convert last_exclude_matching_from_list to take an index
  dir: convert dir_add* to take an index
  dir: convert get_dtype to take index
  dir: convert directory_exists_in_index to take index
  dir: convert read_skip_worktree_file_from_index to take an index
  dir: stop using the index compatibility macros

7 years agoMerge branch 'sb/checkout-recurse-submodules'
Junio C Hamano [Mon, 29 May 2017 03:34:41 +0000 (12:34 +0900)]
Merge branch 'sb/checkout-recurse-submodules'

"git checkout --recurse-submodules" did not quite work with a
submodule that itself has submodules.

* sb/checkout-recurse-submodules:
  submodule: properly recurse for read-tree and checkout
  submodule: avoid auto-discovery in new working tree manipulator code
  submodule_move_head: reuse child_process structure for futher commands

7 years agoMerge branch 'jc/repack-threads'
Junio C Hamano [Mon, 29 May 2017 03:34:41 +0000 (12:34 +0900)]
Merge branch 'jc/repack-threads'

"git repack" learned to accept the --threads=<n> option and pass it
to pack-objects.

* jc/repack-threads:
  repack: accept --threads=<n> and pass it down to pack-objects

7 years agoMerge branch 'sb/reset-recurse-submodules'
Junio C Hamano [Mon, 29 May 2017 03:34:40 +0000 (12:34 +0900)]
Merge branch 'sb/reset-recurse-submodules'

"git reset" learned "--recurse-submodules" option.

* sb/reset-recurse-submodules:
  builtin/reset: add --recurse-submodules switch
  submodule.c: submodule_move_head works with broken submodules
  submodule.c: uninitialized submodules are ignored in recursive commands
  entry.c: submodule recursing: respect force flag correctly

7 years agoSecond batch for 2.14
Junio C Hamano [Tue, 23 May 2017 04:51:32 +0000 (13:51 +0900)]
Second batch for 2.14

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'ab/fix-poison-tests'
Junio C Hamano [Tue, 23 May 2017 04:46:08 +0000 (13:46 +0900)]
Merge branch 'ab/fix-poison-tests'

Update tests to pass under GETTEXT_POISON (a mechanism to ensure
that output strings that should not be translated are not
translated by mistake), and tell TravisCI to run them.

* ab/fix-poison-tests:
  travis-ci: add job to run tests with GETTEXT_POISON
  travis-ci: setup "prove cache" in "script" step
  tests: fix tests broken under GETTEXT_POISON=YesPlease

7 years agoMerge branch 'tb/dedup-crlf-tests'
Junio C Hamano [Tue, 23 May 2017 04:46:07 +0000 (13:46 +0900)]
Merge branch 'tb/dedup-crlf-tests'

* tb/dedup-crlf-tests:
  t0027: tests are not expensive; remove t0025

7 years agoMerge branch 'jt/push-options-doc'
Junio C Hamano [Tue, 23 May 2017 04:46:07 +0000 (13:46 +0900)]
Merge branch 'jt/push-options-doc'

The receive-pack program now makes sure that the push certificate
records the same set of push options used for pushing.

* jt/push-options-doc:
  receive-pack: verify push options in cert
  docs: correct receive.advertisePushOptions default

7 years agoMerge branch 'ab/doc-replace-gmane-links'
Junio C Hamano [Tue, 23 May 2017 04:46:05 +0000 (13:46 +0900)]
Merge branch 'ab/doc-replace-gmane-links'

The Web interface to gmane news archive is long gone, even though
the articles are still accessible via NTTP.  Replace the links with
ones to public-inbox.org.  Because their message identification is
based on the actual message-id, it is likely that it will be easier
to migrate away from it if/when necessary.

* ab/doc-replace-gmane-links:
  doc: replace more gmane links
  doc: replace a couple of broken gmane links

7 years agoMerge branch 'rs/checkout-am-fix-unborn'
Junio C Hamano [Tue, 23 May 2017 04:46:05 +0000 (13:46 +0900)]
Merge branch 'rs/checkout-am-fix-unborn'

A few codepaths in "checkout" and "am" working on an unborn branch
tried to access an uninitialized piece of memory.

* rs/checkout-am-fix-unborn:
  am: check return value of resolve_refdup before using hash
  checkout: check return value of resolve_refdup before using hash

7 years agoMerge branch 'ls/travis-relays-for-windows-ci'
Junio C Hamano [Tue, 23 May 2017 04:46:03 +0000 (13:46 +0900)]
Merge branch 'ls/travis-relays-for-windows-ci'

* ls/travis-relays-for-windows-ci:
  travis-ci: retry if Git for Windows CI returns HTTP error 502 or 503
  travis-ci: handle Git for Windows CI status "failed" explicitly

7 years agoMerge branch 'ah/log-decorate-default-to-auto'
Junio C Hamano [Tue, 23 May 2017 04:46:02 +0000 (13:46 +0900)]
Merge branch 'ah/log-decorate-default-to-auto'

Setting "log.decorate=false" in the configuration file did not take
effect in v2.13, which has been corrected.

* ah/log-decorate-default-to-auto:
  builtin/log: honor log.decorate

7 years agoMerge branch 'bw/submodule-with-bs-path'
Junio C Hamano [Tue, 23 May 2017 04:46:01 +0000 (13:46 +0900)]
Merge branch 'bw/submodule-with-bs-path'

A hotfix to a topic that is already in v2.13.

* bw/submodule-with-bs-path:
  t7400: add !CYGWIN prerequisite to 'add with \\ in path'

7 years agoStart post 2.13 cycle
Junio C Hamano [Tue, 16 May 2017 02:52:09 +0000 (11:52 +0900)]
Start post 2.13 cycle

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'js/larger-timestamps'
Junio C Hamano [Tue, 16 May 2017 02:51:59 +0000 (11:51 +0900)]
Merge branch 'js/larger-timestamps'

Some platforms have ulong that is smaller than time_t, and our
historical use of ulong for timestamp would mean they cannot
represent some timestamp that the platform allows.  Invent a
separate and dedicated timestamp_t (so that we can distingiuish
timestamps and a vanilla ulongs, which along is already a good
move), and then declare uintmax_t is the type to be used as the
timestamp_t.

* js/larger-timestamps:
  archive-tar: fix a sparse 'constant too large' warning
  use uintmax_t for timestamps
  date.c: abort if the system time cannot handle one of our timestamps
  timestamp_t: a new data type for timestamps
  PRItime: introduce a new "printf format" for timestamps
  parse_timestamp(): specify explicitly where we parse timestamps
  t0006 & t5000: skip "far in the future" test when time_t is too limited
  t0006 & t5000: prepare for 64-bit timestamps
  ref-filter: avoid using `unsigned long` for catch-all data type

7 years agoMerge branch 'jc/apply-fix-mismerge'
Junio C Hamano [Tue, 16 May 2017 02:51:59 +0000 (11:51 +0900)]
Merge branch 'jc/apply-fix-mismerge'

* jc/apply-fix-mismerge:
  apply.c: fix whitespace-only mismerge

7 years agoMerge branch 'ab/aix-needs-compat-regex'
Junio C Hamano [Tue, 16 May 2017 02:51:58 +0000 (11:51 +0900)]
Merge branch 'ab/aix-needs-compat-regex'

Build fix.

* ab/aix-needs-compat-regex:
  config.mak.uname: set NO_REGEX=NeedsStartEnd on AIX

7 years agoMerge branch 'jn/credential-doc-on-clear'
Junio C Hamano [Tue, 16 May 2017 02:51:57 +0000 (11:51 +0900)]
Merge branch 'jn/credential-doc-on-clear'

Doc update.

* jn/credential-doc-on-clear:
  credential doc: make multiple-helper behavior more prominent

7 years agoMerge branch 'jn/clone-add-empty-config-from-command-line'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)]
Merge branch 'jn/clone-add-empty-config-from-command-line'

"git clone --config var=val" is a way to populate the
per-repository configuration file of the new repository, but it did
not work well when val is an empty string.  This has been fixed.

* jn/clone-add-empty-config-from-command-line:
  clone: handle empty config values in -c

7 years agoMerge branch 'bw/submodule-has-commits-update'
Junio C Hamano [Tue, 16 May 2017 02:51:56 +0000 (11:51 +0900)]
Merge branch 'bw/submodule-has-commits-update'

Code clean-up and duplicate removal.

* bw/submodule-has-commits-update:
  submodule: refactor logic to determine changed submodules
  submodule: improve submodule_has_commits()
  submodule: change string_list changed_submodule_paths
  submodule: remove add_oid_to_argv()
  submodule: rename free_submodules_sha1s()
  submodule: rename add_sha1_to_array()

7 years agoMerge branch 'ls/travis-doc-asciidoctor'
Junio C Hamano [Tue, 16 May 2017 02:51:55 +0000 (11:51 +0900)]
Merge branch 'ls/travis-doc-asciidoctor'

Travis CI gained a task to format the documentation with both
AsciiDoc and AsciiDoctor.

* ls/travis-doc-asciidoctor:
  travis-ci: check AsciiDoc/AsciiDoctor stderr output
  travis-ci: unset compiler for jobs that do not need one
  travis-ci: parallelize documentation build
  travis-ci: build documentation with AsciiDoc and Asciidoctor

7 years agoMerge branch 'rs/large-zip'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)]
Merge branch 'rs/large-zip'

"git archive --format=zip" learned to use zip64 extension when
necessary to go beyond the 4GB limit.

* rs/large-zip:
  t5004: require 64-bit support for big ZIP tests
  archive-zip: set version field for big files correctly
  archive-zip: support files bigger than 4GB
  archive-zip: support archives bigger than 4GB
  archive-zip: write ZIP dir entry directly to strbuf
  archive-zip: use strbuf for ZIP directory
  archive-zip: add tests for big ZIP archives

7 years agoMerge branch 'ab/clone-no-tags'
Junio C Hamano [Tue, 16 May 2017 02:51:54 +0000 (11:51 +0900)]
Merge branch 'ab/clone-no-tags'

"git clone" learned the "--no-tags" option not to fetch all tags
initially, and also set up the tagopt not to follow any tags in
subsequent fetches.

* ab/clone-no-tags:
  tests: rename a test having to do with shallow submodules
  clone: add a --no-tags option to clone without tags
  tests: change "cd ... && git fetch" to "cd &&\n\tgit fetch"

7 years agoMerge branch 'sk/status-short-branch-color-config'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)]
Merge branch 'sk/status-short-branch-color-config'

The colors in which "git status --short --branch" showed the names
of the current branch and its remote-tracking branch are now
configurable.

* sk/status-short-branch-color-config:
  status: add color config slots for branch info in "--short --branch"
  status: fix missing newline when comment chars are disabled

7 years agoMerge branch 'jk/am-leakfix'
Junio C Hamano [Tue, 16 May 2017 02:51:53 +0000 (11:51 +0900)]
Merge branch 'jk/am-leakfix'

The codepath in "git am" that is used when running "git rebase"
leaked memory held for the log message of the commits being rebased.

* jk/am-leakfix:
  am: shorten ident_split variable name in get_commit_info()
  am: simplify allocations in get_commit_info()
  am: fix commit buffer leak in get_commit_info()

7 years agoMerge branch 'jt/use-trailer-api-in-commands'
Junio C Hamano [Tue, 16 May 2017 02:51:52 +0000 (11:51 +0900)]
Merge branch 'jt/use-trailer-api-in-commands'

"git cherry-pick" and other uses of the sequencer machinery
mishandled a trailer block whose last line is an incomplete line.
This has been fixed so that an additional sign-off etc. are added
after completing the existing incomplete line.

* jt/use-trailer-api-in-commands:
  sequencer: add newline before adding footers

7 years agoMerge branch 'nd/worktree-kill-parse-ref'
Junio C Hamano [Tue, 16 May 2017 02:51:51 +0000 (11:51 +0900)]
Merge branch 'nd/worktree-kill-parse-ref'

"git gc" did not interact well with "git worktree"-managed
per-worktree refs.

* nd/worktree-kill-parse-ref:
  refs: kill set_worktree_head_symref()
  worktree.c: kill parse_ref() in favor of refs_resolve_ref_unsafe()
  refs: introduce get_worktree_ref_store()
  refs: add REFS_STORE_ALL_CAPS
  refs.c: make submodule ref store hashmap generic
  environment.c: fix potential segfault by get_git_common_dir()

7 years agoMerge branch 'dt/gc-ignore-old-gc-logs'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)]
Merge branch 'dt/gc-ignore-old-gc-logs'

Attempt to allow us notice "fishy" situation where we fail to
remove the temporary directory used during the test.

* dt/gc-ignore-old-gc-logs:
  test-lib: retire $remove_trash variable
  test-lib.sh: do not barf under --debug at the end of the test
  test-lib: abort when can't remove trash directory

7 years agoMerge branch 'jk/no-null-sha1-in-cache-tree'
Junio C Hamano [Tue, 16 May 2017 02:51:50 +0000 (11:51 +0900)]
Merge branch 'jk/no-null-sha1-in-cache-tree'

Code to update the cache-tree has been tightened so that we won't
accidentally write out any 0{40} entry in the tree object.

* jk/no-null-sha1-in-cache-tree:
  cache-tree: reject entries with null sha1

7 years agoMerge branch 'dt/raise-core-packed-git-limit'
Junio C Hamano [Tue, 16 May 2017 02:51:49 +0000 (11:51 +0900)]
Merge branch 'dt/raise-core-packed-git-limit'

The default packed-git limit value has been raised on larger
platforms to save "git fetch" from a (recoverable) failure while
"gc" is running in parallel.

* dt/raise-core-packed-git-limit:
  Increase core.packedGitLimit

7 years agobuiltin/log: honor log.decorate
brian m. carlson [Sun, 14 May 2017 18:00:58 +0000 (18:00 +0000)]
builtin/log: honor log.decorate

The recent change that introduced autodecorating of refs accidentally
broke the ability of users to set log.decorate = false to override it.
When the git_log_config was traversed a second time with an option other
than log.decorate, the decoration style would be set to the automatic
style, even if the user had already overridden it.  Instead of setting
the option in config parsing, set it in init_log_defaults instead.

Add a test for this case.  The actual additional config option doesn't
matter, but it needs to be something not already set in the
configuration file.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Acked-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: add job to run tests with GETTEXT_POISON
Lars Schneider [Fri, 5 May 2017 15:40:53 +0000 (17:40 +0200)]
travis-ci: add job to run tests with GETTEXT_POISON

Add a job to run Git tests with GETTEXT_POISON. In this job we don't run
the git-p4, git-svn, and HTTPD tests to save resources/time (those tests
are already executed in other jobs). Since we don't run these tests, we
can also skip the "before_install" step (which would install the
necessary dependencies) with an empty override.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotravis-ci: setup "prove cache" in "script" step
Lars Schneider [Fri, 5 May 2017 15:40:52 +0000 (17:40 +0200)]
travis-ci: setup "prove cache" in "script" step

The command that made the "prove cache" persistent across builds was
executed in the "before_install" step. Consequently, every job that
wanted to make use of the cache had to run this step.

The "prove cache" is only used in the "script" step for the
"make test" command. Therefore, we should configure the "prove cache"
in this step.

This change is useful for a subsequent patch that adds a job which does
not need the "before_install" step but wants to run the "script" step to
execute the tests.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotests: fix tests broken under GETTEXT_POISON=YesPlease
Ævar Arnfjörð Bjarmason [Fri, 5 May 2017 18:19:32 +0000 (18:19 +0000)]
tests: fix tests broken under GETTEXT_POISON=YesPlease

The GETTEXT_POISON=YesPlease compile-time testing option added in my
bb946bba76 ("i18n: add GETTEXT_POISON to simulate unfriendly
translator", 2011-02-22) has been slowly bitrotting as strings have
been marked for translation, and new tests have been added without
running it.

I brought this up on the list ("[BUG] test suite broken with
GETTEXT_POISON=YesPlease", [1]) asking whether this mode was useful at
all anymore. At least one person occasionally uses it, and Lars
Schneider offered to change one of the the Travis builds to run in
this mode, so fix up the failing ones.

My test setup runs most of the tests, with the notable exception of
skipping all the p4 tests, so it's possible that there's still some
lurking regressions I haven't fixed.

1. <CACBZZX62+acvi1dpkknadTL827mtCm_QesGSZ=6+UnyeMpg8+Q@mail.gmail.com>

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot0027: tests are not expensive; remove t0025
Torsten Bögershausen [Wed, 10 May 2017 14:06:19 +0000 (16:06 +0200)]
t0027: tests are not expensive; remove t0025

The purpose of t0027 is to test all CRLF related conversions at "git
checkout" and "git add".  Running t0027 under Git for Windows takes
3-4 minutes, so the whole script had been marked as "EXPENSIVE".

However, the "Git for Windows" fork overrides this since 2014:
"t0027 is marked expensive, but really, for MinGW we want to run
these tests always."

The test seems not to be expensive on other platforms at all: it
takes less than 14 seconds under Linux, and 63 seconds under Mac Os
X, and this is more or less the same with a SSD or a spinning disk.

So let's drop the "EXPENSIVE" prereq.

While at it, retire t0025; recent "stress" tests show that t0025 is
flaky, reported by Lars Schneider <larsxschneider@gmail.com>, but
all tests in t0025 are covered by t0027 already.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoreceive-pack: verify push options in cert
Jonathan Tan [Tue, 9 May 2017 19:23:53 +0000 (12:23 -0700)]
receive-pack: verify push options in cert

In commit f6a4e61 ("push: accept push options", 2016-07-14), send-pack
was taught to include push options both within the signed cert (if the
push is a signed push) and outside the signed cert; however,
receive-pack ignores push options within the cert, only handling push
options outside the cert.

Teach receive-pack, in the case that push options are provided for a
signed push, to verify that the push options both within the cert and
outside the cert are consistent.

This sets in stone the requirement that send-pack redundantly send its
push options in 2 places, but I think that this is better than the
alternatives. Sending push options only within the cert is
backwards-incompatible with existing Git servers (which read push
options only from outside the cert), and sending push options only
outside the cert means that the push options are not signed for.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: replace more gmane links
Junio C Hamano [Mon, 8 May 2017 01:38:59 +0000 (10:38 +0900)]
doc: replace more gmane links

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoGit 2.13 v2.13.0
Junio C Hamano [Tue, 9 May 2017 14:26:02 +0000 (23:26 +0900)]
Git 2.13

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po
Junio C Hamano [Tue, 9 May 2017 14:25:26 +0000 (23:25 +0900)]
Merge tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po

l10n for Git 2.13.0 round 2.1

* tag 'l10n-2.13.0-rnd2.1' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 2
  l10n: sv.po: Update Swedish translation (3195t0f0u)
  l10n: zh_CN: review for git v2.13.0 l10n round 1
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (3195t)
  l10n: fr.po v2.13 rnd 2
  l10n: de.po: translate 4 new messages
  l10n: de.po: update German translation
  l10n: de.po: lower case after semi-colon
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2
  l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)

7 years agoMerge branch 'master' of git://github.com/nafmo/git-l10n-sv
Jiang Xin [Tue, 9 May 2017 14:12:34 +0000 (22:12 +0800)]
Merge branch 'master' of git://github.com/nafmo/git-l10n-sv

* 'master' of git://github.com/nafmo/git-l10n-sv:
  l10n: sv.po: Update Swedish translation (3195t0f0u)

7 years agol10n: zh_CN: for git v2.13.0 l10n round 2
Jiang Xin [Tue, 9 May 2017 13:55:38 +0000 (21:55 +0800)]
l10n: zh_CN: for git v2.13.0 l10n round 2

Translate 4 messages (3195t0f0u) for git v2.13.0-rc2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agol10n: sv.po: Update Swedish translation (3195t0f0u)
Peter Krefting [Tue, 9 May 2017 07:05:09 +0000 (08:05 +0100)]
l10n: sv.po: Update Swedish translation (3195t0f0u)

Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
7 years agoSync with v2.12.3
Junio C Hamano [Tue, 9 May 2017 03:20:21 +0000 (20:20 -0700)]
Sync with v2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jh/verify-index-checksum-only-in-fsck'
Junio C Hamano [Tue, 9 May 2017 03:17:42 +0000 (12:17 +0900)]
Merge branch 'jh/verify-index-checksum-only-in-fsck'

* jh/verify-index-checksum-only-in-fsck:
  t1450: avoid use of "sed" on the index, which is a binary file

7 years agodocs: correct receive.advertisePushOptions default
Jonathan Tan [Mon, 8 May 2017 21:33:50 +0000 (14:33 -0700)]
docs: correct receive.advertisePushOptions default

In commit c714e45 ("receive-pack: implement advertising and receiving
push options", 2016-07-14), receive-pack was taught to (among other
things) advertise that it understood push options, depending on
configuration. It was documented that it advertised such ability by
default; however, it actually does not. (In that commit, notice that
advertise_push_options defaults to 0, unlike advertise_atomic_push which
defaults to 1.)

Update the documentation to state that it does not advertise the ability
by default.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoapply.c: fix whitespace-only mismerge
Junio C Hamano [Tue, 9 May 2017 02:30:24 +0000 (19:30 -0700)]
apply.c: fix whitespace-only mismerge

4af9a7d3 ("Merge branch 'bc/object-id'", 2016-09-19) involved
merging a lot of changes made to builtin/apply.c on the side branch
manually to apply.c as an intervening commit 13b5af22 ("apply: move
libified code from builtin/apply.c to apply.{c,h}", 2016-04-22)
moved a lot of the lines changed on the side branch to a different
file apply.c at the top-level, requiring manual patching of it.
Apparently, the maintainer screwed up and made the code indent in a
funny way while doing so.

Reported-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoarchive-tar: fix a sparse 'constant too large' warning
Ramsay Jones [Mon, 8 May 2017 20:34:58 +0000 (21:34 +0100)]
archive-tar: fix a sparse 'constant too large' warning

Commit dddbad728c ("timestamp_t: a new data type for timestamps",
26-04-2017) introduced a new typedef 'timestamp_t', as a synonym for an
unsigned long, which was used at the time to represent timestamps in
git. A later commit 28f4aee3fb ("use uintmax_t for timestamps",
26-04-2017) changed the typedef to use an 'uintmax_t' for the timestamp
representation type.

When building on a 32-bit Linux system, sparse complains that a constant
(USTAR_MAX_MTIME) used to detect a 'far-future mtime' timestamp, is too
large; 'warning: constant 077777777777UL is so big it is unsigned long
long' on lines 335 and 338 of archive-tar.c. Note that both gcc and
clang only issue a warning if this constant is used in a context that
requires an 'unsigned long' (rather than an uintmax_t). (Since TIME_MAX
is no longer equal to 0xFFFFFFFF, even on a 32-bit system, the macro
USTAR_MAX_MTIME is set to 077777777777UL, which cannot be represented as
an 'unsigned long' constant).

In order to suppress the warning, change the definition of the macro
constant USTAR_MAX_MTIME to use an 'ULL' type suffix.

In a similar vein, on systems which use a 64-bit representation of the
'unsigned long' type, the USTAR_MAX_SIZE constant macro is defined with
the value 077777777777ULL. Although this does not cause any warning
messages to be issued, it would be more appropriate for this constant
to use an 'UL' type suffix rather than 'ULL'.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: zh_CN: review for git v2.13.0 l10n round 1
Ray Chen [Tue, 2 May 2017 15:42:43 +0000 (23:42 +0800)]
l10n: zh_CN: review for git v2.13.0 l10n round 1

Signed-off-by: Ray Chen <oldsharp@gmail.com>
7 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Mon, 8 May 2017 22:39:31 +0000 (06:39 +0800)]
Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po(3195t): Update translation for v2.13.0 round 2

7 years agol10n: Update Catalan translation
Jordi Mas [Sun, 7 May 2017 08:12:01 +0000 (10:12 +0200)]
l10n: Update Catalan translation

Signed-off-by: Jordi Mas <jmas@softcatala.org>
7 years agol10n: bg.po: Updated Bulgarian translation (3195t)
Alexander Shopov [Sun, 7 May 2017 07:25:19 +0000 (09:25 +0200)]
l10n: bg.po: Updated Bulgarian translation (3195t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
7 years agoMerge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git
Jiang Xin [Mon, 8 May 2017 22:18:53 +0000 (06:18 +0800)]
Merge branch 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git

* 'fr_l10n_v2.13_rnd2' of git://github.com/jnavila/git:
  l10n: fr.po v2.13 rnd 2

7 years agoam: check return value of resolve_refdup before using hash
René Scharfe [Sat, 6 May 2017 17:13:56 +0000 (19:13 +0200)]
am: check return value of resolve_refdup before using hash

If resolve_refdup() fails it returns NULL and possibly leaves its hash
output parameter untouched.  Make sure to use it only if the function
succeeded, in order to avoid accessing uninitialized memory.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocheckout: check return value of resolve_refdup before using hash
René Scharfe [Sat, 6 May 2017 17:13:52 +0000 (19:13 +0200)]
checkout: check return value of resolve_refdup before using hash

If resolve_refdup() fails it returns NULL and possibly leaves its hash
output parameter untouched.  Make sure to use it only if the function
succeeded, in order to avoid accessing uninitialized memory.

Found with t/t2011-checkout-invalid-head.sh --valgrind.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodoc: replace a couple of broken gmane links
Ævar Arnfjörð Bjarmason [Fri, 5 May 2017 10:08:03 +0000 (10:08 +0000)]
doc: replace a couple of broken gmane links

Replace a couple of broken links to gmane with links to other
archives. See commit 54471fdcc3 ("README: replace gmane link with
public-inbox", 2016-12-15) for prior art.

With this change there's still 4 references left in the code:

    $ git grep -E '(article|thread)\.gmane.org' -- |grep -v RelNotes|wc -l
    4

I couldn't find alternative links for those.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiff: recurse into nested submodules for inline diff
Stefan Beller [Thu, 4 May 2017 21:43:55 +0000 (14:43 -0700)]
diff: recurse into nested submodules for inline diff

When fd47ae6a5b (diff: teach diff to display submodule difference with an
inline diff, 2016-08-31) was introduced, we did not think of recursing
into nested submodules.

When showing the inline diff for submodules, automatically recurse
into nested submodules as well with inline submodule diffs.

Signed-off-by: Stefan Beller <sbeller@google.com>
Acked-by: Jacob Keller <jacob.keller@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert fill_directory to take an index
Brandon Williams [Fri, 5 May 2017 19:53:34 +0000 (12:53 -0700)]
dir: convert fill_directory to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert read_directory to take an index
Brandon Williams [Fri, 5 May 2017 19:53:33 +0000 (12:53 -0700)]
dir: convert read_directory to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert read_directory_recursive to take an index
Brandon Williams [Fri, 5 May 2017 19:53:32 +0000 (12:53 -0700)]
dir: convert read_directory_recursive to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert open_cached_dir to take an index
Brandon Williams [Fri, 5 May 2017 19:53:31 +0000 (12:53 -0700)]
dir: convert open_cached_dir to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert is_excluded to take an index
Brandon Williams [Fri, 5 May 2017 19:53:30 +0000 (12:53 -0700)]
dir: convert is_excluded to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert prep_exclude to take an index
Brandon Williams [Fri, 5 May 2017 19:53:29 +0000 (12:53 -0700)]
dir: convert prep_exclude to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert add_excludes to take an index
Brandon Williams [Fri, 5 May 2017 19:53:28 +0000 (12:53 -0700)]
dir: convert add_excludes to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert is_excluded_from_list to take an index
Brandon Williams [Fri, 5 May 2017 19:53:27 +0000 (12:53 -0700)]
dir: convert is_excluded_from_list to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert last_exclude_matching_from_list to take an index
Brandon Williams [Fri, 5 May 2017 19:53:26 +0000 (12:53 -0700)]
dir: convert last_exclude_matching_from_list to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert dir_add* to take an index
Brandon Williams [Fri, 5 May 2017 19:53:25 +0000 (12:53 -0700)]
dir: convert dir_add* to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert get_dtype to take index
Brandon Williams [Fri, 5 May 2017 19:53:24 +0000 (12:53 -0700)]
dir: convert get_dtype to take index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert directory_exists_in_index to take index
Brandon Williams [Fri, 5 May 2017 19:53:23 +0000 (12:53 -0700)]
dir: convert directory_exists_in_index to take index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: convert read_skip_worktree_file_from_index to take an index
Brandon Williams [Fri, 5 May 2017 19:53:22 +0000 (12:53 -0700)]
dir: convert read_skip_worktree_file_from_index to take an index

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodir: stop using the index compatibility macros
Brandon Williams [Fri, 5 May 2017 19:53:21 +0000 (12:53 -0700)]
dir: stop using the index compatibility macros

In order to make it clearer where the_index is being referenced, stop
using the index compatibility macros in dir.c.  This is to make it
easier to identify the functions which need to be convert to taking in a
'struct index_state' as a parameter.

The end goal would be to eliminate the need to reference global index
state in dir.c.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: fr.po v2.13 rnd 2
Jean-Noel Avila [Fri, 5 May 2017 09:55:14 +0000 (11:55 +0200)]
l10n: fr.po v2.13 rnd 2

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
7 years agol10n: de.po: translate 4 new messages
Ralf Thielow [Fri, 5 May 2017 09:23:53 +0000 (11:23 +0200)]
l10n: de.po: translate 4 new messages

Translate 4 new messages came from git.pot update in 28e1aaa48 (l10n:
git.pot: v2.13.0 round 2 (4 new, 7 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: update German translation
Ralf Thielow [Thu, 13 Apr 2017 14:45:29 +0000 (16:45 +0200)]
l10n: de.po: update German translation

Translate 96 new messages came from git.pot update in dfc182b (l10n:
git.pot: v2.13.0 round 1 (96 new, 37 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Matthias Rüster <matthias.ruester@gmail.com>
7 years agol10n: de.po: lower case after semi-colon
Michael J Gruber [Fri, 17 Mar 2017 15:04:19 +0000 (16:04 +0100)]
l10n: de.po: lower case after semi-colon

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
7 years agol10n: vi.po(3195t): Update translation for v2.13.0 round 2
Tran Ngoc Quan [Fri, 5 May 2017 06:41:32 +0000 (13:41 +0700)]
l10n: vi.po(3195t): Update translation for v2.13.0 round 2

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
7 years agoGit 2.12.3 v2.12.3
Junio C Hamano [Fri, 5 May 2017 04:33:22 +0000 (13:33 +0900)]
Git 2.12.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.11' into maint
Junio C Hamano [Fri, 5 May 2017 04:31:40 +0000 (13:31 +0900)]
Merge branch 'maint-2.11' into maint

7 years agoGit 2.11.2 v2.11.2
Junio C Hamano [Fri, 5 May 2017 04:29:43 +0000 (13:29 +0900)]
Git 2.11.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.10' into maint-2.11
Junio C Hamano [Fri, 5 May 2017 04:26:31 +0000 (13:26 +0900)]
Merge branch 'maint-2.10' into maint-2.11

7 years agoGit 2.10.3 v2.10.3
Junio C Hamano [Fri, 5 May 2017 04:24:10 +0000 (13:24 +0900)]
Git 2.10.3

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.9' into maint-2.10
Junio C Hamano [Fri, 5 May 2017 04:21:52 +0000 (13:21 +0900)]
Merge branch 'maint-2.9' into maint-2.10

7 years agoGit 2.9.4 v2.9.4
Junio C Hamano [Fri, 5 May 2017 04:18:23 +0000 (13:18 +0900)]
Git 2.9.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.8' into maint-2.9
Junio C Hamano [Fri, 5 May 2017 04:13:48 +0000 (13:13 +0900)]
Merge branch 'maint-2.8' into maint-2.9

7 years agoGit 2.8.5 v2.8.5
Junio C Hamano [Fri, 5 May 2017 04:08:54 +0000 (13:08 +0900)]
Git 2.8.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.7' into maint-2.8
Junio C Hamano [Fri, 5 May 2017 04:05:03 +0000 (13:05 +0900)]
Merge branch 'maint-2.7' into maint-2.8

7 years agoGit 2.7.5 v2.7.5
Junio C Hamano [Fri, 5 May 2017 04:03:40 +0000 (13:03 +0900)]
Git 2.7.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.6' into maint-2.7
Junio C Hamano [Fri, 5 May 2017 03:59:16 +0000 (12:59 +0900)]
Merge branch 'maint-2.6' into maint-2.7

7 years agoGit 2.6.7 v2.6.7
Junio C Hamano [Fri, 5 May 2017 03:56:19 +0000 (12:56 +0900)]
Git 2.6.7

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.5' into maint-2.6
Junio C Hamano [Fri, 5 May 2017 03:52:26 +0000 (12:52 +0900)]
Merge branch 'maint-2.5' into maint-2.6

7 years agoGit 2.5.6 v2.5.6
Junio C Hamano [Fri, 5 May 2017 03:49:00 +0000 (12:49 +0900)]
Git 2.5.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'maint-2.4' into maint-2.5
Junio C Hamano [Fri, 5 May 2017 03:46:53 +0000 (12:46 +0900)]
Merge branch 'maint-2.4' into maint-2.5

7 years agoGit 2.4.12 v2.4.12
Junio C Hamano [Fri, 5 May 2017 03:25:09 +0000 (12:25 +0900)]
Git 2.4.12

Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4
Junio C Hamano [Fri, 5 May 2017 03:17:55 +0000 (12:17 +0900)]
Merge branch 'jk/shell-no-repository-that-begins-with-dash' into maint-2.4

* jk/shell-no-repository-that-begins-with-dash:
  shell: disallow repo names beginning with dash

7 years agoshell: disallow repo names beginning with dash
Jeff King [Sat, 29 Apr 2017 12:36:44 +0000 (08:36 -0400)]
shell: disallow repo names beginning with dash

When a remote server uses git-shell, the client side will
connect to it like:

  ssh server "git-upload-pack 'foo.git'"

and we literally exec ("git-upload-pack", "foo.git"). In
early versions of upload-pack and receive-pack, we took a
repository argument and nothing else. But over time they
learned to accept dashed options. If the user passes a
repository name that starts with a dash, the results are
confusing at best (we complain of a bogus option instead of
a non-existent repository) and malicious at worst (the user
can start an interactive pager via "--help").

We could pass "--" to the sub-process to make sure the
user's argument is interpreted as a branch name. I.e.:

  git-upload-pack -- -foo.git

But adding "--" automatically would make us inconsistent
with a normal shell (i.e., when git-shell is not in use),
where "-foo.git" would still be an error. For that case, the
client would have to specify the "--", but they can't do so
reliably, as existing versions of git-shell do not allow
more than a single argument.

The simplest thing is to simply disallow "-" at the start of
the repo name argument. This hasn't worked either with or
without git-shell since version 1.0.0, and nobody has
complained.

Note that this patch just applies to do_generic_cmd(), which
runs upload-pack, receive-pack, and upload-archive. There
are two other types of commands that git-shell runs:

  - do_cvs_cmd(), but this already restricts the argument to
    be the literal string "server"

  - admin-provided commands in the git-shell-commands
    directory. We'll pass along arbitrary arguments there,
    so these commands could have similar problems. But these
    commands might actually understand dashed arguments, so
    we cannot just block them here. It's up to the writer of
    the commands to make sure they are safe. With great
    power comes great responsibility.

Reported-by: Timo Schmid <tschmid@ernw.de>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agol10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)
Jiang Xin [Fri, 5 May 2017 01:37:02 +0000 (09:37 +0800)]
l10n: git.pot: v2.13.0 round 2 (4 new, 7 removed)

Generate po/git.pot from v2.13.0-rc2 for git v2.13.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Jiang Xin [Fri, 5 May 2017 01:35:22 +0000 (09:35 +0800)]
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: for git v2.13.0 l10n round 1
  l10n: fr.po v2.13 round 1
  l10n: pt_PT: update Portuguese translation
  l10n: bg.po: Updated Bulgarian translation (3201t)
  l10n: vi.po(3198t): Updated Vietnamese translation for v2.13.0-rc0
  l10n: sv.po: Update Swedish translation (3199t0f0u)
  l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)

7 years agol10n: zh_CN: for git v2.13.0 l10n round 1
Jiang Xin [Sun, 23 Apr 2017 01:55:51 +0000 (09:55 +0800)]
l10n: zh_CN: for git v2.13.0 l10n round 1

Translate 96 messages (3198t0f0u) for git v2.13.0-rc0.

Reviewed-by: 依云 <lilydjwg@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
7 years agoMerge branch 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git
Jiang Xin [Fri, 5 May 2017 01:30:33 +0000 (09:30 +0800)]
Merge branch 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git

* 'fr_l10n_v2.13_rnd1' of git://github.com/jnavila/git:
  l10n: fr.po v2.13 round 1

7 years agoGit 2.13-rc2 v2.13.0-rc2
Junio C Hamano [Thu, 4 May 2017 07:27:19 +0000 (16:27 +0900)]
Git 2.13-rc2

Signed-off-by: Junio C Hamano <gitster@pobox.com>