git
8 years agoMerge branch 'ak/use-hashmap-iter-first-in-submodule-config' into maint
Junio C Hamano [Fri, 29 Apr 2016 21:15:58 +0000 (14:15 -0700)] 
Merge branch 'ak/use-hashmap-iter-first-in-submodule-config' into maint

Minor code cleanup.

* ak/use-hashmap-iter-first-in-submodule-config:
  submodule-config: use hashmap_iter_first()

8 years agoMerge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf' into maint
Junio C Hamano [Fri, 29 Apr 2016 21:15:58 +0000 (14:15 -0700)] 
Merge branch 'tb/blame-force-read-cache-to-workaround-safe-crlf' into maint

When running "git blame $path" with unnormalized data in the index
for the path, the data in the working tree was blamed, even though
"git add" would not have changed what is already in the index, due
to "safe crlf" that disables the line-end conversion.  It has been
corrected.

* tb/blame-force-read-cache-to-workaround-safe-crlf:
  correct blame for files commited with CRLF

8 years agoMerge branch 'sk/send-pack-all-fix' into maint
Junio C Hamano [Fri, 29 Apr 2016 21:15:56 +0000 (14:15 -0700)] 
Merge branch 'sk/send-pack-all-fix' into maint

"git send-pack --all <there>" was broken when its command line
option parsing was written in the 2.6 timeframe.

* sk/send-pack-all-fix:
  git-send-pack: fix --all option when used with directory

8 years agoMerge branch 'sg/diff-multiple-identical-renames' into maint
Junio C Hamano [Fri, 29 Apr 2016 21:15:55 +0000 (14:15 -0700)] 
Merge branch 'sg/diff-multiple-identical-renames' into maint

"git diff -M" used to work better when two originally identical
files A and B got renamed to X/A and X/B by pairing A to X/A and B
to X/B, but this was broken in the 2.0 timeframe.

* sg/diff-multiple-identical-renames:
  diffcore: fix iteration order of identical files during rename detection

8 years agoMerge branch 'ss/msvc' into maint
Junio C Hamano [Fri, 29 Apr 2016 21:15:54 +0000 (14:15 -0700)] 
Merge branch 'ss/msvc' into maint

Build updates for MSVC.

* ss/msvc:
  MSVC: use shipped headers instead of fallback definitions
  MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

8 years agoMerge tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po into maint
Junio C Hamano [Mon, 25 Apr 2016 20:36:26 +0000 (13:36 -0700)] 
Merge tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po into maint

l10n-2.8.0-rnd3-fr

* tag 'l10n-2.8.0-rnd3-fr' of git://github.com/git-l10n/git-po:
  l10n: fr: don't translate "merge" as a parameter
  l10n: fr: change "id de clé" to match "id-clé"
  l10n: fr: fix wrongly translated option name
  l10n: fr: fix transcation of "dir"

8 years agoMerge branch 'fr_v2.8.0_r3' of git://github.com/jnavila/git into maint
Jiang Xin [Sun, 24 Apr 2016 12:36:34 +0000 (20:36 +0800)] 
Merge branch 'fr_v2.8.0_r3' of git://github.com/jnavila/git into maint

* 'fr_v2.8.0_r3' of git://github.com/jnavila/git:
  l10n: fr: don't translate "merge" as a parameter
  l10n: fr: change "id de clé" to match "id-clé"
  l10n: fr: fix wrongly translated option name
  l10n: fr: fix transcation of "dir"

8 years agoPrepare for 2.8.2
Junio C Hamano [Fri, 15 Apr 2016 01:58:11 +0000 (18:58 -0700)] 
Prepare for 2.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jv/merge-nothing-into-void' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:49 +0000 (18:57 -0700)] 
Merge branch 'jv/merge-nothing-into-void' into maint

"git merge FETCH_HEAD" dereferenced NULL pointer when merging
nothing into an unborn history (which is arguably unusual usage,
which perhaps was the reason why nobody noticed it).

* jv/merge-nothing-into-void:
  merge: fix NULL pointer dereference when merging nothing into void

8 years agoMerge branch 'ss/commit-squash-msg' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:48 +0000 (18:57 -0700)] 
Merge branch 'ss/commit-squash-msg' into maint

When "git merge --squash" stopped due to conflict, the concluding
"git commit" failed to read in the SQUASH_MSG that shows the log
messages from all the squashed commits.

* ss/commit-squash-msg:
  commit: do not lose SQUASH_MSG contents

8 years agoMerge branch 'jk/send-email-rtrim-mailrc-alias' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)] 
Merge branch 'jk/send-email-rtrim-mailrc-alias' into maint

"git send-email" had trouble parsing alias file in mailrc format
when lines in it had trailing whitespaces on them.

* jk/send-email-rtrim-mailrc-alias:
  send-email: ignore trailing whitespace in mailrc alias file

8 years agoMerge branch 'da/mergetool-delete-delete-conflict' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:47 +0000 (18:57 -0700)] 
Merge branch 'da/mergetool-delete-delete-conflict' into maint

"git mergetool" did not work well with conflicts that both sides
deleted.

* da/mergetool-delete-delete-conflict:
  mergetool: honor tempfile configuration when resolving delete conflicts
  mergetool: support delete/delete conflicts

