Commit Graph

51152 Commits

Author SHA1 Message Date
Junio C Hamano
278c251147 Merge branch 'sg/doc-gc-quote-mismatch-fix'
Doc formatting fix.

* sg/doc-gc-quote-mismatch-fix:
  docs/git-gc: fix minor rendering issue
2018-05-08 15:59:26 +09:00
Junio C Hamano
1dfb929a37 Merge branch 'sg/completion-clear-cached'
The completion script (in contrib/) learned to clear cached list of
command line options upon dot-sourcing it again in a more efficient
way.

* sg/completion-clear-cached:
  completion: reduce overhead of clearing cached --options
2018-05-08 15:59:25 +09:00
Junio C Hamano
90186fa057 Merge branch 'sb/worktree-remove-opt-force'
"git worktree remove" learned that "-f" is a shorthand for
"--force" option, just like for "git worktree add".

* sb/worktree-remove-opt-force:
  worktree: accept -f as short for --force for removal
2018-05-08 15:59:24 +09:00
Junio C Hamano
535cfa32d7 Merge branch 'ma/double-dashes-in-docs'
Doc formatting updates.

* ma/double-dashes-in-docs:
  git-submodule.txt: quote usage in monospace, drop backslash
  git-[short]log.txt: unify quoted standalone --
  doc: convert [\--] to [--]
  doc: convert \--option to --option
2018-05-08 15:59:24 +09:00
Junio C Hamano
3138f23c2e Merge branch 'tq/t1510'
Test cleanup.

* tq/t1510:
  t1510-repo-setup.sh: remove useless mkdir
2018-05-08 15:59:23 +09:00
Junio C Hamano
c0bdbac449 Merge branch 'so/glossary-ancestor'
Docfix.

* so/glossary-ancestor:
  glossary: substitute "ancestor" for "direct ancestor" in 'push' description.
2018-05-08 15:59:23 +09:00
Junio C Hamano
1ac0ce4d32 Merge branch 'ls/checkout-encoding'
The new "checkout-encoding" attribute can ask Git to convert the
contents to the specified encoding when checking out to the working
tree (and the other way around when checking in).

* ls/checkout-encoding:
  convert: add round trip check based on 'core.checkRoundtripEncoding'
  convert: add tracing for 'working-tree-encoding' attribute
  convert: check for detectable errors in UTF encodings
  convert: add 'working-tree-encoding' attribute
  utf8: add function to detect a missing UTF-16/32 BOM
  utf8: add function to detect prohibited UTF-16/32 BOM
  utf8: teach same_encoding() alternative UTF encoding names
  strbuf: add a case insensitive starts_with()
  strbuf: add xstrdup_toupper()
  strbuf: remove unnecessary NUL assignment in xstrdup_tolower()
2018-05-08 15:59:22 +09:00
Junio C Hamano
7d7d051c5e Merge branch 'ab/nuke-emacs-contrib'
The scripts in contrib/emacs/ have outlived their usefulness and
have been replaced with a stub that errors out and tells the user
there are replacements.

* ab/nuke-emacs-contrib:
  git{,-blame}.el: remove old bitrotting Emacs code
2018-05-08 15:59:22 +09:00
Junio C Hamano
e998e7a188 Merge branch 'nd/warn-more-for-devs'
The build procedure "make DEVELOPER=YesPlease" learned to enable a
bit more warning options depending on the compiler used to help
developers more.  There also is "make DEVOPTS=tokens" knob
available now, for those who want to help fixing warnings we
usually ignore, for example.

* nd/warn-more-for-devs:
  Makefile: add a DEVOPTS to get all of -Wextra
  Makefile: add a DEVOPTS to suppress -Werror under DEVELOPER
  Makefile: detect compiler and enable more warnings in DEVELOPER=1
  connect.c: mark die_initial_contact() NORETURN
2018-05-08 15:59:21 +09:00
Junio C Hamano
174774cd51 Merge branch 'sb/object-store-replace'
The effort to pass the repository in-core structure throughout the
API continues.  This round deals with the code that implements the
refs/replace/ mechanism.

