git
7 years agoMerge branch 'ma/config-page-only-in-list-mode' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:54 +0000 (13:27 -0800)] 
Merge branch 'ma/config-page-only-in-list-mode' into jch

In a way similar to how "git tag" learned to honor the pager
setting only in the list mode, "git config" learned to ignore the
pager setting when it is used for setting values (i.e. when the
purpose of the operation is not to "show").

* ma/config-page-only-in-list-mode:
  config: change default of `pager.config` to "on"
  config: respect `pager.config` in list/get-mode only
  t7006: add tests for how git config paginates

7 years agoMerge branch 'ot/ref-filter-cleanup' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:53 +0000 (13:27 -0800)] 
Merge branch 'ot/ref-filter-cleanup' into jch

* ot/ref-filter-cleanup:
  ref-filter: get rid of goto
  ref-filter: get rid of duplicate code

7 years agoMerge branch 'jc/allow-ff-merging-kept-tags' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:53 +0000 (13:27 -0800)] 
Merge branch 'jc/allow-ff-merging-kept-tags' into jch

Since Git 1.7.9, "git merge" defaulted to --no-ff (i.e. even when
the side branch being merged is a descendant of the current commit,
create a merge commit instead of fast-forwarding) when merging a
tag object.  This was appropriate default for integrators who pull
signed tags from their downstream contributors, but caused an
unnecessary merges when used by downstream contributors who
habitually "catch up" their topic branches with tagged releases
from the upstream.  Update "git merge" to default to --no-ff only
when merging a tag object that does *not* sit at its usual place in
refs/tags/ hierarchy, and allow fast-forwarding otherwise, to
mitigate the problem.

* jc/allow-ff-merging-kept-tags:
  merge: allow fast-forward when merging a tracked tag

7 years agoMerge branch 'ab/simplify-perl-makefile' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:52 +0000 (13:27 -0800)] 
Merge branch 'ab/simplify-perl-makefile' into jch

Hotfix for a topic already in 'master'.

* ab/simplify-perl-makefile:
  Makefile: generate Git(3pm) as dependency of the 'doc' and 'man' targets

7 years agoMerge branch 'ab/perl-fixes' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:52 +0000 (13:27 -0800)] 
Merge branch 'ab/perl-fixes' into jch

Only the first few of a series of several small patches.

* ab/perl-fixes:
  perl: move CPAN loader wrappers to another namespace
  perl: *.pm files should not have the executable bit

7 years agoMerge branch 'sg/t6300-modernize' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:51 +0000 (13:27 -0800)] 
Merge branch 'sg/t6300-modernize' into jch

Test update.

* sg/t6300-modernize:
  t6300-for-each-ref: fix "more than one quoting style" tests

7 years agoMerge branch 'sb/color-h-cleanup' into jch
Junio C Hamano [Fri, 23 Feb 2018 21:27:51 +0000 (13:27 -0800)] 
Merge branch 'sb/color-h-cleanup' into jch

Devdoc update.

* sb/color-h-cleanup:
  color.h: document and modernize header

7 years agoMerge branch 'ab/fetch-prune' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:47 +0000 (13:04 -0800)] 
Merge branch 'ab/fetch-prune' into jch

Clarify how configured fetch refspecs interact with the "--prune"
option of "git fetch", and also add a handy short-hand for getting
rid of stale tags that are locally held.

* ab/fetch-prune:
  fetch: make the --prune-tags work with <url>
  fetch: add a --prune-tags option and fetch.pruneTags config
  fetch tests: add scaffolding for the new fetch.pruneTags
  git-fetch & config doc: link to the new PRUNING section
  git remote doc: correct dangerous lies about what prune does
  git fetch doc: add a new section to explain the ins & outs of pruning
  fetch tests: fetch <url> <spec> as well as fetch [<remote>]
  fetch tests: expand case/esac for later change
  fetch tests: double quote a variable for interpolation
  fetch tests: test --prune and refspec interaction
  fetch tests: add a tag to be deleted to the pruning tests
  fetch tests: re-arrange arguments for future readability
  fetch tests: refactor in preparation for testing tag pruning
  remote: add a macro for "refs/tags/*:refs/tags/*"
  fetch: stop accessing "remote" variable indirectly
  fetch: trivially refactor assignment to ref_nr
  fetch: don't redundantly NULL something calloc() gave us

7 years agoMerge branch 'sm/mv-dry-run-update' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:46 +0000 (13:04 -0800)] 
Merge branch 'sm/mv-dry-run-update' into jch