8 years agoMerge branch 'jk/startup-info' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)] 
Merge branch 'jk/startup-info' into maint

The startup_info data, which records if we are working inside a
repository (among other things), are now uniformly available to Git
subcommand implementations, and Git avoids attempting to touch
references when we are not in a repository.

* jk/startup-info:
  use setup_git_directory() in test-* programs
  grep: turn off gitlink detection for --no-index
  mailmap: do not resolve blobs in a non-repository
  remote: don't resolve HEAD in non-repository
  setup: set startup_info->have_repository more reliably
  setup: make startup_info available everywhere

8 years agoMerge branch 'jk/getwholeline-getdelim-empty' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:46 +0000 (18:57 -0700)] 
Merge branch 'jk/getwholeline-getdelim-empty' into maint

strbuf_getwholeline() did not NUL-terminate the buffer on certain
corner cases in its error codepath.

* jk/getwholeline-getdelim-empty:
  strbuf_getwholeline: NUL-terminate getdelim buffer on error

8 years agoMerge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:45 +0000 (18:57 -0700)] 
Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath' into maint

A small memory leak in an error codepath has been plugged in xdiff
code.

* rj/xdiff-prepare-plug-leak-on-error-codepath:
  xdiff/xprepare: fix a memory leak
  xdiff/xprepare: use the XDF_DIFF_ALG() macro to access flag bits

8 years agoMerge branch 'gf/fetch-pack-direct-object-fetch' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)] 
Merge branch 'gf/fetch-pack-direct-object-fetch' into maint

Fetching of history by naming a commit object name directly didn't
work across remote-curl transport.

* gf/fetch-pack-direct-object-fetch:
  fetch-pack: update the documentation for "<refs>..." arguments
  fetch-pack: fix object_id of exact sha1

8 years agoMerge branch 'jk/rev-parse-local-env-vars' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:44 +0000 (18:57 -0700)] 
Merge branch 'jk/rev-parse-local-env-vars' into maint

The "--local-env-vars" and "--resolve-git-dir" options of "git
rev-parse" failed to work outside a repository when the command's
option parsing was rewritten in 1.8.5 era.

* jk/rev-parse-local-env-vars:
  rev-parse: let some options run outside repository
  t1515: add tests for rev-parse out-of-repo helpers

8 years agoMerge branch 'jk/config-get-urlmatch' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:57:43 +0000 (18:57 -0700)] 
Merge branch 'jk/config-get-urlmatch' into maint

"git config --get-urlmatch", unlike other variants of the "git
config --get" family, did not signal error with its exit status
when there was no matching configuration.

* jk/config-get-urlmatch:
  Documentation/git-config: fix --get-all description
  Documentation/git-config: use bulleted list for exit codes
  config: fail if --get-urlmatch finds no value

8 years agoMerge branch 'pb/t7502-drop-dup' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:18 +0000 (18:37 -0700)] 
Merge branch 'pb/t7502-drop-dup' into maint

Code clean-up.

* pb/t7502-drop-dup:
  t/t7502 : drop duplicate test

8 years agoMerge branch 'jk/test-httpd-config-nosystem' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:17 +0000 (18:37 -0700)] 
Merge branch 'jk/test-httpd-config-nosystem' into maint

The tests that involve running httpd leaked the system-wide
configuration in /etc/gitconfig to the tested environment.

* jk/test-httpd-config-nosystem:
  t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

8 years agoMerge branch 'sb/clone-t57-t56' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)] 
Merge branch 'sb/clone-t57-t56' into maint

Rename bunch of tests on "git clone" for better organization.

* sb/clone-t57-t56:
  clone tests: rename t57* => t56*

8 years agoMerge branch 'jk/credential-cache-comment-exit' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:16 +0000 (18:37 -0700)] 
Merge branch 'jk/credential-cache-comment-exit' into maint

A code clarification.

* jk/credential-cache-comment-exit:
  credential-cache--daemon: clarify "exit" action semantics

8 years agoMerge branch 'jc/index-pack' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)] 
Merge branch 'jc/index-pack' into maint

Code clean-up.

* jc/index-pack:
  index-pack: add a helper function to derive .idx/.keep filename
  index-pack: correct --keep[=<msg>]

8 years agoMerge branch 'ss/exc-flag-is-a-collection-of-bits' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:15 +0000 (18:37 -0700)] 
Merge branch 'ss/exc-flag-is-a-collection-of-bits' into maint

Code clean-up.

* ss/exc-flag-is-a-collection-of-bits:
  dir: store EXC_FLAG_* values in unsigned integers

8 years agoMerge branch 'mp/upload-pack-use-embedded-args' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)] 
Merge branch 'mp/upload-pack-use-embedded-args' into maint

The embedded args argv-array in the child process is used to build
the command line to run pack-objects instead of using a separate
array of strings.

* mp/upload-pack-use-embedded-args:
  upload-pack: use argv_array for pack_objects

8 years agoMerge branch 'oa/doc-diff-check' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:14 +0000 (18:37 -0700)] 
Merge branch 'oa/doc-diff-check' into maint

A minor documentation update.

* oa/doc-diff-check:
  Documentation: git diff --check detects conflict markers

8 years agoMerge branch 'pb/opt-cmdmode-doc' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)] 
Merge branch 'pb/opt-cmdmode-doc' into maint

