OSDN Git Service
Junio C Hamano [Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)]
Merge branch 'mj/pull-rebase-autostash'
"git pull --rebase" learned "--[no-]autostash" option, so that
the rebase.autostash configuration variable set to true can be
overridden from the command line.
* mj/pull-rebase-autostash:
t5520: test --[no-]autostash with pull.rebase=true
t5520: reduce commom lines of code
t5520: factor out common "failing autostash" code
t5520: factor out common "successful autostash" code
t5520: use better test to check stderr output
t5520: ensure consistent test conditions
t5520: use consistent capitalization in test titles
pull --rebase: add --[no-]autostash flag
git-pull.c: introduce git_pull_config()
Junio C Hamano [Wed, 13 Apr 2016 21:12:36 +0000 (14:12 -0700)]
Merge branch 'jn/mergetools-examdiff'
"git mergetools" learned to drive ExamDiff.
* jn/mergetools-examdiff:
mergetools: add support for ExamDiff
mergetools: create mergetool_find_win32_cmd() helper function for winmerge
Junio C Hamano [Wed, 13 Apr 2016 21:12:35 +0000 (14:12 -0700)]
Merge branch 'es/format-patch-doc-hide-no-patch'
"git format-patch --help" showed `-s` and `--no-patch` as if these
are valid options to the command. We already hide `--patch` option
from the documentation, because format-patch is about showing the
diff, and the documentation now hides these options as well.
* es/format-patch-doc-hide-no-patch:
git-format-patch.txt: don't show -s as shorthand for multiple options
Junio C Hamano [Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)]
Merge branch 'js/mingw-tests-2.8'
Code clean-up.
* js/mingw-tests-2.8:
Windows: shorten code by re-using convert_slashes()
Junio C Hamano [Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)]
Merge branch 'cc/apply'
Minor code clean-up.
* cc/apply:
builtin/apply: free patch when parse_chunk() fails
builtin/apply: handle parse_binary() failure
apply: remove unused call to free() in gitdiff_{old,new}name()
builtin/apply: get rid of useless 'name' variable
Junio C Hamano [Wed, 13 Apr 2016 21:12:34 +0000 (14:12 -0700)]
Merge branch 'sb/misc-cleanups'
Assorted minor clean-ups.
* sb/misc-cleanups:
credential-cache, send_request: close fd when done
bundle: don't leak an fd in case of early return
abbrev_sha1_in_line: don't leak memory
notes: don't leak memory in git_config_get_notes_strategy
Junio C Hamano [Wed, 13 Apr 2016 21:12:33 +0000 (14:12 -0700)]
Merge branch 'sk/send-pack-all-fix'
"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
Junio C Hamano [Wed, 13 Apr 2016 21:12:32 +0000 (14:12 -0700)]
Merge branch 'sg/diff-multiple-identical-renames'
"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
Junio C Hamano [Wed, 13 Apr 2016 21:12:31 +0000 (14:12 -0700)]
Merge branch 'kn/for-each-tag-branch'
A minor documentation update.
* kn/for-each-tag-branch:
for-each-ref: fix description of '--contains' in manpage
Junio C Hamano [Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)]
Merge branch 'ky/branch-d-worktree'
When "git worktree" feature is in use, "git branch -d" allowed
deletion of a branch that is checked out in another worktree
* ky/branch-d-worktree:
branch -d: refuse deleting a branch which is currently checked out
Junio C Hamano [Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)]
Merge branch 'rz/worktree-no-checkout'
"git worktree add" can be given "--no-checkout" option to only
create an empty worktree without checking out the files.
* rz/worktree-no-checkout:
worktree: add: introduce --checkout option
Junio C Hamano [Wed, 13 Apr 2016 21:12:30 +0000 (14:12 -0700)]
Merge branch 'rt/rebase-i-shorten-stop-report'
The commit object name reported when "rebase -i" stops has been
shortened.
* rt/rebase-i-shorten-stop-report:
rebase-i: print an abbreviated hash when stop for editing
Junio C Hamano [Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)]
Merge branch 'rt/completion-help'
Shell completion (in contrib/) updates.
* rt/completion-help:
completion: add 'revisions' and 'everyday' to 'git help'
completion: add option '--guides' to 'git help'
Junio C Hamano [Wed, 13 Apr 2016 21:12:29 +0000 (14:12 -0700)]
Merge branch 'ak/use-hashmap-iter-first-in-submodule-config'
Minor code cleanup.
* ak/use-hashmap-iter-first-in-submodule-config:
submodule-config: use hashmap_iter_first()
Junio C Hamano [Wed, 13 Apr 2016 21:12:28 +0000 (14:12 -0700)]
Merge branch 'jk/check-repository-format'
The repository set-up sequence has been streamlined (the biggest
change is that there is no longer git_config_early()), so that we
do not attempt to look into refs/* when we know we do not have a
Git repository.
* jk/check-repository-format:
verify_repository_format: mark messages for translation
setup: drop repository_format_version global
setup: unify repository version callbacks
init: use setup.c's repo version verification
setup: refactor repo format reading and verification
config: drop git_config_early
check_repository_format_gently: stop using git_config_early
lazily load core.sharedrepository
wrap shared_repository global in get/set accessors
setup: document check_repository_format()
Junio C Hamano [Fri, 8 Apr 2016 21:34:11 +0000 (14:34 -0700)]
Third batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)]
Merge branch 'ss/msvc'
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
Junio C Hamano [Fri, 8 Apr 2016 21:29:13 +0000 (14:29 -0700)]
Merge branch 'oa/doc-diff-check'
A minor documentation update.
* oa/doc-diff-check:
Documentation: git diff --check detects conflict markers
Junio C Hamano [Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)]
Merge branch 'pb/opt-cmdmode-doc'
Minor API documentation update.
* pb/opt-cmdmode-doc:
api-parse-options.txt: document OPT_CMDMODE()
Junio C Hamano [Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)]
Merge branch 'nd/apply-report-skip'
"git apply -v" learned to report paths in the patch that were
skipped via --include/--exclude mechanism or being outside the
current working directory.
* nd/apply-report-skip:
apply: report patch skipping in verbose mode
Junio C Hamano [Fri, 8 Apr 2016 21:29:12 +0000 (14:29 -0700)]
Merge branch 'nd/apply-doc'
A minor documentation update.
* nd/apply-doc:
git-apply.txt: mention the behavior inside a subdir
git-apply.txt: remove a space
Junio C Hamano [Fri, 8 Apr 2016 21:29:11 +0000 (14:29 -0700)]
Merge branch 'jc/merge-refuse-new-root'
"git merge" used to allow merging two branches that have no common
base by default, which led to a brand new history of an existing
project created and then get pulled by an unsuspecting maintainer,
which allowed an unnecessary parallel history merged into the
existing project. The command has been taught not to allow this by
default, with an escape hatch "--allow-unrelated-histories" option
to be used in a rare event that merges histories of two projects
that started their lives independently.
* jc/merge-refuse-new-root:
merge: refuse to create too cool a merge by default
Junio C Hamano [Wed, 6 Apr 2016 18:44:24 +0000 (11:44 -0700)]
Second batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Wed, 6 Apr 2016 18:39:13 +0000 (11:39 -0700)]
Merge branch 'la/tag-force-signing-annotated-tags'
"git tag" can create an annotated tag without explicitly given an
"-a" (or "-s") option (i.e. when a tag message is given). A new
configuration variable, tag.forceSignAnnotated, can be used to tell
the command to create signed tag in such a situation.
* la/tag-force-signing-annotated-tags:
tag: add the option to force signing of annotated tags
Junio C Hamano [Wed, 6 Apr 2016 18:39:12 +0000 (11:39 -0700)]
Merge branch 'jk/submodule-c-credential'
"git -c credential.<var>=<value> submodule" can now be used to
propagate configuration variables related to credential helper
down to the submodules.
* jk/submodule-c-credential:
git_config_push_parameter: handle empty GIT_CONFIG_PARAMETERS
git: submodule honor -c credential.* from command line
quote: implement sq_quotef()
submodule: fix segmentation fault in submodule--helper clone
submodule: fix submodule--helper clone usage
submodule: check argc count for git submodule--helper clone
submodule: don't pass empty string arguments to submodule--helper clone
Junio C Hamano [Wed, 6 Apr 2016 18:39:11 +0000 (11:39 -0700)]
Merge branch 'jv/merge-nothing-into-void'
"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
Junio C Hamano [Wed, 6 Apr 2016 18:39:10 +0000 (11:39 -0700)]
Merge branch 'ss/commit-squash-msg'
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
Junio C Hamano [Wed, 6 Apr 2016 18:39:09 +0000 (11:39 -0700)]
Merge branch 'sb/rebase-x'
"git rebase -x" can be used without passing "-i" option.
* sb/rebase-x:
t3404: cleanup double empty lines between tests
rebase: decouple --exec from --interactive
Junio C Hamano [Wed, 6 Apr 2016 18:39:08 +0000 (11:39 -0700)]
Merge branch 'jk/test-httpd-config-nosystem'
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
Junio C Hamano [Wed, 6 Apr 2016 18:39:07 +0000 (11:39 -0700)]
Merge branch 'jk/send-email-rtrim-mailrc-alias'
"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
Junio C Hamano [Wed, 6 Apr 2016 18:39:06 +0000 (11:39 -0700)]
Merge branch 'jk/credential-cache-comment-exit'
A code clarification.
* jk/credential-cache-comment-exit:
credential-cache--daemon: clarify "exit" action semantics
Junio C Hamano [Wed, 6 Apr 2016 18:39:05 +0000 (11:39 -0700)]
Merge branch 'sb/clone-t57-t56'
Rename bunch of tests on "git clone" for better organization.
* sb/clone-t57-t56:
clone tests: rename t57* => t56*
Junio C Hamano [Wed, 6 Apr 2016 18:39:05 +0000 (11:39 -0700)]
Merge branch 'ls/p4-map-user'
"git p4" now allows P4 author names to be mapped to Git author
names.
* ls/p4-map-user:
git-p4: map a P4 user to Git author name and email address
Junio C Hamano [Wed, 6 Apr 2016 18:39:04 +0000 (11:39 -0700)]
Merge branch 'cc/doc-recommend-performance-trace-to-file'
A minor documentation update.
* cc/doc-recommend-performance-trace-to-file:
Documentation: talk about pager in api-trace.txt
Junio C Hamano [Wed, 6 Apr 2016 18:39:03 +0000 (11:39 -0700)]
Merge branch 'pb/t7502-drop-dup'
Code clean-up.
* pb/t7502-drop-dup:
t/t7502 : drop duplicate test
Junio C Hamano [Wed, 6 Apr 2016 18:39:02 +0000 (11:39 -0700)]
Merge branch 'da/mergetool-delete-delete-conflict'
"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
Junio C Hamano [Wed, 6 Apr 2016 18:39:01 +0000 (11:39 -0700)]
Merge branch 'sb/submodule-parallel-update'
A major part of "git submodule update" has been ported to C to take
advantage of the recently added framework to run download tasks in
parallel.
* sb/submodule-parallel-update:
clone: allow an explicit argument for parallel submodule clones
submodule update: expose parallelism to the user
submodule helper: remove double 'fatal: ' prefix
git submodule update: have a dedicated helper for cloning
run_processes_parallel: rename parameters for the callbacks
run_processes_parallel: treat output of children as byte array
submodule update: direct error message to stderr
fetching submodules: respect `submodule.fetchJobs` config option
submodule-config: drop check against NULL
submodule-config: keep update strategy around
Junio C Hamano [Wed, 6 Apr 2016 18:38:59 +0000 (11:38 -0700)]
Merge branch 'ss/receive-pack-parse-options'
The command line argument parser for "receive-pack" has been
rewritten to use parse-options.
* ss/receive-pack-parse-options:
builtin/receive-pack.c: use parse_options API
Junio C Hamano [Wed, 6 Apr 2016 18:38:59 +0000 (11:38 -0700)]
Merge branch 'ss/exc-flag-is-a-collection-of-bits'
Code clean-up.
* ss/exc-flag-is-a-collection-of-bits:
dir: store EXC_FLAG_* values in unsigned integers
Johannes Sixt [Sat, 2 Apr 2016 19:03:14 +0000 (21:03 +0200)]
Windows: shorten code by re-using convert_slashes()
Make a few more spots more readable by using the recently introduced,
Windows-specific helper.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Eric Sunshine [Sun, 27 Mar 2016 21:26:07 +0000 (17:26 -0400)]
git-format-patch.txt: don't show -s as shorthand for multiple options
git-format-patch recognizes -s as shorthand only for --signoff, however,
its documentation shows -s as shorthand for both --signoff and
--no-patch. Resolve this confusion by suppressing the bogus -s shorthand
for --no-patch.
While here, also avoid showing the --no-patch option in git-format-patch
documentation since it doesn't make sense to ask to suppress the patch
while at the same time explicitly asking to format the patch (which,
after all, is the purpose of git-format-patch).
Reported-by: Kevin Brodsky <corax26@gmail.com>
Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:32 +0000 (23:28 +0530)]
t5520: test --[no-]autostash with pull.rebase=true
The "--[no-]autostash" options for git-pull are only valid in
rebase mode (i.e. either --rebase is used or pull.rebase=true).
Existing tests already check the cases when --rebase is used but
fail to check for pull.rebase=true case.
Add two new tests to check that the --[no-]autostash options work
with pull.rebase=true.
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:31 +0000 (23:28 +0530)]
t5520: reduce commom lines of code
These two tests are almost similar and thus can be folded in a for-loop.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:30 +0000 (23:28 +0530)]
t5520: factor out common "failing autostash" code
Three tests contains repetitive lines of code.
Factor out common code into test_pull_autostash_fail() and then call it in
these tests.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:29 +0000 (23:28 +0530)]
t5520: factor out common "successful autostash" code
Four tests contains repetitive lines of code.
Factor out common code into test_pull_autostash() and then call it in
these tests.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:28 +0000 (23:28 +0530)]
t5520: use better test to check stderr output
Checking stderr output using test_i18ncmp may lead to test failure as
some shells write trace output to stderr when run under 'set -x'.
Use test_i18ngrep instead of test_i18ncmp.
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:27 +0000 (23:28 +0530)]
t5520: ensure consistent test conditions
Test title says that tests are done with rebase.autostash unset,
but does not take any action to make sure that it is indeed unset.
This may lead to test failure if future changes somehow pollutes
the configuration globally.
Ensure consistent test conditions by explicitly unsetting
rebase.autostash.
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mehul Jain [Sat, 2 Apr 2016 17:58:26 +0000 (23:28 +0530)]
t5520: use consistent capitalization in test titles
Signed-off-by: Mehul Jain <mehul.jain2029@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Nisnevich [Fri, 25 Mar 2016 23:17:57 +0000 (16:17 -0700)]
mergetools: add support for ExamDiff
Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jacob Nisnevich [Fri, 25 Mar 2016 23:17:56 +0000 (16:17 -0700)]
mergetools: create mergetool_find_win32_cmd() helper function for winmerge
Signed-off-by: Jacob Nisnevich <jacob.nisnevich@gmail.com>
Acked-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 3 Apr 2016 17:55:36 +0000 (10:55 -0700)]
First batch for post 2.8 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano [Sun, 3 Apr 2016 17:54:38 +0000 (10:54 -0700)]
Sync with Git 2.8.1
Junio C Hamano [Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)]
Merge branch 'jk/startup-info'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:35 +0000 (10:29 -0700)]
Merge branch 'es/test-gpg-tags'
A test for tags has been restructured so that more parts of it can
easily be run on a platform without a working GnuPG.
* es/test-gpg-tags:
t6302: skip only signed tags rather than all tests when GPG is missing
t6302: also test annotated in addition to signed tags
t6302: normalize names and descriptions of signed tags
lib-gpg: drop unnecessary "missing GPG" warning
Junio C Hamano [Sun, 3 Apr 2016 17:29:34 +0000 (10:29 -0700)]
Merge branch 'jk/getwholeline-getdelim-empty'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:33 +0000 (10:29 -0700)]
Merge branch 'rj/xdiff-prepare-plug-leak-on-error-codepath'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:31 +0000 (10:29 -0700)]
Merge branch 'jc/index-pack'
Code clean-up.
* jc/index-pack:
index-pack: add a helper function to derive .idx/.keep filename
Junio C Hamano [Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)]
Merge branch 'gf/fetch-pack-direct-object-fetch'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:29 +0000 (10:29 -0700)]
Merge branch 'jc/maint-index-pack-keep'
"git index-pack --keep[=<msg>] pack-$name.pack" simply did not work.
* jc/maint-index-pack-keep:
index-pack: correct --keep[=<msg>]
Junio C Hamano [Sun, 3 Apr 2016 17:29:27 +0000 (10:29 -0700)]
Merge branch 'mm/lockfile-error-message'
* mm/lockfile-error-message:
lockfile: improve error message when lockfile exists
lockfile: mark strings for translation
Junio C Hamano [Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)]
Merge branch 'jk/rev-parse-local-env-vars'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:26 +0000 (10:29 -0700)]
Merge branch 'jk/config-get-urlmatch'
"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
Junio C Hamano [Sun, 3 Apr 2016 17:29:25 +0000 (10:29 -0700)]
Merge branch 'jk/add-i-highlight'
* jk/add-i-highlight:
add--interactive: allow custom diff highlighting programs
Junio C Hamano [Sun, 3 Apr 2016 17:29:24 +0000 (10:29 -0700)]
Merge branch 'jk/credential-clear-config'
The credential.helper configuration variable is cumulative and
there is no good way to override it from the command line. As
a special case, giving an empty string as its value now serves
as the signal to clear the values specified in various files.
* jk/credential-clear-config:
credential: let empty credential specs reset helper list
Junio C Hamano [Sun, 3 Apr 2016 17:29:23 +0000 (10:29 -0700)]
Merge branch 'mp/upload-pack-use-embedded-args'
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
Junio C Hamano [Sun, 3 Apr 2016 17:29:22 +0000 (10:29 -0700)]
Merge branch 'mm/diff-renames-default'
The end-user facing Porcelain level commands like "diff" and "log"
now enables the rename detection by default.
* mm/diff-renames-default:
diff: activate diff.renames by default
log: introduce init_log_defaults()
t: add tests for diff.renames (true/false/unset)
t4001-diff-rename: wrap file creations in a test
Documentation/diff-config: fix description of diff.renames
Junio C Hamano [Sun, 3 Apr 2016 17:27:22 +0000 (10:27 -0700)]
Merge branch 'mm/readme-markdown'
Fix a few broken links in README.md and also teach rpmbuild
that there is no README.
* mm/readme-markdown:
README.md: don't take 'commandname' literally
git.spec.in: use README.md, not README
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>
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
Matthieu Moy [Sat, 27 Feb 2016 10:46:12 +0000 (11:46 +0100)]
README.md: don't take 'commandname' literally
The link to Documentation/git-commandname.txt was obviously broken.
Remove the link and make it clear that it is not a literal path name by
using *italics* in makdown.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
Stefan Beller [Fri, 1 Apr 2016 00:35:46 +0000 (17:35 -0700)]
credential-cache, send_request: close fd when done
No need to keep it open any further.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 1 Apr 2016 00:35:45 +0000 (17:35 -0700)]
bundle: don't leak an fd in case of early return
In successful operation `write_pack_data` will close the `bundle_fd`,
but when we exit early, we need to take care of the file descriptor
as well as the lock file ourselves. The lock file may be deleted at the
end of running the program, but we are in library code, so we should
not rely on that.
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 1 Apr 2016 00:35:44 +0000 (17:35 -0700)]
abbrev_sha1_in_line: don't leak memory
`split` is of type `struct strbuf **`, and currently we are leaking split
itself as well as each element in split[i]. We have a dedicated free
function for `struct strbuf **`, which takes care of freeing all
related memory.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller [Fri, 1 Apr 2016 00:35:43 +0000 (17:35 -0700)]
notes: don't leak memory in git_config_get_notes_strategy
This function asks for the value of a configuration and after
using the value does not have to retain ownership of it.
git_config_get_string_const() however is a function to get a
copy of the value, but we forget to free it before we return.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Wed, 16 Mar 2016 19:35:11 +0000 (20:35 +0100)]
builtin/apply: free patch when parse_chunk() fails
When parse_chunk() fails it can return -1, for example
when find_header() doesn't find a patch header.
In this case it's better in apply_patch() to free the
"struct patch" that we just allocated instead of
leaking it.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder [Fri, 18 Mar 2016 12:30:41 +0000 (13:30 +0100)]
builtin/apply: handle parse_binary() failure
In parse_binary() there is:
forward = parse_binary_hunk(&buffer, &size, &status, &used);
if (!forward && !status)
/* there has to be one hunk (forward hunk) */
return error(_("unrecognized binary patch at line %d"), linenr-1);
so parse_binary() can return -1, because that's what error() returns.
Also parse_binary_hunk() sets "status" to -1 in case of error and
parse_binary() does "if (status) return status;".
In this case parse_chunk() should not add -1 to the patchsize it computes.
It is better for future libification efforts to make it just return -1.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
SZEDER Gábor [Wed, 30 Mar 2016 13:48:30 +0000 (15:48 +0200)]
for-each-ref: fix description of '--contains' in manpage
'git for-each-ref's manpage says that '--contains' only lists tags,
but it lists all kinds of refs.
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
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>
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>
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>
Kazuki Yamaguchi [Tue, 29 Mar 2016 09:38:39 +0000 (18:38 +0900)]
branch -d: refuse deleting a branch which is currently checked out
When a branch is checked out by current working tree, deleting the
branch is forbidden. However when the branch is checked out only by
other working trees, deleting incorrectly succeeds.
Use find_shared_symref() to check if the branch is in use, not just
comparing with the current working tree's HEAD.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Kazuki Yamaguchi <k@rhe.jp>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ray Zhang [Tue, 29 Mar 2016 10:11:01 +0000 (10:11 +0000)]
worktree: add: introduce --checkout option
By adding this option which defaults to true, we can use the
corresponding --no-checkout to make some customizations before
the checkout, like sparse checkout, etc.
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Ray Zhang <zhanglei002@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
Ralf Thielow [Mon, 28 Mar 2016 16:00:00 +0000 (18:00 +0200)]
rebase-i: print an abbreviated hash when stop for editing
The message that is shown when rebase-i stops for editing prints
the full hash of the commit where it stopped which makes the message
overflow to the next line on smaller terminal windows. Print an
abbreviated hash instead.
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
Ralf Thielow [Thu, 24 Mar 2016 18:27:14 +0000 (19:27 +0100)]
completion: add 'revisions' and 'everyday' to 'git help'
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ralf Thielow [Thu, 24 Mar 2016 18:27:13 +0000 (19:27 +0100)]
completion: add option '--guides' to 'git help'
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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
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
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
Nguyễn Thái Ngọc Duy [Thu, 24 Mar 2016 11:56:19 +0000 (18:56 +0700)]
apply: report patch skipping in verbose mode
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>
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>
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>
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
Junio C Hamano [Fri, 18 Mar 2016 20:21:09 +0000 (13:21 -0700)]
merge: refuse to create too cool a merge by default
While it makes sense to allow merging unrelated histories of two
projects that started independently into one, in the way "gitk" was
merged to "git" itself aka "the coolest merge ever", such a merge is
still an unusual event. Worse, if somebody creates an independent
history by starting from a tarball of an established project and
sends a pull request to the original project, "git merge" however
happily creates such a merge without any sign of something unusual
is happening.
Teach "git merge" to refuse to create such a merge by default,
unless the user passes a new "--allow-unrelated-histories" option to
tell it that the user is aware that two unrelated projects are
merged.
Because such a "two project merge" is a rare event, a configuration
option to always allow such a merge is not added.
We could add the same option to "git pull" and have it passed
through to underlying "git merge". I do not have a fundamental
opposition against such a feature, but this commit does not do so
and instead leaves it as low-hanging fruit for others, because such
a "two project merge" would be done after fetching the other project
into some location in the working tree of an existing project and
making sure how well they fit together, it is sufficient to allow a
local merge without such an option pass-through from "git pull" to
"git merge". Many tests that are updated by this patch does the
pass-through manually by turning:
git pull something
into its equivalent:
git fetch something &&
git merge --allow-unrelated-histories FETCH_HEAD
If somebody is inclined to add such an option, updated tests in this
change need to be adjusted back to:
git pull --allow-unrelated-histories something
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>