Code clean-up.

* sm/mv-dry-run-update:
  mv: remove unneeded 'if (!show_only)'
  t7001: add test case for --dry-run

7 years agoMerge branch 'nd/parseopt-completion' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:45 +0000 (13:04 -0800)] 
Merge branch 'nd/parseopt-completion' into jch

Teach parse-options API an option to help the completion script,
and make use of the mechanism in command line completion.

* nd/parseopt-completion: (41 commits)
  completion: use __gitcomp_builtin in _git_worktree
  completion: use __gitcomp_builtin in _git_tag
  completion: use __gitcomp_builtin in _git_status
  completion: use __gitcomp_builtin in _git_show_branch
  completion: use __gitcomp_builtin in _git_rm
  completion: use __gitcomp_builtin in _git_revert
  completion: use __gitcomp_builtin in _git_reset
  completion: use __gitcomp_builtin in _git_replace
  remote: force completing --mirror= instead of --mirror
  completion: use __gitcomp_builtin in _git_remote
  completion: use __gitcomp_builtin in _git_push
  completion: use __gitcomp_builtin in _git_pull
  completion: use __gitcomp_builtin in _git_notes
  completion: use __gitcomp_builtin in _git_name_rev
  completion: use __gitcomp_builtin in _git_mv
  completion: use __gitcomp_builtin in _git_merge_base
  completion: use __gitcomp_builtin in _git_merge
  completion: use __gitcomp_builtin in _git_ls_remote
  completion: use __gitcomp_builtin in _git_ls_files
  completion: use __gitcomp_builtin in _git_init
  ...

7 years agoMerge branch 'nm/tag-edit' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:45 +0000 (13:04 -0800)] 
Merge branch 'nm/tag-edit' into jch

"git tag" learned an explicit "--edit" option that allows the
message given via "-m" and "-F" to be further edited.

* nm/tag-edit:
  tag: add --edit option

7 years agoMerge branch 'bp/untracked-cache-noflush' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:44 +0000 (13:04 -0800)] 
Merge branch 'bp/untracked-cache-noflush' into jch

Writing out the index file when the only thing that changed in it
is the untracked cache information is often wasteful, and this has
been optimized out.

* bp/untracked-cache-noflush:
  dir.c: don't flag the index as dirty for changes to the untracked cache

7 years agoMerge branch 'tg/worktree-add-existing-branch' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:44 +0000 (13:04 -0800)] 
Merge branch 'tg/worktree-add-existing-branch' into jch

"git worktree add" learned to check out an existing branch.

* tg/worktree-add-existing-branch:
  worktree: teach "add" to check out existing branches
  worktree: be clearer when "add" dwim-ery kicks in
  worktree: improve message when creating a new worktree

7 years agoMerge branch 'en/rename-directory-detection' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:43 +0000 (13:04 -0800)] 
Merge branch 'en/rename-directory-detection' into jch

Rename detection logic in "diff" family that is used in "merge" has
learned to guess when all of x/a, x/b and x/c have moved to z/a,
z/b and z/c, it is likely that x/d added in the meantime would also
want to move to z/d by taking the hint that the entire directory
'x' moved to 'z'.  A bug causing dirty files involved in a rename
to be overwritten during merge has also been fixed as part of this
work.

* en/rename-directory-detection: (29 commits)
  merge-recursive: ensure we write updates for directory-renamed file
  merge-recursive: avoid spurious rename/rename conflict from dir renames
  directory rename detection: new testcases showcasing a pair of bugs
  merge-recursive: fix remaining directory rename + dirty overwrite cases
  merge-recursive: fix overwriting dirty files involved in renames
  merge-recursive: avoid clobbering untracked files with directory renames
  merge-recursive: apply necessary modifications for directory renames
  merge-recursive: when comparing files, don't include trees
  merge-recursive: check for file level conflicts then get new name
  merge-recursive: add computation of collisions due to dir rename & merging
  merge-recursive: check for directory level conflicts
  merge-recursive: add get_directory_renames()
  merge-recursive: make a helper function for cleanup for handle_renames
  merge-recursive: split out code for determining diff_filepairs
  merge-recursive: make !o->detect_rename codepath more obvious
  merge-recursive: fix leaks of allocated renames and diff_filepairs
  merge-recursive: introduce new functions to handle rename logic
  merge-recursive: move the get_renames() function
  directory rename detection: tests for handling overwriting dirty files
  directory rename detection: tests for handling overwriting untracked files
  ...

