Commit graph

42607 commits

Author SHA1 Message Date
Junio C Hamano 87c594471d Merge branch 'rt/string-list-lookup-cleanup' into HEAD
Code cleanup.

* rt/string-list-lookup-cleanup:
  string_list: use string-list API in unsorted_string_list_lookup()
2016-05-18 14:40:12 -07:00
Junio C Hamano 9ba3b14c64 Merge branch 'jk/fix-attribute-macro-in-2.5' into HEAD
Code fixup.

* jk/fix-attribute-macro-in-2.5:
  remote.c: spell __attribute__ correctly
2016-05-18 14:40:12 -07:00
Junio C Hamano 777dec64bd Merge branch 'sg/test-lib-simplify-expr-away' into HEAD
Code cleanup.

* sg/test-lib-simplify-expr-away:
  test-lib: simplify '--option=value' parsing
2016-05-18 14:40:11 -07:00
Junio C Hamano 14af79b93d Merge branch 'nd/remove-unused' into HEAD
Code cleanup.

* nd/remove-unused:
  wrapper.c: delete dead function git_mkstemps()
  dir.c: remove dead function fnmatch_icase()
2016-05-18 14:40:11 -07:00
Junio C Hamano 13af774e26 Merge branch 'sk/gitweb-highlight-encoding' into HEAD
Some multi-byte encoding can have a backslash byte as a later part
of one letter, which would confuse "highlight" filter used in
gitweb.

* sk/gitweb-highlight-encoding:
  gitweb: apply fallback encoding before highlight
2016-05-18 14:40:10 -07:00
Junio C Hamano 09687585d1 Merge branch 'ls/travis-submitting-patches' into HEAD
* ls/travis-submitting-patches:
  Documentation: add setup instructions for Travis CI
2016-05-18 14:40:09 -07:00
Junio C Hamano 1cfb225aba Merge branch 'js/close-packs-before-gc' into HEAD
* js/close-packs-before-gc:
  t5510: run auto-gc in the foreground
2016-05-18 14:40:09 -07:00
Junio C Hamano 803fd70cee Merge branch 'ls/p4-lfs' into HEAD
Recent update to Git LFS broke "git p4" by changing the output from
its "lfs pointer" subcommand.

* ls/p4-lfs:
  git-p4: fix Git LFS pointer parsing
  travis-ci: express Linux/OS X dependency versions more clearly
  travis-ci: update Git-LFS and P4 to the latest version
2016-05-18 14:40:08 -07:00
Junio C Hamano 7ab6da3c40 Merge branch 'ls/p4-lfs-test-fix-2.7.0' into HEAD
Fix a broken test.

* ls/p4-lfs-test-fix-2.7.0:
  t9824: fix wrong reference value
  t9824: fix broken &&-chain in a subshell
2016-05-18 14:40:08 -07:00
Junio C Hamano f735a50ffd Merge branch 'nf/mergetool-prompt' into HEAD
UI consistency improvements.

* nf/mergetool-prompt:
  difftool/mergetool: make the form of yes/no questions consistent
2016-05-18 14:40:07 -07:00
Junio C Hamano 1f7b196e21 Merge branch 'jd/send-email-to-whom' into HEAD
A question by "git send-email" to ask the identity of the sender
has been updated.

* jd/send-email-to-whom:
  send-email: fix grammo in the prompt that asks e-mail recipients
2016-05-18 14:40:07 -07:00
Junio C Hamano f12fffd347 Merge branch 'js/win32-mmap' into HEAD
mmap emulation on Windows has been optimized and work better without
consuming paging store when not needed.

* js/win32-mmap:
  mmap(win32): avoid expensive fstat() call
  mmap(win32): avoid copy-on-write when it is unnecessary
  win32mmap: set errno appropriately
2016-05-18 14:40:06 -07:00
Junio C Hamano c555e529ac Merge branch 'jk/push-client-deadlock-fix' into HEAD
Some Windows SDK lacks pthread_sigmask() implementation and fails
to compile the recently updated "git push" codepath that uses it.

* jk/push-client-deadlock-fix:
  Windows: only add a no-op pthread_sigmask() when needed
  Windows: add pthread_sigmask() that does nothing
  t5504: drop sigpipe=ok from push tests
  fetch-pack: isolate sigpipe in demuxer thread
  send-pack: isolate sigpipe in demuxer thread
  run-command: teach async threads to ignore SIGPIPE
  send-pack: close demux pipe before finishing async process