Minor API documentation update.

* pb/opt-cmdmode-doc:
  api-parse-options.txt: document OPT_CMDMODE()

8 years agoMerge branch 'nd/apply-doc' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:13 +0000 (18:37 -0700)] 
Merge branch 'nd/apply-doc' into maint

A minor documentation update.

* nd/apply-doc:
  git-apply.txt: mention the behavior inside a subdir
  git-apply.txt: remove a space

8 years agoMerge branch 'cc/doc-recommend-performance-trace-to-file' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)] 
Merge branch 'cc/doc-recommend-performance-trace-to-file' into maint

A minor documentation update.

* cc/doc-recommend-performance-trace-to-file:
  Documentation: talk about pager in api-trace.txt

8 years agoMerge branch 'mm/lockfile-error-message' into maint
Junio C Hamano [Fri, 15 Apr 2016 01:37:12 +0000 (18:37 -0700)] 
Merge branch 'mm/lockfile-error-message' into maint

* mm/lockfile-error-message:
  lockfile: improve error message when lockfile exists
  lockfile: mark strings for translation

8 years agoStart preparing for 2.8.2
Junio C Hamano [Wed, 13 Apr 2016 23:30:00 +0000 (16:30 -0700)] 
Start preparing for 2.8.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agocorrect blame for files commited with CRLF
Torsten Bögershausen [Tue, 5 Apr 2016 19:23:54 +0000 (21:23 +0200)] 
correct blame for files commited with CRLF

git blame reports lines as not "Not Committed Yet" when they have
CRLF in the index, CRLF in the worktree and core.autocrlf is true.

Since commit c4805393 (autocrlf: Make it work also for un-normalized
repositories, 2010-05-12), files that have CRLF in the index are not
normalized at commit when core.autocrl is set.

Add a call to read_cache() early in fake_working_tree_commit(),
before calling convert_to_git().

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.8.1 v2.8.1
Junio C Hamano [Sun, 3 Apr 2016 17:11:35 +0000 (10:11 -0700)] 
Git 2.8.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'mm/readme-markdown' into maint
Junio C Hamano [Sun, 3 Apr 2016 17:13:09 +0000 (10:13 -0700)] 
Merge branch 'mm/readme-markdown' into maint

* 'mm/readme-markdown':
  git.spec.in: use README.md, not README

8 years agogit.spec.in: use README.md, not README
Matthieu Moy [Fri, 1 Apr 2016 07:10:51 +0000 (09:10 +0200)] 
git.spec.in: use README.md, not README

The file was renamed in 4ad21f5 (README: use markdown syntax,
2016-02-25), but that commit forgot to update git.spec.in, which
caused the rpmbuild target in the Makefile to fail.

Reported-by: Ron Isaacson <isaacson.ljits@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-send-pack: fix --all option when used with directory
Stanislav Kolotinskiy [Thu, 31 Mar 2016 13:55:09 +0000 (16:55 +0300)] 
git-send-pack: fix --all option when used with directory

When using git send-pack with --all option
and a target repository specification ([<host>:]<directory>),
usage message is being displayed instead of performing
the actual transmission.

The reason for this issue is that destination and refspecs are being set
in the same conditional and are populated from argv. When a target
repository is passed, refspecs is being populated as well with its value.
This makes the check for refspecs not being NULL to always return true,
which, in conjunction with the check for --all or --mirror options,
is always true as well and returns usage message instead of proceeding.

This ensures that send-pack will stop execution only when --all
or --mirror switch is used in conjunction with any refspecs passed.

Signed-off-by: Stanislav Kolotinskiy <stanislav@assembla.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agodiffcore: fix iteration order of identical files during rename detection
SZEDER Gábor [Wed, 30 Mar 2016 08:35:07 +0000 (10:35 +0200)] 
diffcore: fix iteration order of identical files during rename detection

If the two paths 'dir/A/file' and 'dir/B/file' have identical content
and the parent directory is renamed, e.g. 'git mv dir other-dir', then
diffcore reports the following exact renames:

    renamed:    dir/B/file -> other-dir/A/file
    renamed:    dir/A/file -> other-dir/B/file

While technically not wrong, this is confusing not only for the user,
but also for git commands that make decisions based on rename
information, e.g. 'git log --follow other-dir/A/file' follows
'dir/B/file' past the rename.

This behavior is a side effect of commit v2.0.0-rc4~8^2~14
(diffcore-rename.c: simplify finding exact renames, 2013-11-14): the
hashmap storing sources returns entries from the same bucket, i.e.
sources matching the current destination, in LIFO order.  Thus the
iteration first examines 'other-dir/A/file' and 'dir/B/file' and, upon
finding identical content and basename, reports an exact rename.

Other hashmap users are apparently happy with the current iteration
order over the entries of a bucket.  Changing the iteration order
would risk upsetting other hashmap users and would increase the memory
footprint of each bucket by a pointer to the tail element.

Fill the hashmap with source entries in reverse order to restore the
original exact rename detection behavior.

Reported-by: Bill Okara <billokara@gmail.com>
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMSVC: use shipped headers instead of fallback definitions
Sven Strickroth [Wed, 30 Mar 2016 11:37:36 +0000 (13:37 +0200)] 
MSVC: use shipped headers instead of fallback definitions