7 years agoMerge branch 'nd/rebase-show-current-patch' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:43 +0000 (13:04 -0800)] 
Merge branch 'nd/rebase-show-current-patch' into jch

The new "--show-current-patch" option gives an end-user facing way
to get the diff being applied when "git rebase" (and "git am")
stops with a conflict.

* nd/rebase-show-current-patch:
  rebase: introduce and use pseudo-ref REBASE_HEAD
  rebase: add --show-current-patch
  am: add --show-current-patch

7 years agoMerge branch 'pc/submodule-helper-foreach' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)] 
Merge branch 'pc/submodule-helper-foreach' into jch

* pc/submodule-helper-foreach:
  submodule: port submodule subcommand 'foreach' from shell to C
  submodule foreach: document variable '$displaypath'
  submodule foreach: clarify the '$toplevel' variable documentation
  submodule foreach: document '$sm_path' instead of '$path'
  submodule foreach: correct '$path' in nested submodules from a subdirectory

7 years agoMerge branch 'nd/diff-stat-with-summary' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:42 +0000 (13:04 -0800)] 
Merge branch 'nd/diff-stat-with-summary' into jch

* nd/diff-stat-with-summary:
  diff: add --stat-with-summary
  diff.c: refactor pprint_rename() to use strbuf

7 years agoMerge branch 'bw/c-plus-plus' into jch
Junio C Hamano [Thu, 22 Feb 2018 21:04:41 +0000 (13:04 -0800)] 
Merge branch 'bw/c-plus-plus' into jch

Avoid using identifiers that clash with C++ keywords.  Even though
it is not a goal to compile Git with C++ compilers, changes like
this help use of code analysis tools that targets C++ on our
codebase.

* bw/c-plus-plus: (37 commits)
  replace: rename 'new' variables
  trailer: rename 'template' variables
  tempfile: rename 'template' variables
  wrapper: rename 'template' variables
  environment: rename 'namespace' variables
  diff: rename 'template' variables
  environment: rename 'template' variables
  init-db: rename 'template' variables
  unpack-trees: rename 'new' variables
  trailer: rename 'new' variables
  submodule: rename 'new' variables
  split-index: rename 'new' variables
  remote: rename 'new' variables
  ref-filter: rename 'new' variables
  read-cache: rename 'new' variables
  line-log: rename 'new' variables
  imap-send: rename 'new' variables
  http: rename 'new' variables
  entry: rename 'new' variables
  diffcore-delta: rename 'new' variables
  ...

7 years agoreplace: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:59 +0000 (10:59 -0800)] 
replace: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotrailer: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:58 +0000 (10:59 -0800)] 
trailer: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotempfile: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:57 +0000 (10:59 -0800)] 
tempfile: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agowrapper: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:56 +0000 (10:59 -0800)] 
wrapper: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoenvironment: rename 'namespace' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:55 +0000 (10:59 -0800)] 
environment: rename 'namespace' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiff: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:54 +0000 (10:59 -0800)] 
diff: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoenvironment: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:53 +0000 (10:59 -0800)] 
environment: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoinit-db: rename 'template' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:52 +0000 (10:59 -0800)] 
init-db: rename 'template' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agounpack-trees: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:51 +0000 (10:59 -0800)] 
unpack-trees: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agotrailer: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:50 +0000 (10:59 -0800)] 
trailer: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosubmodule: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:49 +0000 (10:59 -0800)] 
submodule: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agosplit-index: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:48 +0000 (10:59 -0800)] 
split-index: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoremote: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:47 +0000 (10:59 -0800)] 
remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoref-filter: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:46 +0000 (10:59 -0800)] 
ref-filter: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoread-cache: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:45 +0000 (10:59 -0800)] 
read-cache: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoline-log: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:44 +0000 (10:59 -0800)] 
line-log: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoimap-send: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:43 +0000 (10:59 -0800)] 
imap-send: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agohttp: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:42 +0000 (10:59 -0800)] 
http: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoentry: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:41 +0000 (10:59 -0800)] 
entry: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiffcore-delta: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:40 +0000 (10:59 -0800)] 
diffcore-delta: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiff: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:39 +0000 (10:59 -0800)] 
diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiff-lib: rename 'new' variable
Brandon Williams [Wed, 14 Feb 2018 18:59:38 +0000 (10:59 -0800)] 
diff-lib: rename 'new' variable

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocommit: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:37 +0000 (10:59 -0800)] 
commit: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocombine-diff: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:36 +0000 (10:59 -0800)] 
combine-diff: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoremote: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:35 +0000 (10:59 -0800)] 
remote: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoreflog: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:34 +0000 (10:59 -0800)] 
reflog: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agopack-redundant: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:33 +0000 (10:59 -0800)] 
pack-redundant: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agohelp: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:32 +0000 (10:59 -0800)] 
help: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agocheckout: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:31 +0000 (10:59 -0800)] 
checkout: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoapply: rename 'new' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:30 +0000 (10:59 -0800)] 
apply: rename 'new' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoapply: rename 'try' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:29 +0000 (10:59 -0800)] 
apply: rename 'try' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agodiff: rename 'this' variables
Brandon Williams [Wed, 14 Feb 2018 18:59:28 +0000 (10:59 -0800)] 
diff: rename 'this' variables