2016-05-18 14:40:06 -07:00
Junio C Hamano 920f2ea33b Merge branch 'sb/mv-submodule-fix' into HEAD
"git mv old new" did not adjust the path for a submodule that lives
as a subdirectory inside old/ directory correctly.

* sb/mv-submodule-fix:
  mv: allow moving nested submodules
2016-05-18 14:40:05 -07:00
Junio C Hamano e9ef83a299 Merge branch 'da/user-useconfigonly' into HEAD
The "user.useConfigOnly" configuration variable makes it an error
if users do not explicitly set user.name and user.email.  However,
its check was not done early enough and allowed another error to
trigger, reporting that the default value we guessed from the
system setting was unusable.  This was a suboptimal end-user
experience as we want the users to set user.name/user.email without
relying on the auto-detection at all.

* da/user-useconfigonly:
  ident: give "please tell me" message upon useConfigOnly error
  ident: check for useConfigOnly before auto-detection of name/email
2016-05-18 14:40:05 -07:00
Junio C Hamano 787a490cee Merge branch 'ld/p4-test-py3' into HEAD
The test scripts for "git p4" (but not "git p4" implementation
itself) has been updated so that they would work even on a system
where the installed version of Python is python 3.

* ld/p4-test-py3:
  git-p4 tests: time_in_seconds should use $PYTHON_PATH
  git-p4 tests: work with python3 as well as python2
  git-p4 tests: cd to / before running python
2016-05-18 14:40:04 -07:00
Johannes Schindelin ed84387a6b Windows: only add a no-op pthread_sigmask() when needed
In f924b52 (Windows: add pthread_sigmask() that does nothing,
2016-05-01), we introduced a no-op for Windows. However, this breaks
building Git in Git for Windows' SDK because pthread_sigmask() is
already a no-op there, #define'd in the pthread_signal.h header in
/mingw64/x86_64-w64-mingw32/include/.

Let's wrap the definition of pthread_sigmask() in a guard that skips
it when compiling with MinGW-w64' headers.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-11 14:02:10 -07:00
Junio C Hamano d92347f59f Almost ready for 2.8.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-06 14:53:36 -07:00
Junio C Hamano cc601901a7 Merge branch 'sb/submodule-path-misc-bugs' into maint
"git submodule" reports the paths of submodules the command
recurses into, but this was incorrect when the command was not run
from the root level of the superproject.

* sb/submodule-path-misc-bugs:
  t7407: make expectation as clear as possible
  submodule update: test recursive path reporting from subdirectory
  submodule update: align reporting path for custom command execution
  submodule status: correct path handling in recursive submodules
  submodule update --init: correct path handling in recursive submodules
  submodule foreach: correct path display in recursive submodules
2016-05-06 14:53:25 -07:00
Junio C Hamano a0c9cf51c0 Merge branch 'ky/imap-send-openssl-1.1.0' into maint
Upcoming OpenSSL 1.1.0 will break compilation b updating a few APIs
we use in imap-send, which has been adjusted for the change.

* ky/imap-send-openssl-1.1.0:
  configure: remove checking for HMAC_CTX_cleanup
  imap-send: avoid deprecated TLSv1_method()
  imap-send: check NULL return of SSL_CTX_new()
  imap-send: use HMAC() function provided by OpenSSL
2016-05-06 14:53:24 -07:00
Junio C Hamano 8854ded7af Merge branch 'js/replace-edit-use-editor-configuration' into maint
"git replace -e" did not honour "core.editor" configuration.

* js/replace-edit-use-editor-configuration:
  replace --edit: respect core.editor
2016-05-06 14:53:24 -07:00
Junio C Hamano b450a39bea Merge branch 'cc/apply' into maint
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
2016-05-06 14:53:23 -07:00
Junio C Hamano c75fb77d9a Merge branch 'kn/for-each-tag-branch' into maint
A minor documentation update.

* kn/for-each-tag-branch:
  for-each-ref: fix description of '--contains' in manpage
2016-05-06 14:53:23 -07:00
Matthieu Moy 4453d76c6a git-multimail: update to release 1.3.0
The changes are described in CHANGES.

Contributions-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Contributions-by: Stefan Tatschner <rumpelsepp@sevenbyte.org>
Contributions-by: Simon P <simon.git@le-huit.fr>
Contributions-by: Leander Hasty <leander@1stplayable.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-03 14:04:27 -07:00
Shin Kojima 029f37217c gitweb: apply fallback encoding before highlight
Some multi-byte character encodings (such as Shift_JIS and GBK) have
characters whose final bytes is an ASCII '\' (0x5c), and they
will be displayed as funny-characters even if $fallback_encoding is
correct.  This is because `highlight` command always expects UTF-8
encoded strings from STDIN.

    $ echo 'my $v = "申";' | highlight --syntax perl | w3m -T text/html -dump
    my $v = "申";

    $ echo 'my $v = "申";' | iconv -f UTF-8 -t Shift_JIS | highlight \
        --syntax perl | iconv -f Shift_JIS -t UTF-8 | w3m -T text/html -dump

    iconv: (stdin):9:135: cannot convert
    my $v = "