VS2010 comes with stdint.h [1]
VS2013 comes with inttypes.h [2]

[1] https://stackoverflow.com/a/2628014/3906760
[2] https://blogs.msdn.microsoft.com/vcblog/2013/07/19/c99-library-support-in-visual-studio-2013/

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more
Sven Strickroth [Tue, 29 Mar 2016 16:25:28 +0000 (18:25 +0200)] 
MSVC: vsnprintf in Visual Studio 2015 doesn't need SNPRINTF_SIZE_CORR any more

In MSVC2015 the behavior of vsnprintf was changed.
W/o this fix there is one character missing at the end.

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Acked-by: Sebastian Schuberth <sschuberth@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation: git diff --check detects conflict markers
Ori Avtalion [Tue, 29 Mar 2016 18:59:45 +0000 (21:59 +0300)] 
Documentation: git diff --check detects conflict markers

Signed-off-by: Ori Avtalion <ori@avtalion.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.8 felipec/upstream v2.8.0
Junio C Hamano [Mon, 28 Mar 2016 19:19:45 +0000 (12:19 -0700)] 
Git 2.8

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoapi-parse-options.txt: document OPT_CMDMODE()
Pranit Bauva [Fri, 25 Mar 2016 18:58:58 +0000 (18:58 +0000)] 
api-parse-options.txt: document OPT_CMDMODE()

OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively
notice when multiple "operation mode" options that specify mutually
incompatible operation modes are given.

Signed-off-by: Pranit Bauva <pranit.bauva@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge pull request #9 from vascool/fr
Jean-Noël Avila [Fri, 25 Mar 2016 16:11:20 +0000 (17:11 +0100)] 
Merge pull request #9 from vascool/fr

Fix inconsistencies

8 years agol10n: fr: don't translate "merge" as a parameter
Vasco Almeida [Tue, 15 Mar 2016 00:34:22 +0000 (23:34 -0100)] 
l10n: fr: don't translate "merge" as a parameter

At builtin/checkout.c:1154, merge is a parameter to --conflict=<style>
(git checkout --conflict=merge).

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
8 years agol10n: fr: change "id de clé" to match "id-clé"
Vasco Almeida [Tue, 15 Mar 2016 00:34:22 +0000 (23:34 -0100)] 
l10n: fr: change "id de clé" to match "id-clé"

At builtin/tag.c:23 French message translation, "<key-id>" was
translated to "<id-clé>", but at builtin/tag.c:355 "key-id" was
translated to "id de clé", hence an inconsistency in git tag -h output.

Translate "key-id" to "id-clé".
Alternatively, both places could use "id de clé" instead of "id-clé".

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
8 years agol10n: fr: fix wrongly translated option name
Vasco Almeida [Sun, 13 Mar 2016 12:56:03 +0000 (11:56 -0100)] 
l10n: fr: fix wrongly translated option name

In the original source, tags and heads refer to that options (--head and
--tags) for git show-ref.

Don't translate that terms, since they refer to actual option names.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
8 years agol10n: fr: fix transcation of "dir"
Vasco Almeida [Sun, 13 Mar 2016 12:56:03 +0000 (11:56 -0100)] 
l10n: fr: fix transcation of "dir"

"dir" was translated to the same string at builtin/log.c:1236,
but, also at that code line, "<dir>" was translate to "<répertoire>".

Before this commit, git format-patch -h would output "-o,
--output-directory <dir>" and <répertoire> in its description.

Use <répertoire> in both the parameter and description.

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
8 years agoMerge branch 'ls/p4-doc-markup'
Junio C Hamano [Thu, 24 Mar 2016 19:28:06 +0000 (12:28 -0700)] 
Merge branch 'ls/p4-doc-markup'

* ls/p4-doc-markup:
  Documentation: fix git-p4 AsciiDoc formatting
  Documentation: use ASCII quotation marks in git-p4

8 years agoMerge branch 'js/mingw-tests-2.8'
Junio C Hamano [Thu, 24 Mar 2016 19:27:58 +0000 (12:27 -0700)] 
Merge branch 'js/mingw-tests-2.8'

* js/mingw-tests-2.8:
  mingw: skip some tests in t9115 due to file name issues
  t1300: fix the new --show-origin tests on Windows
  t1300-repo-config: make it resilient to being run via 'sh -x'
  config --show-origin: report paths with forward slashes

8 years agoMerge branch 'sb/submodule-module-list-pathspec-fix'
Junio C Hamano [Thu, 24 Mar 2016 19:27:12 +0000 (12:27 -0700)] 
Merge branch 'sb/submodule-module-list-pathspec-fix'

A fix for a small regression in "module_list" helper that was
rewritten in C (also applies to 2.7.x).

* sb/submodule-module-list-pathspec-fix:
  submodule: fix regression for deinit without submodules

8 years agogit-apply.txt: mention the behavior inside a subdir
Nguyễn Thái Ngọc Duy [Thu, 24 Mar 2016 11:56:17 +0000 (18:56 +0700)] 
git-apply.txt: mention the behavior inside a subdir

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agogit-apply.txt: remove a space
Nguyễn Thái Ngọc Duy [Thu, 24 Mar 2016 11:56:16 +0000 (18:56 +0700)] 
git-apply.txt: remove a space

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosubmodule-config: use hashmap_iter_first()
Alexander Kuleshov [Wed, 16 Mar 2016 07:46:31 +0000 (13:46 +0600)] 
submodule-config: use hashmap_iter_first()