Rename C++ keyword in order to bring the codebase closer to being able
to be compiled with a C++ compiler.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoconfig: change default of `pager.config` to "on"
Martin Ã…gren [Wed, 21 Feb 2018 18:51:44 +0000 (19:51 +0100)] 
config: change default of `pager.config` to "on"

This is similar to ff1e72483 (tag: change default of `pager.tag` to
"on", 2017-08-02) and is safe now that we do not consider `pager.config`
at all when we are not listing or getting configuration. This change
will help with listing large configurations, but will not hurt users of
`git config --edit` as it would have before the previous commit.

Signed-off-by: Martin Ã…gren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoconfig: respect `pager.config` in list/get-mode only
Martin Ã…gren [Wed, 21 Feb 2018 18:51:43 +0000 (19:51 +0100)] 
config: respect `pager.config` in list/get-mode only

Similar to de121ffe5 (tag: respect `pager.tag` in list-mode only,
2017-08-02), use the DELAY_PAGER_CONFIG-mechanism to only respect
`pager.config` when we are listing or "get"ing config.

We have several getters and some are guaranteed to give at most one line
of output. Paging all getters including those could be convenient from a
documentation point-of-view. The downside would be that a misconfigured
or not so modern pager might wait for user interaction before
terminating. Let's instead respect the config for precisely those
getters which may produce more than one line of output.

`--get-urlmatch` may or may not produce multiple lines of output,
depending on the exact usage. Let's not try to recognize the two modes,
but instead make `--get-urlmatch` always respect the config. Analyzing
the detailed usage might be trivial enough here, but could establish a
precedent that we will never be able to enforce throughout the codebase
and that will just open a can of worms.

This fixes the failing test added in the previous commit. Also adapt the
test for whether `git config foo.bar bar` and `git config --get foo.bar`
respects `pager.config`.

Signed-off-by: Martin Ã…gren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot7006: add tests for how git config paginates
Martin Ã…gren [Wed, 21 Feb 2018 18:51:42 +0000 (19:51 +0100)] 
t7006: add tests for how git config paginates

The next couple of commits will change how `git config` handles
`pager.config`, similar to how de121ffe5 (tag: respect `pager.tag` in
list-mode only, 2017-08-02) and ff1e72483 (tag: change default of
`pager.tag` to "on", 2017-08-02) changed `git tag`. Similar work has
also been done to `git branch`.

Add tests in this area to make sure that we don't regress and so that
the upcoming commits can be made clearer by adapting the tests. Add
tests for simple config-setting, `--edit`, `--get`, `--get-urlmatch`,
`get-all`, and `--list`. Those represent a fair portion of the various
options that will be affected by the next two commits.

Use `test_expect_failure` to document that we currently respect the
pager-configuration with `--edit`. The current behavior is buggy since
the pager interferes with the editor and makes the end result completely
broken. See also b3ee740c8 (t7006: add tests for how git tag paginates,
2017-08-02).

The next commit will teach simple config-setting and `--get` to ignore
`pager.config`. Test the current behavior as "success", not "failure",
since the currently expected behavior according to documentation would
be to page. The next commit will change that expectation by updating the
documentation on `git config` and will redefine those successful tests.

Remove the test added in commit 3ba7e6e29a (config: run
setup_git_directory_gently() sooner, 2010-08-05) since it has some
overlap with these. We could leave it or tweak it, or place new tests
like these next to it, but let's instead make the tests for `git config`
as similar as possible to the ones for `git tag` and `git branch`, and
place them after those.