This patch prepare git blob objects to be encoded into UTF-8 before
highlighting in the manner of `to_utf8` subroutine.

Signed-off-by: Shin Kojima <shin@kojima.org>
Reviewed-by: Jakub Narębski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-03 11:32:31 -07:00
Junio C Hamano 5b618c1c8d Start preparing for 2.8.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-02 14:24:36 -07:00
Junio C Hamano 6671346c66 Merge branch 'jk/use-write-script-more' into maint
Code clean-up.

* jk/use-write-script-more:
  t3404: use write_script
  t1020: do not overuse printf and use write_script
  t5532: use write_script
2016-05-02 14:24:14 -07:00
Junio C Hamano 97d5165780 Merge branch 'jc/xstrfmt-null-with-prec-0' into maint
Code cleanup.

* jc/xstrfmt-null-with-prec-0:
  setup.c: do not feed NULL to "%.*s" even with precision 0
2016-05-02 14:24:14 -07:00
Junio C Hamano 037438a533 Merge branch 'ew/send-email-drop-data-dumper' into maint
Code clean-up.

* ew/send-email-drop-data-dumper:
  send-email: do not load Data::Dumper
2016-05-02 14:24:13 -07:00
Junio C Hamano 1c07e3eaaf Merge branch 'ad/cygwin-wants-rename' into maint
On Cygwin, object creation uses the "create a temporary and then
rename it to the final name" pattern, not "create a temporary,
hardlink it to the final name and then unlink the temporary"
pattern.

This is necessary to use Git on Windows shared directories, and is
already enabled for the MinGW and plain Windows builds.  It also
has been used in Cygwin packaged versions of Git for quite a while.
See http://thread.gmane.org/gmane.comp.version-control.git/291853
($gmane/275680, $gmane/291853).

* ad/cygwin-wants-rename:
  config.mak.uname: Cygwin needs OBJECT_CREATION_USES_RENAMES
2016-05-02 14:24:12 -07:00
Junio C Hamano d406f681fe Merge branch 'jk/do-not-printf-NULL' into maint
"git config" had a codepath that tried to pass a NULL to
printf("%s"), which nobody seems to have noticed.

* jk/do-not-printf-NULL:
  git_config_set_multivar_in_file: handle "unset" errors
  git_config_set_multivar_in_file: all non-zero returns are errors
  config: lower-case first word of error strings
2016-05-02 14:24:10 -07:00
Junio C Hamano 6b9eee2bb2 Merge branch 'jc/http-socks5h' into maint
The socks5:// proxy support added back in 2.6.4 days was not aware
that socks5h:// proxies behave differently.

* jc/http-socks5h:
  http: differentiate socks5:// and socks5h://
2016-05-02 14:24:10 -07:00
Junio C Hamano e18ace0951 Merge branch 'ky/imap-send' into maint
Support for CRAM-MD5 authentication method in "git imap-send" did
not work well.

* ky/imap-send:
  imap-send: fix CRAM-MD5 response calculation
  imap-send: check for NOLOGIN capability only when using LOGIN command
2016-05-02 14:24:10 -07:00
Junio C Hamano 12c5cd774e Merge branch 'ad/commit-have-m-option' into maint
"git commit" misbehaved in a few minor ways when an empty message
is given via -m '', all of which has been corrected.

* ad/commit-have-m-option:
  commit: do not ignore an empty message given by -m ''
  commit: --amend -m '' silently fails to wipe message
2016-05-02 14:24:09 -07:00
Junio C Hamano f5e16b2a7b Merge branch 'sb/submodule-helper-clone-regression-fix' into maint
A partial rewrite of "git submodule" in the 2.7 timeframe changed
the way the gitdir: pointer in the submodules point at the real
repository location to use absolute paths by accident.  This has
been corrected.

* sb/submodule-helper-clone-regression-fix:
  submodule--helper, module_clone: catch fprintf failure
  submodule--helper: do not borrow absolute_path() result for too long
  submodule--helper, module_clone: always operate on absolute paths
  submodule--helper clone: create the submodule path just once
  submodule--helper: fix potential NULL-dereference
  recursive submodules: test for relative paths