The hashmap API provides hashmap_iter_first() helper for initialion
and getting the first entry of a hashmap. Let's use it instead of
doing initialization manually and then get the first entry.

There are no functional changes, just cleanup.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Reviewed-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'master' of git://github.com/git-l10n/git-po
Junio C Hamano [Wed, 23 Mar 2016 19:22:42 +0000 (12:22 -0700)] 
Merge branch 'master' of git://github.com/git-l10n/git-po

* 'master' of git://github.com/git-l10n/git-po:
  l10n: pt_PT: Update and add new translations
  l10n: ca.po: update translation
  l10n: vi.po (2530t): Update translation

8 years agomerge: fix NULL pointer dereference when merging nothing into void
Junio C Hamano [Mon, 21 Mar 2016 19:01:43 +0000 (12:01 -0700)] 
merge: fix NULL pointer dereference when merging nothing into void

When we are on an unborn branch and merging only one foreign parent,
we allow "git merge" to fast-forward to that foreign parent commit.

This codepath incorrectly attempted to dereference the list of
parents that the merge is going to record even when the list is
empty.  It must refuse to operate instead when there is no parent.

All other codepaths make sure the list is not empty before they
dereference it, and are safe.

Reported-by: Jose Ivan B. Vilarouca Filho
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation: fix git-p4 AsciiDoc formatting
Lars Schneider [Wed, 23 Mar 2016 10:59:01 +0000 (11:59 +0100)] 
Documentation: fix git-p4 AsciiDoc formatting

Noticed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agomingw: skip some tests in t9115 due to file name issues
Johannes Schindelin [Wed, 23 Mar 2016 10:55:20 +0000 (11:55 +0100)] 
mingw: skip some tests in t9115 due to file name issues

These two tests wanted to write file names which are incompatible with
Windows' file naming rules (even if they pass using Cygwin due to
Cygwin's magic path mangling).

While at it, skip the same tests also on MacOSX/HFS, as pointed out by
Torsten Bögershausen.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot1300: fix the new --show-origin tests on Windows
Johannes Schindelin [Wed, 23 Mar 2016 10:55:13 +0000 (11:55 +0100)] 
t1300: fix the new --show-origin tests on Windows

On Windows, we have that funny situation where the test script can refer
to POSIX paths because it runs in a shell that uses a POSIX emulation
layer ("MSYS2 runtime"). Yet, git.exe does *not* understand POSIX paths
at all but only pure Windows paths.

So let's just convert the POSIX paths to Windows paths before passing
them on to Git, using `pwd` (which is already modified on Windows to
output Windows paths).

While fixing the new tests on Windows, we also have to exclude the tests
that want to write a file with a name that is illegal on Windows
(unfortunately, there is more than one test trying to make use of that
file).

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agot1300-repo-config: make it resilient to being run via 'sh -x'
Johannes Schindelin [Wed, 23 Mar 2016 10:55:07 +0000 (11:55 +0100)] 
t1300-repo-config: make it resilient to being run via 'sh -x'

One way to diagnose broken regression tests is to run the test
script using 'sh -x t... -i -v' to find out which call actually
demonstrates the symptom.

Hence it is pretty counterproductive if the test script behaves
differently when being run via 'sh -x', in particular when using
test_cmp or test_i18ncmp on redirected stderr.  A more recent way
"sh tXXXX -i -v -x" has the same issue.

So let's use test_i18ngrep (as suggested by Jonathan Nieder) instead of
test_cmp/test_i18ncmp to verify that stderr looks as expected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoconfig --show-origin: report paths with forward slashes
Johannes Schindelin [Wed, 23 Mar 2016 10:55:00 +0000 (11:55 +0100)] 
config --show-origin: report paths with forward slashes

On Windows, the backslash is the native directory separator, but all
supported Windows versions also accept the forward slash in most
circumstances.

Our tests expect forward slashes.

Relative paths are generated by Git using forward slashes.

So let's try to be consistent and use forward slashes in the $HOME part
of the paths reported by `git config --show-origin`, too.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'master' of https://github.com/vnwildman/git
Jiang Xin [Wed, 23 Mar 2016 15:01:51 +0000 (23:01 +0800)] 
Merge branch 'master' of https://github.com/vnwildman/git

* 'master' of https://github.com/vnwildman/git:
  l10n: vi.po (2530t): Update translation

8 years agoMerge branch 'master' of git://github.com/alexhenrie/git-po
Jiang Xin [Wed, 23 Mar 2016 14:48:14 +0000 (22:48 +0800)] 
Merge branch 'master' of git://github.com/alexhenrie/git-po

* 'master' of git://github.com/alexhenrie/git-po:
  l10n: ca.po: update translation

8 years agosubmodule: fix regression for deinit without submodules
Stefan Beller [Tue, 22 Mar 2016 23:42:14 +0000 (16:42 -0700)] 
submodule: fix regression for deinit without submodules

Per Cederqvist wrote:
> It used to be possible to run
>
>    git submodule deinit -f .
>
> to remove any submodules, no matter how many submodules you had.  That
> is no longer possible in projects that don't have any submodules at
> all.  The command will fail with:
>
>     error: pathspec '.' did not match any file(s) known to git.