Signed-off-by: Martin Ã…gren <martin.agren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMerge branch 'bw/protocol-v2' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:52 +0000 (13:18 -0800)] 
Merge branch 'bw/protocol-v2' into jch

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: 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
  upload-pack: support shallow requests
  fetch-pack: perform a fetch using v2
  upload-pack: introduce fetch server command
  push: pass ref patterns when pushing
  fetch: pass ref patterns when fetching
  ls-remote: pass ref patterns when requesting a remote's refs
  transport: convert transport_get_remote_refs to take a list of ref patterns
  ...

7 years agoMerge branch 'nd/worktree-move' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)] 
Merge branch 'nd/worktree-move' into jch

"git worktree" learned move and remove subcommands.

* nd/worktree-move:
  worktree remove: allow it when $GIT_WORK_TREE is already gone
  worktree remove: new command
  worktree move: refuse to move worktrees with submodules
  worktree move: accept destination as directory
  worktree move: new command
  worktree.c: add update_worktree_location()
  worktree.c: add validate_worktree()

7 years agoMerge branch 'xz/send-email-batch-size' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:51 +0000 (13:18 -0800)] 
Merge branch 'xz/send-email-batch-size' into jch

"git send-email" learned to complain when the batch-size option is
not defined when the relogin-delay option is, since these two are
mutually required.

* xz/send-email-batch-size:
  send-email: error out when relogin delay is missing

7 years agoMerge branch 'cl/send-email-reply-to' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)] 
Merge branch 'cl/send-email-reply-to' into jch

"git send-email" learned "--reply-to=<address>" option.

* cl/send-email-reply-to:
  send-email: support separate "Reply-To" address
  send-email: rename variables for "In-reply-to" to $foo_in_reply_to

7 years agoMerge branch 'sg/travis-build-during-script-phase' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:50 +0000 (13:18 -0800)] 
Merge branch 'sg/travis-build-during-script-phase' into jch

So... what do we want to do with this thing?

* sg/travis-build-during-script-phase:
  travis-ci: build Git during the 'script' phase

7 years agoMerge branch 'jh/status-no-ahead-behind' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:49 +0000 (13:18 -0800)] 
Merge branch 'jh/status-no-ahead-behind' into jch

"git status" can spend a lot of cycles to compute the relation
between the current branch and its upstream, which can now be
disabled with "--no-ahead-behind" option.

At v5; is this ready for 'next'?

* jh/status-no-ahead-behind:
  status: support --no-ahead-behind in long format
  status: update short status to respect --no-ahead-behind
  status: add --[no-]ahead-behind to status and commit for V2 format.
  stat_tracking_info: return +1 when branches not equal

7 years agoMerge branch 'bw/doc-submodule-recurse-config-with-clone' into jch
Junio C Hamano [Wed, 21 Feb 2018 21:18:48 +0000 (13:18 -0800)] 
Merge branch 'bw/doc-submodule-recurse-config-with-clone' into jch

* bw/doc-submodule-recurse-config-with-clone:
  submodule: indicate that 'submodule.recurse' doesn't apply to clone

7 years ago### match next
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)] 
### match next

7 years agoMerge branch 'nd/am-quit' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:50 +0000 (12:46 -0800)] 
Merge branch 'nd/am-quit' into jch

"git am" has learned "--quit" option, in addition to the existing
"--abort" option; having the pair mirrors a few other commands like
"rebase" and "cherry-pick".

* nd/am-quit:
  am: support --quit

7 years agoMerge branch 'es/worktree-add-post-checkout-hook' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)] 
Merge branch 'es/worktree-add-post-checkout-hook' into jch

"git worktree add" learned to run the post-checkout hook, just like
"git clone" runs it upon the initial checkout.

* es/worktree-add-post-checkout-hook:
  worktree: add: fix 'post-checkout' not knowing new worktree location

7 years agoMerge branch 'sb/status-doc-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:49 +0000 (12:46 -0800)] 
Merge branch 'sb/status-doc-fix' into jch

Docfix.

* sb/status-doc-fix:
  Documentation/git-status: clarify status table for porcelain mode

7 years agoMerge branch 'tk/apply-dev-null-verify-name-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:48 +0000 (12:46 -0800)] 
Merge branch 'tk/apply-dev-null-verify-name-fix' into jch

Many places in "git apply" knew that "/dev/null" that signals
"there is no such file on this side of the diff" can be followed by
whitespace and garbage when parsing a patch, except for one, which
made an otherwise valid patch (e.g. ones from subversion) rejected.

* tk/apply-dev-null-verify-name-fix:
  apply: handle Subversion diffs with /dev/null gracefully
  apply: demonstrate a problem applying svn diffs

