Commit graph

50353 commits

Author SHA1 Message Date
Junio C Hamano 60f8b89518 Merge branch 'pw/add-p-single'
"git add -p" used to offer "/" (look for a matching hunk) as a
choice, even there was only one hunk, which has been corrected.
Also the single-key help is now given only for keys that are
enabled (e.g. help for '/' won't be shown when there is only one
hunk).

* pw/add-p-single:
  add -p: improve error messages
  add -p: only bind search key if there's more than one hunk
  add -p: only display help for active keys
2018-03-06 14:54:03 -08:00
Junio C Hamano 44f2f3f919 Merge branch 'sg/t6300-modernize'
Test update.

* sg/t6300-modernize:
  t6300-for-each-ref: fix "more than one quoting style" tests
2018-03-06 14:54:03 -08:00
Junio C Hamano f2fd27c6bf Merge branch 'sb/color-h-cleanup'
Devdoc update.

* sb/color-h-cleanup:
  color.h: document and modernize header
2018-03-06 14:54:03 -08:00
Junio C Hamano 9ca488c04b Merge branch 'nd/rebase-show-current-patch'
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
2018-03-06 14:54:02 -08:00
Junio C Hamano 2cd91ec197 Merge branch 'xz/send-email-batch-size'
"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
2018-03-06 14:54:02 -08:00
Junio C Hamano c1a7902f9a Merge branch 'ab/fetch-prune'
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
2018-03-06 14:54:01 -08:00
Junio C Hamano a4ae2e5a1c Merge branch 'sm/mv-dry-run-update'
Code clean-up.

* sm/mv-dry-run-update:
  mv: remove unneeded 'if (!show_only)'
  t7001: add test case for --dry-run
2018-03-06 14:54:00 -08:00
Junio C Hamano 05d290e1db Merge branch 'nm/tag-edit'
"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
2018-03-06 14:53:59 -08:00
Junio C Hamano 7e31236f65 Sixth batch for 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-28 13:39:24 -08:00
Junio C Hamano 69917e6439 Merge branch 'jk/push-options-via-transport-fix'
"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
2018-02-28 13:37:58 -08:00
Junio C Hamano 0996727879 Merge branch 'tz/do-not-clean-spec-file'
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
2018-02-28 13:37:58 -08:00
Junio C Hamano 2c20dc16ec Merge branch 'tg/worktree-create-tracking'
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
2018-02-28 13:37:57 -08:00
Junio C Hamano ba5f3fc467 Merge branch 'gs/test-unset-xdg-cache-home'
Test update.

* gs/test-unset-xdg-cache-home:
  test-lib.sh: unset XDG_CACHE_HOME
2018-02-28 13:37:56 -08:00
Junio C Hamano 177bd65cf8 Merge branch 'tk/apply-dev-null-verify-name-fix'
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
2018-02-28 13:37:55 -08:00
Junio C Hamano 7676b86ec2 Merge branch 'sb/status-doc-fix'
Docfix.

* sb/status-doc-fix:
  Documentation/git-status: clarify status table for porcelain mode
2018-02-28 13:37:54 -08:00
Junio C Hamano 619e5218cb Merge branch 'es/worktree-add-post-checkout-hook'
"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
2018-02-28 13:37:53 -08:00
Junio C Hamano c22c624a9d Merge branch 'nd/am-quit'
"git am" has learned the "--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
2018-02-28 13:37:52 -08:00
Junio C Hamano 2fc74f41c5 Fifth batch for 2.17
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2018-02-27 10:53:41 -08:00
Junio C Hamano bdcdad51d6 Sync with maint 2018-02-27 10:53:28 -08:00
Junio C Hamano 38e79b1fda Merge branch 'ys/bisect-object-id-missing-conversion-fix' into maint
Fix for a commented-out code to adjust it to a rather old API change.

* ys/bisect-object-id-missing-conversion-fix:
  bisect: debug: convert struct object to object_id
2018-02-27 10:43:55 -08:00
Junio C Hamano 14890e916f Merge branch 'sb/submodule-update-reset-fix' into maint
When resetting the working tree files recursively, the working tree
of submodules are now also reset to match.

* sb/submodule-update-reset-fix:
  submodule: submodule_move_head omits old argument in forced case
  unpack-trees: oneway_merge to update submodules
  t/lib-submodule-update.sh: fix test ignoring ignored files in submodules
  t/lib-submodule-update.sh: clarify test
2018-02-27 10:43:54 -08:00
Junio C Hamano c1ab3b8a44 Merge branch 'ab/commit-m-with-fixup' into maint
"git commit --fixup" did not allow "-m<message>" option to be used
at the same time; allow it to annotate resulting commit with more
text.

* ab/commit-m-with-fixup:
  commit: add support for --fixup <commit> -m"<extra message>"
  commit doc: document that -c, -C, -F and --fixup with -m error
2018-02-27 10:43:54 -08:00
Junio C Hamano 12accdc023 Merge branch 'nd/ita-wt-renames-in-status' into maint
"git status" after moving a path in the working tree (hence making
it appear "removed") and then adding with the -N option (hence
making that appear "added") detected it as a rename, but did not
report the  old and new pathnames correctly.