* sb/object-store-replace:
  replace-object: allow lookup_replace_object to handle arbitrary repositories
  replace-object: allow do_lookup_replace_object to handle arbitrary repositories
  replace-object: allow prepare_replace_object to handle arbitrary repositories
  refs: allow for_each_replace_ref to handle arbitrary repositories
  refs: store the main ref store inside the repository struct
  replace-object: add repository argument to lookup_replace_object
  replace-object: add repository argument to do_lookup_replace_object
  replace-object: add repository argument to prepare_replace_object
  refs: add repository argument to for_each_replace_ref
  refs: add repository argument to get_main_ref_store
  replace-object: check_replace_refs is safe in multi repo environment
  replace-object: eliminate replace objects prepared flag
  object-store: move lookup_replace_object to replace-object.h
  replace-object: move replace_map to object store
  replace_object: use oidmap
2018-05-08 15:59:21 +09:00
Junio C Hamano
b10edb2df5 Merge branch 'ds/commit-graph'
Precompute and store information necessary for ancestry traversal
in a separate file to optimize graph walking.

* ds/commit-graph:
  commit-graph: implement "--append" option
  commit-graph: build graph from starting commits
  commit-graph: read only from specific pack-indexes
  commit: integrate commit graph with commit parsing
  commit-graph: close under reachability
  commit-graph: add core.commitGraph setting
  commit-graph: implement git commit-graph read
  commit-graph: implement git-commit-graph write
  commit-graph: implement write_commit_graph()
  commit-graph: create git-commit-graph builtin
  graph: add commit graph design document
  commit-graph: add format document
  csum-file: refactor finalize_hashfile() method
  csum-file: rename hashclose() to finalize_hashfile()
2018-05-08 15:59:20 +09:00
Junio C Hamano
4f4d0b42ba Merge branch 'js/empty-config-section-fix'
"git config --unset a.b", when "a.b" is the last variable in an
otherwise empty section "a", left an empty section "a" behind, and
worse yet, a subsequent "git config a.c value" did not reuse that
empty shell and instead created a new one.  These have been
(partially) corrected.

* js/empty-config-section-fix:
  git_config_set: reuse empty sections
  git config --unset: remove empty sections (in the common case)
  git_config_set: make use of the config parser's event stream
  git_config_set: do not use a state machine
  config_set_store: rename some fields for consistency
  config: avoid using the global variable `store`
  config: introduce an optional event stream while parsing
  t1300: `--unset-all` can leave an empty section behind (bug)
  t1300: add a few more hairy examples of sections becoming empty
  t1300: remove unreasonable expectation from TODO
  t1300: avoid relying on a bug
  config --replace-all: avoid extra line breaks
  t1300: demonstrate that --replace-all can "invent" newlines
  t1300: rename it to reflect that `repo-config` was deprecated
  git_config_set: fix off-by-two
2018-05-08 15:59:18 +09:00
Junio C Hamano
b7da73ac8b Merge branch 'ot/libify-get-ref-atom-value'
Code restructuring, in preparation for further work.

* ot/libify-get-ref-atom-value:
  ref-filter: libify get_ref_atom_value()
  ref-filter: add return value to parsers
  ref-filter: change parsing function error handling
  ref-filter: add return value && strbuf to handlers
  ref-filter: start adding strbufs with errors
  ref-filter: add shortcut to work with strbufs
2018-05-08 15:59:18 +09:00
Junio C Hamano
0c7ecb7c31 Merge branch 'sb/submodule-move-nested'
Moving a submodule that itself has submodule in it with "git mv"
forgot to make necessary adjustment to the nested sub-submodules;
now the codepath learned to recurse into the submodules.

* sb/submodule-move-nested:
  submodule: fixup nested submodules after moving the submodule
  submodule-config: remove submodule_from_cache
  submodule-config: add repository argument to submodule_from_{name, path}
  submodule-config: allow submodule_free to handle arbitrary repositories
  grep: remove "repo" arg from non-supporting funcs
  submodule.h: drop declaration of connect_work_tree_and_git_dir
2018-05-08 15:59:17 +09:00
Junio C Hamano
92034a9cd5 Merge branch 'dj/runtime-prefix'
A build-time option has been added to allow Git to be told to refer
to its associated files relative to the main binary, in the same
way that has been possible on Windows for quite some time, for
Linux, BSDs and Darwin.

* dj/runtime-prefix:
  Makefile: quote $INSTLIBDIR when passing it to sed
  Makefile: remove unused @@PERLLIBDIR@@ substitution variable
  mingw/msvc: use the new-style RUNTIME_PREFIX helper
  exec_cmd: provide a new-style RUNTIME_PREFIX helper for Windows
  exec_cmd: RUNTIME_PREFIX on some POSIX systems
  Makefile: add Perl runtime prefix support
  Makefile: generate Perl header from template file