7 years agoMerge branch 'gs/test-unset-xdg-cache-home' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:47 +0000 (12:46 -0800)] 
Merge branch 'gs/test-unset-xdg-cache-home' into jch

* gs/test-unset-xdg-cache-home:
  test-lib.sh: unset XDG_CACHE_HOME

7 years agoMerge branch 'tg/worktree-create-tracking' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)] 
Merge branch 'tg/worktree-create-tracking' into jch

Hotfix for a recent topic.

* tg/worktree-create-tracking:
  git-worktree.txt: fix indentation of example and text of 'add' command
  git-worktree.txt: fix missing ")" typo

7 years agoMerge branch 'tz/do-not-clean-spec-file' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:45 +0000 (12:46 -0800)] 
Merge branch 'tz/do-not-clean-spec-file' into jch

We no longer create any *.spec file, so "make clean" should not
remove it.

* tz/do-not-clean-spec-file:
  Makefile: remove *.spec from clean target

7 years agoMerge branch 'jk/push-options-via-transport-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:44 +0000 (12:46 -0800)] 
Merge branch 'jk/push-options-via-transport-fix' into jch

"git push" over http transport did not unquote the push-options
correctly.

* jk/push-options-via-transport-fix:
  remote-curl: unquote incoming push-options
  t5545: factor out http repository setup

7 years agoMerge branch 'bp/fsmonitor' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:43 +0000 (12:46 -0800)] 
Merge branch 'bp/fsmonitor' into jch

Doc update for a recently added feature.

* bp/fsmonitor:
  fsmonitor: update documentation to remove reference to invalid config settings

7 years agoMerge branch 'jk/sq-dequote-on-bogus-input' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:42 +0000 (12:46 -0800)] 
Merge branch 'jk/sq-dequote-on-bogus-input' into jch

Code to unquote single-quoted string (used in the parser for
configuration files, etc.) did not diagnose bogus input correctly
and produced bogus results instead.

* jk/sq-dequote-on-bogus-input:
  sq_dequote: fix extra consumption of source string

7 years agoMerge branch 'jk/test-hashmap-updates' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'jk/test-hashmap-updates' into jch

Code clean-up.

* jk/test-hashmap-updates:
  test-hashmap: use "unsigned int" for hash storage
  test-hashmap: simplify alloc_test_entry
  test-hashmap: use strbuf_getline rather than fgets
  test-hashmap: use xsnprintf rather than snprintf
  test-hashmap: check allocation computation for overflow
  test-hashmap: use ALLOC_ARRAY rather than bare malloc

7 years agoMerge branch 'rd/typofix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'rd/typofix' into jch

Typofix.

* rd/typofix:
  Correct mispellings of ".gitmodule" to ".gitmodules"
  t/: correct obvious typo "detahced"

7 years agoMerge branch 'bc/doc-interpret-trailers-grammofix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:41 +0000 (12:46 -0800)] 
Merge branch 'bc/doc-interpret-trailers-grammofix' into jch

Docfix.

* bc/doc-interpret-trailers-grammofix:
  docs/interpret-trailers: fix agreement error

7 years agoMerge branch 'as/ll-i18n' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:40 +0000 (12:46 -0800)] 
Merge branch 'as/ll-i18n' into jch

Some messages in low level start-up codepath have been i18n-ized.

* as/ll-i18n:
  Mark messages for translations

7 years agoMerge branch 'sg/doc-test-must-fail-args' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:39 +0000 (12:46 -0800)] 
Merge branch 'sg/doc-test-must-fail-args' into jch

Devdoc update.

* sg/doc-test-must-fail-args:
  t: document 'test_must_fail ok=<signal-name>'

7 years agoMerge branch 'sb/describe-blob' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:38 +0000 (12:46 -0800)] 
Merge branch 'sb/describe-blob' into jch

"git describe $garbage" stopped giving any errors when the garbage
happens to be a string with 40 hexadecimal letters.

* sb/describe-blob:
  describe: confirm that blobs actually exist

7 years agoMerge branch 'rs/check-ignore-multi' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)] 
Merge branch 'rs/check-ignore-multi' into jch

"git check-ignore" with multiple paths got confused when one is a
file and the other is a directory, which has been fixed.

* rs/check-ignore-multi:
  check-ignore: fix mix of directories and other file types

7 years agoMerge branch 'rj/sparse-updates' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:37 +0000 (12:46 -0800)] 
Merge branch 'rj/sparse-updates' into jch

Devtool update.