This regression was introduced in 74703a1e4dfc (submodule: rewrite
`module_list` shell function in C, 2015-09-02), as we changed the
order of checking in new module listing to first check whether it is
a gitlin before feeding it to match_pathspec().  It used to be that
a pathspec that does not match any path were diagnosed as an error,
but the new code complains for a pathspec that does not match any
submodule path.

Arguably the new behaviour may give us a better diagnosis, but that
is inconsistent with the suggestion "deinit" gives, and also this
was an unintended accident.  The new behaviour hopefully can be
redesigned and implemented better in future releases, but for now,
switch these two checks to restore the same behavior as before.  In
an empty repository, giving the pathspec '.' will still get the same
"did not match" error, but that is the same bug we had before 1.7.0.

Reported-by: Per Cederqvist <cederp@opera.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agol10n: pt_PT: Update and add new translations
Vasco Almeida [Fri, 29 Jan 2016 20:06:29 +0000 (19:06 -0100)] 
l10n: pt_PT: Update and add new translations

Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt>
8 years agol10n: ca.po: update translation
Alex Henrie [Tue, 22 Mar 2016 05:04:22 +0000 (23:04 -0600)] 
l10n: ca.po: update translation

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
8 years agocommit: do not lose SQUASH_MSG contents
Sven Strickroth [Mon, 21 Mar 2016 22:29:40 +0000 (23:29 +0100)] 
commit: do not lose SQUASH_MSG contents

When concluding a conflicted "git merge --squash", the command
failed to read SQUASH_MSG that was prepared by "git merge", and
showed only the "# Conflicts:" list of conflicted paths.

Place the contents from SQUASH_MSG at the beginning, just like we
show the commit log skeleton first when concluding a normal merge,
and then show the "# Conflicts:" list, to help the user write the
log message for the resulting commit.

Test by Junio C Hamano <gitster@pobox.com>.

Signed-off-by: Sven Strickroth <sven@cs-ware.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoGit 2.8-rc4 v2.8.0-rc4
Junio C Hamano [Mon, 21 Mar 2016 20:41:37 +0000 (13:41 -0700)] 
Git 2.8-rc4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoSync with maint
Junio C Hamano [Mon, 21 Mar 2016 20:32:42 +0000 (13:32 -0700)] 
Sync with maint

* maint:
  Documentation: fix broken linkgit to git-config
  git-compat-util: st_add4: work around gcc 4.2.x compiler crash

8 years agoMerge branch 'mm/doc-hooks-linkgit-fix' into maint
Junio C Hamano [Mon, 21 Mar 2016 20:32:18 +0000 (13:32 -0700)] 
Merge branch 'mm/doc-hooks-linkgit-fix' into maint

* mm/doc-hooks-linkgit-fix:
  Documentation: fix broken linkgit to git-config

8 years agoDocumentation: fix broken linkgit to git-config
Matthieu Moy [Mon, 21 Mar 2016 18:38:34 +0000 (19:38 +0100)] 
Documentation: fix broken linkgit to git-config

Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoDocumentation: use ASCII quotation marks in git-p4
Lars Schneider [Sun, 20 Mar 2016 18:39:21 +0000 (19:39 +0100)] 
Documentation: use ASCII quotation marks in git-p4

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'tb/avoid-gcc-on-darwin-10-6'
Junio C Hamano [Mon, 21 Mar 2016 16:20:13 +0000 (09:20 -0700)] 
Merge branch 'tb/avoid-gcc-on-darwin-10-6'

* tb/avoid-gcc-on-darwin-10-6:
  Revert "config.mak.uname: use clang for Mac OS X 10.6"

8 years agoRevert "config.mak.uname: use clang for Mac OS X 10.6"
Eric Sunshine [Mon, 21 Mar 2016 04:35:58 +0000 (00:35 -0400)] 
Revert "config.mak.uname: use clang for Mac OS X 10.6"

This reverts commit 7b6daf8d2fee1a9866b1d4eddbfaa5dbc42c5dbb.

Now that st_add4() has been patched to work around the gcc 4.2.x
compiler crash, revert the sledge-hammer approach of forcing Mac OS X
10.6 to unconditionally use 'clang' rather than the default compiler
(gcc).

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'es/st-add4-gcc-4.2-workaround' into maint
Junio C Hamano [Mon, 21 Mar 2016 16:19:27 +0000 (09:19 -0700)] 
Merge branch 'es/st-add4-gcc-4.2-workaround' into maint

* es/st-add4-gcc-4.2-workaround:
  git-compat-util: st_add4: work around gcc 4.2.x compiler crash

8 years agogit-compat-util: st_add4: work around gcc 4.2.x compiler crash
Eric Sunshine [Mon, 21 Mar 2016 04:35:57 +0000 (00:35 -0400)] 
git-compat-util: st_add4: work around gcc 4.2.x compiler crash

Although changes by 5b442c4 (tree-diff: catch integer overflow in
combine_diff_path allocation, 2016-02-19) are perfectly valid, they
unfortunately trigger an internal compiler error in gcc 4.2.x:

    combine-diff.c: In function 'diff_tree_combined':
    combine-diff.c:1391: internal compiler error: Segmentation fault: 11