2018-05-08 15:59:17 +09:00
Junio C Hamano
c988f6425a Merge branch 'ab/simplify-perl-makefile'
Recent simplification of build procedure forgot a bit of tweak to
the build procedure of contrib/mw-to-git/

* ab/simplify-perl-makefile:
  Makefile: mark perllibdir as a .PHONY target
  perl: fix installing modules from contrib
2018-05-08 15:59:16 +09:00
Junio C Hamano
9bfa0f9be3 Merge branch 'bw/protocol-v2'
The beginning of the next-gen transfer protocol.

* bw/protocol-v2: (35 commits)
  remote-curl: don't request v2 when pushing
  remote-curl: implement stateless-connect command
  http: eliminate "# service" line when using protocol v2
  http: don't always add Git-Protocol header
  http: allow providing extra headers for http requests
  remote-curl: store the protocol version the server responded with
  remote-curl: create copy of the service name
  pkt-line: add packet_buf_write_len function
  transport-helper: introduce stateless-connect
  transport-helper: refactor process_connect_service
  transport-helper: remove name parameter
  connect: don't request v2 when pushing
  connect: refactor git_connect to only get the protocol version once
  fetch-pack: support shallow requests
  fetch-pack: perform a fetch using v2
  upload-pack: introduce fetch server command
  push: pass ref prefixes when pushing
  fetch: pass ref prefixes when fetching
  ls-remote: pass ref prefixes when requesting a remote's refs
  transport: convert transport_get_remote_refs to take a list of ref prefixes
  ...
2018-05-08 15:59:16 +09:00
Junio C Hamano
1f1cddd558 The fourth batch for 2.18
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-25 13:44:42 +09:00
Junio C Hamano
cac7a2ba7b Merge branch 'jm/mem-pool'
An reusable "memory pool" implementation has been extracted from
fast-import.c, which in turn has become the first user of the
mem-pool API.

* jm/mem-pool:
  mem-pool: move reusable parts of memory pool into its own file
  fast-import: introduce mem_pool type
  fast-import: rename mem_pool type to mp_block
2018-04-25 13:29:06 +09:00
Junio C Hamano
bedb10c788 Merge branch 'tg/use-git-contacts'
Doc update.

* tg/use-git-contacts:
  SubmittingPatches: mention the git contacts command
2018-04-25 13:29:05 +09:00
Junio C Hamano
89e5aa3dff Merge branch 'sb/filenames-with-dashes'
Rename bunch of source files to more consistently use dashes
instead of underscores to connect words.

* sb/filenames-with-dashes:
  replace_object.c: rename to use dash in file name
  sha1_file.c: rename to use dash in file name
  sha1_name.c: rename to use dash in file name
  exec_cmd: rename to use dash in file name
  unicode_width.h: rename to use dash in file name
  write_or_die.c: rename to use dashes in file name
2018-04-25 13:29:05 +09:00
Junio C Hamano
02645318f6 Merge branch 'cc/perf-bisect'
Performance measuring framework in t/perf learned to help bisecting
performance regressions.

* cc/perf-bisect:
  t/perf: add scripts to bisect performance regressions
  perf/run: add --subsection option
2018-04-25 13:29:04 +09:00
Junio C Hamano
7a79d7e9fb Merge branch 'bp/fsmonitor-prime-index'
The index file is updated to record the fsmonitor section after a
full scan was made, to avoid wasting the effort that has already
spent.

* bp/fsmonitor-prime-index:
  fsmonitor: force index write after full scan