* rj/sparse-updates:
  Makefile: suppress a sparse warning for pack-revindex.c
  config.mak.uname: remove SPARSE_FLAGS setting for cygwin

7 years agoMerge branch 'jk/t0002-simplify' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'jk/t0002-simplify' into jch

Code cleanup.

* jk/t0002-simplify:
  t0002: simplify error checking

7 years agoMerge branch 'ab/untracked-cache-invalidation-docs' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'ab/untracked-cache-invalidation-docs' into jch

Doc update to warn against remaining bugs in untracked cache.

* ab/untracked-cache-invalidation-docs:
  update-index doc: note the caveat with "could not open..."
  update-index doc: note a fixed bug in the untracked cache

7 years agoMerge branch 'js/packet-read-line-check-null' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:36 +0000 (12:46 -0800)] 
Merge branch 'js/packet-read-line-check-null' into jch

Some low level protocol codepath could crash when they get an
unexpected flush packet, which is now fixed.

* js/packet-read-line-check-null:
  always check for NULL return from packet_read_line()
  correct error messages for NULL packet_read_line()

7 years agoMerge branch 'js/fix-merge-arg-quoting-in-rebase-p' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'js/fix-merge-arg-quoting-in-rebase-p' into jch

"git rebase -p" mangled log messages of a merge commit, which is
now fixed.

* js/fix-merge-arg-quoting-in-rebase-p:
  rebase -p: fix incorrect commit message when calling `git merge`.

7 years agoMerge branch 'jk/gettext-poison' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'jk/gettext-poison' into jch

Test updates.

* jk/gettext-poison:
  git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME
  t0205: drop redundant test

7 years agoMerge branch 'jk/doc-do-not-write-extern' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:35 +0000 (12:46 -0800)] 
Merge branch 'jk/doc-do-not-write-extern' into jch

Devdoc update.

* jk/doc-do-not-write-extern:
  CodingGuidelines: mention "static" and "extern"

7 years agoMerge branch 'bp/name-hash-dirname-fix' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:34 +0000 (12:46 -0800)] 
Merge branch 'bp/name-hash-dirname-fix' into jch

"git add" files in the same directory, but spelling the directory
path in different cases on case insensitive filesystem, corrupted
the name hash data structure and led to unexpected results.  This
has been corrected.

* bp/name-hash-dirname-fix:
  name-hash: properly fold directory names in adjust_dirname_case()

7 years agoMerge branch 'jc/blame-missing-path' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)] 
Merge branch 'jc/blame-missing-path' into jch

"git blame HEAD COPYING" in a bare repository failed to run, while
"git blame HEAD -- COPYING" run just fine.  This has been corrected.

* jc/blame-missing-path:
  blame: tighten command line parser

7 years agoMerge branch 'nd/fix-untracked-cache-invalidation' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:33 +0000 (12:46 -0800)] 
Merge branch 'nd/fix-untracked-cache-invalidation' into jch

Some bugs around "untracked cache" feature have been fixed.

Seems to uncover bad untracked cache information a bit too loudly,
for which there is ab/untracked-cache-invalidation-docs topic.
cf. <87d11omi2o.fsf@evledraar.gmail.com>

* nd/fix-untracked-cache-invalidation:
  dir.c: ignore paths containing .git when invalidating untracked cache
  dir.c: stop ignoring opendir() error in open_cached_dir()
  dir.c: fix missing dir invalidation in untracked code
  dir.c: avoid stat() in valid_cached_dir()
  status: add a failing test showing a core.untrackedCache bug

7 years agoMerge branch 'jt/binsearch-with-fanout' into jch
Junio C Hamano [Wed, 21 Feb 2018 20:46:32 +0000 (12:46 -0800)] 
Merge branch 'jt/binsearch-with-fanout' into jch

Refactor the code to binary search starting from a fan-out table
(which is how the packfile is indexed with object names) into a
reusable helper.

* jt/binsearch-with-fanout:
  packfile: refactor hash search with fanout table
  packfile: remove GIT_DEBUG_LOOKUP log statements

7 years agoFourth batch for 2.17
Junio C Hamano [Wed, 21 Feb 2018 20:45:35 +0000 (12:45 -0800)] 
Fourth batch for 2.17

7 years agoMerge branch 'sg/test-i18ngrep'
Junio C Hamano [Wed, 21 Feb 2018 20:45:05 +0000 (12:45 -0800)] 
Merge branch 'sg/test-i18ngrep'

Test fixes.