Experimentation reveals that changing st_add4()'s argument evaluation
order is sufficient to sidestep this problem.

Although st_add3() does not trigger the compiler bug, for style
consistency, change its argument evaluation order to match.

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge tag 'l10n-2.8.0-rnd3' of git://github.com/git-l10n/git-po
Junio C Hamano [Mon, 21 Mar 2016 01:06:05 +0000 (18:06 -0700)] 
Merge tag 'l10n-2.8.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.8.0-rnd3

* tag 'l10n-2.8.0-rnd3' of git://github.com/git-l10n/git-po:
  l10n: zh_CN: review for git v2.8.0 l10n round 2
  l10n: de.po: add missing newlines
  l10n: de.po: translate 22 new messages
  l10n: ko.po: Update Korean translation
  l10n: fr.po v2.8.0 round 3
  l10n: sv.po: Update Swedish translation (2530t0f0u)
  l10n: ru.po: update Russian translation

8 years agoMerge branch 'master' of git://ozlabs.org/~paulus/gitk
Junio C Hamano [Mon, 21 Mar 2016 01:05:10 +0000 (18:05 -0700)] 
Merge branch 'master' of git://ozlabs.org/~paulus/gitk

* 'master' of git://ozlabs.org/~paulus/gitk:
  gitk: Follow themed bgcolor in help dialogs
  gitk: fr.po: Sync translations with git
  gitk: Update French translation (311t)
  gitk: Update German translation
  gitk: Update Bulgarian translation (311t)

8 years agol10n: vi.po (2530t): Update translation
Tran Ngoc Quan [Mon, 21 Mar 2016 00:21:04 +0000 (07:21 +0700)] 
l10n: vi.po (2530t): Update translation

Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
8 years agol10n: zh_CN: review for git v2.8.0 l10n round 2
Ray Chen [Wed, 16 Mar 2016 03:44:44 +0000 (11:44 +0800)] 
l10n: zh_CN: review for git v2.8.0 l10n round 2

Signed-off-by: Ray Chen <oldsharp@gmail.com>
8 years agogitk: Follow themed bgcolor in help dialogs
Guillermo S. Romero [Thu, 4 Feb 2016 02:32:19 +0000 (03:32 +0100)] 
gitk: Follow themed bgcolor in help dialogs

Make Help > About & Key bindings dialogs readable if theme
has changed font color to something incompatible with white.

Signed-off-by: Guillermo S. Romero <gsromero@infernal-iceberg.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
8 years agogitk: fr.po: Sync translations with git
Jean-Noel Avila [Fri, 29 Jan 2016 20:21:35 +0000 (21:21 +0100)] 
gitk: fr.po: Sync translations with git

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Paul Mackerras <paulus@samba.org>
8 years agogitk: Update French translation (311t)
Jean-Noel Avila [Fri, 29 Jan 2016 20:21:34 +0000 (21:21 +0100)] 
gitk: Update French translation (311t)

Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
Signed-off-by: Paul Mackerras <paulus@samba.org>
8 years agogitk: Update German translation
Ralf Thielow [Fri, 12 Feb 2016 18:40:39 +0000 (19:40 +0100)] 
gitk: Update German translation

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
8 years agogitk: Update Bulgarian translation (311t)
Alexander Shopov [Sat, 19 Dec 2015 22:36:09 +0000 (00:36 +0200)] 
gitk: Update Bulgarian translation (311t)

Signed-off-by: Alexander Shopov <ash@kambanaria.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
8 years agot/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env
Jeff King [Wed, 16 Mar 2016 00:56:52 +0000 (20:56 -0400)] 
t/lib-httpd: pass through GIT_CONFIG_NOSYSTEM env

We set GIT_CONFIG_NOSYSTEM in our test scripts so that we do
not accidentally read /etc/gitconfig and have it influence
the outcome of the tests. But when running smart-http tests,
Apache will clean the environment, including this variable,
and the "server" side of our http operations will read it.

You can see this breakage by doing something like:

  make
  ./git config --system http.getanyfile false
  make test

which will cause t5561 to fail when it tests the
fallback-to-dumb operation.

We can fix this by instructing Apache to pass through the
variable. Unlike with other variables (e.g., 89c57ab3's
GIT_TRACE), we don't need to set a dummy value to prevent
warnings from Apache. test-lib.sh already makes sure that
GIT_CONFIG_NOSYSTEM is set and exported.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agocredential-cache--daemon: clarify "exit" action semantics
Jeff King [Fri, 18 Mar 2016 06:12:01 +0000 (02:12 -0400)] 
credential-cache--daemon: clarify "exit" action semantics

When this code was originally written, there wasn't much
thought given to the timing between a client asking for
"exit", the daemon signaling that the action is done (with
EOF), and the actual cleanup of the socket.

However, we need to care about this so that our test scripts
do not end up racy (e.g., by asking for an exit and checking
that the socket was cleaned up). The code that is already
there happens to behave very reasonably; let's add a comment
to make it clear that any changes should retain the same
behavior.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agosend-email: ignore trailing whitespace in mailrc alias file
Jeff King [Thu, 17 Mar 2016 23:58:22 +0000 (19:58 -0400)] 
send-email: ignore trailing whitespace in mailrc alias file