* nd/ita-wt-renames-in-status:
  wt-status.c: handle worktree renames
  wt-status.c: rename rename-related fields in wt_status_change_data
  wt-status.c: catch unhandled diff status codes
  wt-status.c: coding style fix
  Use DIFF_DETECT_RENAME for detect_rename assignments
  t2203: test status output with porcelain v2 format
2018-02-27 10:39:35 -08:00
Junio C Hamano f2fcbeb3bf Merge branch 'jt/binsearch-with-fanout'
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
2018-02-27 10:34:03 -08:00
Junio C Hamano 9dc254b7ad Merge branch 'rd/typofix'
Typofix.

* rd/typofix:
  Correct mispellings of ".gitmodule" to ".gitmodules"
  t/: correct obvious typo "detahced"
2018-02-27 10:34:03 -08:00
Junio C Hamano 34b65c65b5 Merge branch 'jk/test-hashmap-updates'
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
2018-02-27 10:34:02 -08:00
Junio C Hamano 5aebb3e0ef Merge branch 'jk/sq-dequote-on-bogus-input'
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
2018-02-27 10:34:02 -08:00
Junio C Hamano d7db100c18 Merge branch 'bp/fsmonitor'
Doc update for a recently added feature.

* bp/fsmonitor:
  fsmonitor: update documentation to remove reference to invalid config settings
2018-02-27 10:34:01 -08:00
Junio C Hamano a42d457dc4 Merge branch 'bc/doc-interpret-trailers-grammofix'
Docfix.

* bc/doc-interpret-trailers-grammofix:
  docs/interpret-trailers: fix agreement error
2018-02-27 10:34:00 -08:00
Junio C Hamano d4053966ea Merge branch 'as/ll-i18n'
Some messages in low level start-up codepath have been i18n-ized.

* as/ll-i18n:
  Mark messages for translations
2018-02-27 10:33:58 -08:00
Junio C Hamano e3eb405027 Merge branch 'sg/doc-test-must-fail-args'
Devdoc update.

* sg/doc-test-must-fail-args:
  t: document 'test_must_fail ok=<signal-name>'
2018-02-27 10:33:58 -08:00
Junio C Hamano 1ba6846a19 Merge branch 'sb/describe-blob'
"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
2018-02-27 10:33:57 -08:00
Junio C Hamano 796a788a1c Merge branch 'rs/check-ignore-multi'
"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
2018-02-27 10:33:56 -08:00
Junio C Hamano 14599b48c0 Merge branch 'rj/sparse-updates'
Devtool update.

* rj/sparse-updates:
  Makefile: suppress a sparse warning for pack-revindex.c
  config.mak.uname: remove SPARSE_FLAGS setting for cygwin
2018-02-27 10:33:55 -08:00
Junio C Hamano c260e13883 Merge branch 'jk/t0002-simplify'
Code cleanup.

* jk/t0002-simplify:
  t0002: simplify error checking
2018-02-27 10:33:55 -08:00
Junio C Hamano 2fb346c06a Merge branch 'js/packet-read-line-check-null'
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()
2018-02-27 10:33:55 -08:00
Junio C Hamano 8b49408421 Merge branch 'js/fix-merge-arg-quoting-in-rebase-p'
"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`.
2018-02-27 10:33:54 -08:00
Junio C Hamano ac0a57c0bd Merge branch 'jk/gettext-poison'
Test updates.

* jk/gettext-poison:
  git-sh-i18n: check GETTEXT_POISON before USE_GETTEXT_SCHEME
  t0205: drop redundant test
2018-02-27 10:33:54 -08:00
Junio C Hamano 2b0f6b1c18 Merge branch 'jk/doc-do-not-write-extern'
Devdoc update.

* jk/doc-do-not-write-extern:
  CodingGuidelines: mention "static" and "extern"
2018-02-27 10:33:53 -08:00
Junio C Hamano 2ac76d8d9d Merge branch 'bp/name-hash-dirname-fix'
"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()
2018-02-27 10:33:53 -08:00
Junio C Hamano ee9db32d42 Merge branch 'jc/blame-missing-path'
"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
2018-02-27 10:33:51 -08:00
Junio C Hamano c6e3ac0f69 Merge branch 'ab/untracked-cache-invalidation-docs'
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
2018-02-27 10:33:50 -08:00
Junio C Hamano cf44c1e0a2 Merge branch 'nd/fix-untracked-cache-invalidation'
Some bugs around "untracked cache" feature have been fixed.

* 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
2018-02-27 10:33:50 -08:00
Junio C Hamano e3a80781f5 Fourth batch for 2.17 2018-02-21 12:45:35 -08:00
Junio C Hamano 66023bbd78 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
2018-02-21 12:45:05 -08:00
Junio C Hamano 2f6128daab 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
2018-02-21 12:45:04 -08:00
Junio C Hamano c2bd43d66d 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)
2018-02-21 12:45:04 -08:00
Junio C Hamano e469e9c5c6 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
2018-02-21 12:45:04 -08:00
Jeff King 90dce21eb0 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>
2018-02-20 11:27:06 -08:00
Jeff King 6cdffd06d6 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>
2018-02-20 11:27:06 -08:00