* sg/test-i18ngrep:
  t: make 'test_i18ngrep' more informative on failure
  t: validate 'test_i18ngrep's parameters
  t: move 'test_i18ncmp' and 'test_i18ngrep' to 'test-lib-functions.sh'
  t5536: let 'test_i18ngrep' read the file without redirection
  t5510: consolidate 'grep' and 'test_i18ngrep' patterns
  t4001: don't run 'git status' upstream of a pipe
  t6022: don't run 'git merge' upstream of a pipe
  t5812: add 'test_i18ngrep's missing filename parameter
  t5541: add 'test_i18ngrep's missing filename parameter

7 years agoMerge branch 'gs/rebase-allow-empty-message'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'gs/rebase-allow-empty-message'

"git rebase" learned to take "--allow-empty-message" option.

* gs/rebase-allow-empty-message:
  rebase: add --allow-empty-message option

7 years agoMerge branch 'lw/daemon-log-destination'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'lw/daemon-log-destination'

The log from "git daemon" can be redirected with a new option; one
relevant use case is to send the log to standard error (instead of
syslog) when running it from inetd.

* lw/daemon-log-destination:
  daemon: add --log-destination=(stderr|syslog|none)

7 years agoMerge branch 'nd/format-patch-stat-width'
Junio C Hamano [Wed, 21 Feb 2018 20:45:04 +0000 (12:45 -0800)] 
Merge branch 'nd/format-patch-stat-width'

"git format-patch" learned to give 72-cols to diffstat, which is
consistent with other line length limits the subcommand uses for
its output meant for e-mails.

* nd/format-patch-stat-width:
  format-patch: reduce patch diffstat width to 72
  format-patch: keep cover-letter diffstat wrapped in 72 columns

7 years agosubmodule: indicate that 'submodule.recurse' doesn't apply to clone
Brandon Williams [Tue, 20 Feb 2018 20:29:22 +0000 (12:29 -0800)] 
submodule: indicate that 'submodule.recurse' doesn't apply to clone

Update the documentation for the 'submodule.recurse' config to identify
that the clone command does not respect it.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoref-filter: get rid of goto
Olga Telezhnaya [Wed, 21 Feb 2018 06:59:01 +0000 (06:59 +0000)] 
ref-filter: get rid of goto

Get rid of goto command in ref-filter for better readability.

Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoref-filter: get rid of duplicate code
Olga Telezhnaya [Wed, 21 Feb 2018 06:59:00 +0000 (06:59 +0000)] 
ref-filter: get rid of duplicate code

Make one function from 2 duplicate pieces and invoke it twice.

Signed-off-by: Olga Telezhnaia <olyatelezhnaya@gmail.com>
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoremote-curl: unquote incoming push-options
Jeff King [Mon, 19 Feb 2018 19:50:14 +0000 (14:50 -0500)] 
remote-curl: unquote incoming push-options

The transport-helper protocol c-style quotes the value of
any options passed to the helper via the "option <key> <value>"
directive. However, remote-curl doesn't actually unquote the
push-option values, meaning that we will send the quoted
version to the other side (whereas git-over-ssh would send
the raw value).

The pack-protocol.txt documentation defines the push-options
as a series of VCHARs, which excludes most characters that
would need quoting. But:

  1. You can still see the bug with a valid push-option that
     starts with a double-quote (since that triggers
     quoting).

  2. We do currently handle any non-NUL characters correctly
     in git-over-ssh. So even though the spec does not say
     that we need to handle most quoted characters, it's
     nice if our behavior is consistent between protocols.

There are two new tests: the "direct" one shows that this
already works in the non-http case, and the http one covers
this bugfix.

Reported-by: Jon Simons <jon@jonsimons.org>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agot5545: factor out http repository setup
Jeff King [Mon, 19 Feb 2018 19:48:44 +0000 (14:48 -0500)] 
t5545: factor out http repository setup

We repeat many lines of setup code in the two http tests,
and further tests would need to repeat it again.  Let's
factor this out into a function.

Incidentally, this also fixes an unlikely bug: if the httpd
root path contains a double-quote, our test_when_finished
would barf due to improper quoting (we escape the embedded
quotes, but not the $, meaning we expand the variable before
the eval).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
7 years agoMakefile: remove *.spec from clean target
Todd Zullinger [Sat, 17 Feb 2018 03:06:24 +0000 (22:06 -0500)] 
Makefile: remove *.spec from clean target

Support for generating an rpm was dropped in ab214331cf ("Makefile: stop
pretending to support rpmbuild", 2016-04-04).  We don't generate any
*.spec files so there is no need to clean them up.

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