The regex for parsing mailrc considers everything after the
second whitespace to be the email address, up to the end of
the line. We have to include whitespace there, because you
may have multiple space-separated addresses, each with their
own internal quoting.

But if there is trailing whitespace, we include that, too.
This confuses quotewords() when we try to split the
individual addresses, and we end up storing "undef" in our
alias list. Later parts of the code then access that,
generating perl warnings.

Let's tweak our regex to throw away any trailing whitespace
on each line.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoRelNotes: remove the mention of !reinclusion
Junio C Hamano [Fri, 18 Mar 2016 18:10:53 +0000 (11:10 -0700)] 
RelNotes: remove the mention of !reinclusion

We will be postponing this to a later cycle.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoRevert "Merge branch 'nd/exclusion-regression-fix'"
Junio C Hamano [Fri, 18 Mar 2016 18:06:15 +0000 (11:06 -0700)] 
Revert "Merge branch 'nd/exclusion-regression-fix'"

This reverts commit 5e57f9c3dfe7dd44a1b56bb5b3327d7a1356ec7c, reversing
changes made to e79112d21024beb997951381db21a70b087d459d.

We will be postponing nd/exclusion-regression-fix topic to later
cycle.

8 years agoRevert "Merge branch 'jc/exclusion-doc'"
Junio C Hamano [Fri, 18 Mar 2016 18:05:23 +0000 (11:05 -0700)] 
Revert "Merge branch 'jc/exclusion-doc'"

This reverts commit e80aae51f2be908e37fca47ea0dff6d7861c8497, reversing
changes made to 68846a92eafa6b2bfae778d0a656443a9fa61e59.

We will be postponing nd/exclusion-regression-fix topic to later
cycle.

8 years agoSync with Git 2.7.4
Junio C Hamano [Thu, 17 Mar 2016 19:54:17 +0000 (12:54 -0700)] 
Sync with Git 2.7.4

* maint:
  Git 2.7.4
  Git 2.6.6
  Git 2.5.5
  Git 2.4.11

8 years agoGit 2.7.4 v2.7.4
Junio C Hamano [Thu, 17 Mar 2016 18:32:13 +0000 (11:32 -0700)] 
Git 2.7.4

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agol10n: de.po: add missing newlines
Ralf Thielow [Thu, 17 Mar 2016 18:31:33 +0000 (19:31 +0100)] 
l10n: de.po: add missing newlines

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
8 years agoSync with Git 2.6.6
Junio C Hamano [Thu, 17 Mar 2016 18:28:52 +0000 (11:28 -0700)] 
Sync with Git 2.6.6

* maint-2.6:
  Git 2.6.6
  Git 2.5.5
  Git 2.4.11

8 years agoGit 2.6.6 v2.6.6
Junio C Hamano [Thu, 17 Mar 2016 17:56:06 +0000 (10:56 -0700)] 
Git 2.6.6

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'maint-2.5' into maint-2.6
Junio C Hamano [Thu, 17 Mar 2016 18:26:18 +0000 (11:26 -0700)] 
Merge branch 'maint-2.5' into maint-2.6

* maint-2.5:
  Git 2.5.5
  Git 2.4.11
  list-objects: pass full pathname to callbacks
  list-objects: drop name_path entirely
  list-objects: convert name_path to a strbuf
  show_object_with_name: simplify by using path_name()
  http-push: stop using name_path
  tree-diff: catch integer overflow in combine_diff_path allocation
  add helpers for detecting size_t overflow

8 years agoGit 2.5.5 v2.5.5
Junio C Hamano [Thu, 17 Mar 2016 17:28:50 +0000 (10:28 -0700)] 
Git 2.5.5

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'maint-2.4' into maint-2.5
Junio C Hamano [Thu, 17 Mar 2016 18:24:14 +0000 (11:24 -0700)] 
Merge branch 'maint-2.4' into maint-2.5

* maint-2.4:
  Git 2.4.11
  list-objects: pass full pathname to callbacks
  list-objects: drop name_path entirely
  list-objects: convert name_path to a strbuf
  show_object_with_name: simplify by using path_name()
  http-push: stop using name_path
  tree-diff: catch integer overflow in combine_diff_path allocation
  add helpers for detecting size_t overflow

8 years agoGit 2.4.11 v2.4.11
Junio C Hamano [Thu, 17 Mar 2016 17:00:44 +0000 (10:00 -0700)] 
Git 2.4.11

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 years agoMerge branch 'jk/path-name-safety-2.4' into maint-2.4
Junio C Hamano [Thu, 17 Mar 2016 16:55:54 +0000 (09:55 -0700)] 
Merge branch 'jk/path-name-safety-2.4' into maint-2.4

Bugfix patches were backported from the 'master' front to plug heap
corruption holes, to catch integer overflow in the computation of
pathname lengths, and to get rid of the name_path API.  Both of
these would have resulted in writing over an under-allocated buffer
when formulating pathnames while tree traversal.

* jk/path-name-safety-2.4:
  list-objects: pass full pathname to callbacks
  list-objects: drop name_path entirely
  list-objects: convert name_path to a strbuf
  show_object_with_name: simplify by using path_name()
  http-push: stop using name_path
  tree-diff: catch integer overflow in combine_diff_path allocation
  add helpers for detecting size_t overflow