2016-05-02 14:24:08 -07:00
Junio C Hamano 75375ea337 Merge branch 'jk/branch-shortening-funny-symrefs' into maint
A change back in version 2.7 to "git branch" broke display of a
symbolic ref in a non-standard place in the refs/ hierarchy (we
expect symbolic refs to appear in refs/remotes/*/HEAD to point at
the primary branch the remote has, and as .git/HEAD to point at the
branch we locally checked out).

* jk/branch-shortening-funny-symrefs:
  branch: fix shortening of non-remote symrefs
2016-05-02 14:24:07 -07:00
Junio C Hamano a3fa565327 Merge branch 'es/format-patch-doc-hide-no-patch' into maint
"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
2016-05-02 14:24:06 -07:00
Junio C Hamano 3c383a30c8 Merge branch 'ky/branch-m-worktree' into maint
When "git worktree" feature is in use, "git branch -m" renamed a
branch that is checked out in another worktree without adjusting
the HEAD symbolic ref for the worktree.

* ky/branch-m-worktree:
  set_worktree_head_symref(): fix error message
  branch -m: update all per-worktree HEADs
  refs: add a new function set_worktree_head_symref
2016-05-02 14:24:05 -07:00
Junio C Hamano a4127142c6 Merge branch 'ky/branch-d-worktree' into maint
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
2016-05-02 14:24:05 -07:00
Junio C Hamano 8591654998 Merge branch 'jk/check-repository-format' into maint
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()
2016-05-02 14:24:04 -07:00
Junio C Hamano ffaa7c5d4f Merge branch 'ew/send-email-readable-message-id' into maint
"git send-email" now uses a more readable timestamps when
formulating a message ID.

* ew/send-email-readable-message-id:
  send-email: more meaningful Message-ID
2016-05-02 14:24:04 -07:00
Lars Schneider 0e5d028a7a Documentation: add setup instructions for Travis CI
Also change UK english "behaviour" to US english "behavior".

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-02 11:31:44 -07:00
SZEDER Gábor bb05510e55 t5510: run auto-gc in the foreground
The last test added to 't5510-fetch' in 0898c96281 (fetch: release
pack files before garbage-collecting, 2016-01-13) may sporadically
trigger following error message from the test harness:

  rm: cannot remove 'trash directory.t5510-fetch/auto-gc/.git': Directory not empty

The test in question forces an auto-gc, which, if the system supports
it, runs in the background by default, and occasionally takes long
enough for the test to finish and for 'test_done' to start
housekeeping.  This can lead to the test's 'git gc --auto' in the
background and 'test_done's 'rm -rf $trash' in the foreground racing
each other to create and delete files and directories.  It might just
happen that 'git gc' re-creates a directory that 'rm -rf' already
visited and removed, which ultimately triggers the above error.

Disable detaching the auto-gc process to ensure that it finishes
before the test can continue, thus avoiding this racy situation.

Signed-off-by: SZEDER Gábor <szeder@ira.uka.de>
Reviewed-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-02 11:28:04 -07:00
Johannes Sixt f924b52a77 Windows: add pthread_sigmask() that does nothing
A previous change introduced a call to pthread_sigmask() in order to block
SIGPIPE in a thread. Since there are no signal facilities on Windows that
are similar to POSIX signals, just ignore the request to block the signal.
In the particular case, the effect of blocking SIGPIPE on POSIX is that
write() calls return EPIPE when the reader closes the pipe. This is how
write() behaves on Windows.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-05-02 11:22:24 -07:00
Junio C Hamano 60115f54bd Git 2.8.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-04-29 14:19:11 -07:00
Junio C Hamano 0c1a8ec8da Merge branch 'js/mingw-tests-2.8' into maint
Code clean-up.

* js/mingw-tests-2.8:
  Windows: shorten code by re-using convert_slashes()
2016-04-29 14:16:01 -07:00
Junio C Hamano 4dda133385 Merge branch 'ep/trace-doc-sample-fix' into maint
Fix a typo in an example in the trace API documentation.

* ep/trace-doc-sample-fix:
  api-trace.txt: fix typo
2016-04-29 14:16:00 -07:00
Junio C Hamano 98eef48257 Merge branch 'jc/makefile-redirection-stderr' into maint
A minor fix in the Makefile.

* jc/makefile-redirection-stderr:
  Makefile: fix misdirected redirections
2016-04-29 14:15:59 -07:00
Junio C Hamano a4708391d3 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()
2016-04-29 14:15:58 -07:00
Junio C Hamano 002dd773b0 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
2016-04-29 14:15:58 -07:00