2018-04-25 13:29:04 +09:00
Junio C Hamano
beed7e22fd Merge branch 'bp/fsmonitor-bufsize-fix'
Fix an unexploitable (because the oversized contents are not under
attacker's control) buffer overflow.

* bp/fsmonitor-bufsize-fix:
  fsmonitor: fix incorrect buffer size when printing version number
2018-04-25 13:29:03 +09:00
Junio C Hamano
3a940e90d5 Merge branch 'cb/bash-completion-ls-files-processing'
Shell completion (in contrib) that gives list of paths have been
optimized somewhat.

* cb/bash-completion-ls-files-processing:
  completion: improve ls-files filter performance
2018-04-25 13:29:02 +09:00
Junio C Hamano
6b747fc723 Merge branch 'es/worktree-docs'
Doc updates.

* es/worktree-docs:
  git-worktree.txt: unify command-line prompt in example blocks
  git-worktree.txt: recommend 'git worktree remove' over manual deletion
2018-04-25 13:29:02 +09:00
Junio C Hamano
8b22d13243 Merge branch 'es/fread-reads-dir-autoconf-fix'
Small fix to the autoconf build procedure.

* es/fread-reads-dir-autoconf-fix:
  configure.ac: fix botched FREAD_READS_DIRECTORIES check
2018-04-25 13:29:01 +09:00
Junio C Hamano
deb9845a0a Merge branch 'ps/test-chmtime-get'
Test cleanup.

* ps/test-chmtime-get:
  t/helper: 'test-chmtime (--get|-g)' to print only the mtime
2018-04-25 13:29:00 +09:00
Junio C Hamano
3d5a179ec0 Merge branch 'js/t5404-path-fix'
Test fix.

* js/t5404-path-fix:
  t5404: relax overzealous test
2018-04-25 13:29:00 +09:00
Junio C Hamano
b3d6c48c5f Merge branch 'jk/ref-array-push'
API clean-up aournd ref-filter code.

* jk/ref-array-push:
  ref-filter: factor ref_array pushing into its own function
  ref-filter: make ref_array_item allocation more consistent
  ref-filter: use "struct object_id" consistently
2018-04-25 13:28:59 +09:00
Junio C Hamano
cb6462fe74 Merge branch 'en/doc-typoes'
Docfix.

* en/doc-typoes:
  Documentation: normalize spelling of 'normalised'
  Documentation: fix several one-character-off spelling errors
2018-04-25 13:28:58 +09:00
Junio C Hamano
f9bcd751aa Merge branch 'lw/daemon-log-destination'
Recent introduction of "--log-destination" option to "git daemon"
did not work well when the daemon was run under "--inetd" mode.

* lw/daemon-log-destination:
  daemon.c: fix condition for redirecting stderr
2018-04-25 13:28:58 +09:00
Junio C Hamano
f8fbcd6e01 Merge branch 'mn/send-email-credential-doc'
Doc update.

* mn/send-email-credential-doc:
  send-email: simplify Gmail example in the documentation
2018-04-25 13:28:57 +09:00
Junio C Hamano
f2d5e07667 Merge branch 'ak/bisect-doc-typofix'
Docfix.

* ak/bisect-doc-typofix:
  Documentation/git-bisect.txt: git bisect term → git bisect terms
2018-04-25 13:28:56 +09:00
Junio C Hamano
da36be5f08 Merge branch 'br/mergetools-guiffy'
"git mergetools" learned talking to guiffy.

* br/mergetools-guiffy:
  mergetools: add support for guiffy
2018-04-25 13:28:54 +09:00
Junio C Hamano
03f78e1434 Merge branch 'nd/worktree-move'
Test update.

* nd/worktree-move:
  t2028: tighten grep expression to make "move worktree" test more robust
2018-04-25 13:28:54 +09:00
Junio C Hamano
4cbaa6b47f Merge branch 'ks/branch-list-detached-rebase-i'
"git branch --list" during an interrupted "rebase -i" now lets
users distinguish the case where a detached HEAD is being rebased
and a normal branch is being rebased.

* ks/branch-list-detached-rebase-i:
  t3200: verify "branch --list" sanity when rebasing from detached HEAD
  branch --list: print useful info whilst interactive rebasing a detached HEAD
2018-04-25 13:28:54 +09:00
Junio C Hamano
e6986abb77 Merge branch 'jk/t5561-missing-curl'
Test fixes.

* jk/t5561-missing-curl:
  t5561: skip tests if curl is not available
  t5561: drop curl stderr redirects
2018-04-25 13:28:53 +09:00
Junio C Hamano
8295f2028f Merge branch 'bw/commit-partial-from-subdirectory-fix'
"cd sub/dir && git commit ../path" ought to record the changes to
the file "sub/path", but this regressed long time ago.

* bw/commit-partial-from-subdirectory-fix:
  commit: allow partial commits with relative paths
2018-04-25 13:28:53 +09:00
Junio C Hamano
ff6eb825f0 Merge branch 'jk/relative-directory-fix'
Some codepaths, including the refs API, get and keep relative
paths, that go out of sync when the process does chdir(2).  The
chdir-notify API is introduced to let these codepaths adjust these
cached paths to the new current directory.

* jk/relative-directory-fix:
  refs: use chdir_notify to update cached relative paths
  set_work_tree: use chdir_notify
  add chdir-notify API
  trace.c: export trace_setup_key
  set_git_dir: die when setenv() fails
2018-04-25 13:28:52 +09:00
Junio C Hamano
5d8da91e70 Merge branch 'jk/flockfile-stdio'
Code clean-up.

* jk/flockfile-stdio:
  config: move flockfile() closer to unlocked functions
2018-04-25 13:28:52 +09:00
Junio C Hamano
850e925752 Merge branch 'pw/rebase-signoff'
"git rebase" has learned to honor "--signoff" option when using
backends other than "am" (but not "--preserve-merges").

* pw/rebase-signoff:
  rebase --keep-empty: always use interactive rebase
  rebase -p: error out if --signoff is given
  rebase: extend --signoff support
2018-04-25 13:28:51 +09:00
Junio C Hamano
d892beef52 Merge branch 'pw/rebase-keep-empty-fixes'
"git rebase --keep-empty" still removed an empty commit if the
other side contained an empty commit (due to the "does an
equivalent patch exist already?" check), which has been corrected.

* pw/rebase-keep-empty-fixes:
  rebase: respect --no-keep-empty
  rebase -i --keep-empty: don't prune empty commits
  rebase --root: stop assuming squash_onto is unset
2018-04-25 13:28:49 +09:00
Junio C Hamano
18a6a8571f Merge branch 'cb/git-gui-ttk-style'
"git gui" has been taught to work with old versions of tk (like
8.5.7) that do not support "ttk::style theme use" as a way to query
the current theme.

* cb/git-gui-ttk-style:
  git-gui: workaround ttk:style theme use
2018-04-25 13:28:49 +09:00
Junio C Hamano
b1218e46a6 Merge branch 'bp/git-gui-bind-kp-enter'
"git gui" performs commit upon CTRL/CMD+ENTER but the
CTRL/CMD+KP_ENTER (i.e. enter key on the numpad) did not have the
same key binding.  It now does.

* bp/git-gui-bind-kp-enter:
  git-gui: bind CTRL/CMD+numpad ENTER to do_commit
2018-04-25 13:28:48 +09:00
Junio C Hamano
8b09611475 Merge branch 'bb/git-gui-ssh-key-files'
"git gui" learned that "~/.ssh/id_ecdsa.pub" and
"~/.ssh/id_ed25519.pub" are also possible SSH key files.

* bb/git-gui-ssh-key-files:
  git-gui: search for all current SSH key types
2018-04-25 13:28:48 +09:00
Jonathan Nieder
64f982b8a7 Makefile: quote $INSTLIBDIR when passing it to sed
f6a0ad4b (Makefile: generate Perl header from template file,
2018-04-10) moved code for generating the 'use lib' lines at the top
of perl scripts from the $(SCRIPT_PERL_GEN) rule to a separate
GIT-PERL-HEADER rule.

This rule first populates INSTLIBDIR and then substitutes it into the
GIT-PERL-HEADER using sed:

	INSTLIBDIR=... something ...
	sed -e 's=@@INSTLIBDIR@@='$$INSTLIBDIR'=g' $< > $@

Because $INSTLIBDIR is not surrounded by double quotes, the shell
splits it at each space, causing errors if INSTLIBDIR contains an $IFS
character:

 sed: 1: "s=@@INSTLIBDIR@@=/usr/l ...": unescaped newline inside substitute pattern

Add back the missing double-quotes to make it work again.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-24 10:59:29 +09:00
Jonathan Nieder
90df2173f2 Makefile: remove unused @@PERLLIBDIR@@ substitution variable
Junio noticed that this variable is not quoted correctly when it is
passed to sed.  As a shell-quoted string, it should be inside
single-quotes like $(perllibdir_relative_SQ), not outside them like
$INSTLIBDIR.

In fact, this substitution variable is not used.  Simplify by removing
it.

Reported-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-24 10:58:18 +09:00
Christian Hesse
d8698987f3 Makefile: mark perllibdir as a .PHONY target
This target should be marked as .PHONY, just like other targets that
exist only for their side effects that do not create filesystem
entities with the same name.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-04-19 06:45:06 +09:00
Martin Ågren
4c57a4f8fe git-submodule.txt: quote usage in monospace, drop backslash
We tend to quote command line examples using `` to set them in a
monospace font. The immediate motivation for this patch is to get rid of
another instance of \--. As noted in the previous commits, \-- has a
tendency of rendering badly. Here, it renders ok (at least with
AsciiDoc 8.6.9 and Asciidoctor 1.5.4), but by getting rid of this
instance, we reduce the chances of \-- cropping up in places where it
matters more.

Signed-off-by: Martin Ågren <martin.agren@gmail.com>
2018-04-18 12:49:26 +09:00