Commit graph

45319 commits

Author SHA1 Message Date
Christian Couder 6cc1053375 update-index: warn in case of split-index incoherency
When users are using `git update-index --(no-)split-index`, they
may expect the split-index feature to be used or not according to
the option they just used, but this might not be the case if the
new "core.splitIndex" config variable has been set. In this case
let's warn about what will happen and why.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Christian Couder 4392531211 read-cache: add and then use tweak_split_index()
This will make us use the split-index feature or not depending
on the value of the "core.splitIndex" config variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Christian Couder cef4fc7ebe split-index: add {add,remove}_split_index() functions
Also use the functions in cmd_update_index() in
builtin/update-index.c.

These functions will be used in a following commit to tweak
our use of the split-index feature depending on the setting
of a configuration variable.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Christian Couder 1f44b09b58 config: add git_config_get_split_index()
This new function will be used in a following commit to know
if we want to use the split index feature or not.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Christian Couder 5662176313 t1700: change here document style
This improves test indentation by getting rid of the outdated
here document style.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Christian Couder f60ef2d65f config: mark an error message up for translation
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-03-01 13:24:21 -08:00
Junio C Hamano 1d1bdafd64 Third batch for 2.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-21 14:57:26 -08:00
Junio C Hamano ca21186b33 Merge branch 'jt/mailinfo-fold-in-body-headers'
Fix for NDEBUG builds.

* jt/mailinfo-fold-in-body-headers:
  mailinfo.c: move side-effects outside of assert
2016-12-21 14:55:03 -08:00
Junio C Hamano 49d45de1e7 Merge branch 'jk/index-pack-wo-repo-from-stdin'
"git index-pack --stdin" needs an access to an existing repository,
but "git index-pack file.pack" to generate an .idx file that
corresponds to a packfile does not.

* jk/index-pack-wo-repo-from-stdin:
  index-pack: skip collision check when not in repository
  t: use nongit() function where applicable
  index-pack: complain when --stdin is used outside of a repo
  t5000: extract nongit function to test-lib-functions.sh
2016-12-21 14:55:03 -08:00
Junio C Hamano 47021efd6f Merge branch 'jk/parseopt-usage-msg-opt'
The function usage_msg_opt() has been updated to say "fatal:"
before the custom message programs give, when they want to die
with a message about wrong command line options followed by the
standard usage string.

* jk/parseopt-usage-msg-opt:
  parse-options: print "fatal:" before usage_msg_opt()
2016-12-21 14:55:03 -08:00
Junio C Hamano fe05033407 Merge branch 'jk/quote-env-path-list-component'
A recent update to receive-pack to make it easier to drop garbage
objects made it clear that GIT_ALTERNATE_OBJECT_DIRECTORIES cannot
have a pathname with a colon in it (no surprise!), and this in turn
made it impossible to push into a repository at such a path.  This
has been fixed by introducing a quoting mechanism used when
appending such a path to the colon-separated list.

* jk/quote-env-path-list-component:
  t5615-alternate-env: double-quotes in file names do not work on Windows
  t5547-push-quarantine: run the path separator test on Windows, too
  tmp-objdir: quote paths we add to alternates
  alternates: accept double-quoted paths
2016-12-21 14:55:02 -08:00
Junio C Hamano 1123026f0b Merge branch 'vs/submodule-clone-nested-submodules-alternates'
"git clone --reference $there --recurse-submodules $super" has been
taught to guess repositories usable as references for submodules of
$super that are embedded in $there while making a clone of the
superproject borrow objects from $there; extend the mechanism to
also allow submodules of these submodules to borrow repositories
embedded in these clones of the submodules embedded in the clone of
the superproject.

* vs/submodule-clone-nested-submodules-alternates:
  submodule--helper: set alternateLocation for cloned submodules
2016-12-21 14:55:02 -08:00
Junio C Hamano 3c9979be9b Merge branch 'nd/shallow-fixup'
Code cleanup in shallow boundary computation.

* nd/shallow-fixup:
  shallow.c: remove useless code
  shallow.c: bit manipulation tweaks
  shallow.c: avoid theoretical pointer wrap-around
  shallow.c: make paint_alloc slightly more robust
  shallow.c: stop abusing COMMIT_SLAB_SIZE for paint_info's memory pools
  shallow.c: rename fields in paint_info to better express their purposes
2016-12-21 14:55:02 -08:00
Junio C Hamano 4fcc091198 Merge branch 'sb/sequencer-abort-safety'
Unlike "git am --abort", "git cherry-pick --abort" moved HEAD back
to where cherry-pick started while picking multiple changes, when
the cherry-pick stopped to ask for help from the user, and the user
did "git reset --hard" to a different commit in order to re-attempt
the operation.

* sb/sequencer-abort-safety:
  Revert "sequencer: remove useless get_dir() function"
  sequencer: remove useless get_dir() function
  sequencer: make sequencer abort safer
  t3510: test that cherry-pick --abort does not unsafely change HEAD
  am: change safe_to_abort()'s not rewinding error into a warning
  am: fix filename in safe_to_abort() error message
2016-12-21 14:55:01 -08:00
Johannes Sixt 5e74824fac t5615-alternate-env: double-quotes in file names do not work on Windows
Protect a recently added test case with !MINGW.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-21 14:01:19 -08:00
Kyle J. McKay 08414938a2 mailinfo.c: move side-effects outside of assert
Since 6b4b013f18 (mailinfo: handle in-body header continuations,
2016-09-20, v2.11.0) mailinfo.c has contained new code with an
assert of the form:

	assert(call_a_function(...))

The function in question, check_header, has side effects.  This
means that when NDEBUG is defined during a release build the
function call is omitted entirely, the side effects do not
take place and tests (fortunately) start failing.

Since the only time that mi->inbody_header_accum is appended to is
in check_inbody_header, and appending onto a blank
mi->inbody_header_accum always happens when is_inbody_header is
true, this guarantees a prefix that causes check_header to always
return true.

Therefore replace the assert with an if !check_header + DIE
combination to reflect this.

Helped-by: Jonathan Tan <jonathantanmy@google.com>
Helped-by: Jeff King <peff@peff.net>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-20 09:30:01 -08:00
Junio C Hamano 6610af872f Second batch for 2.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-19 14:50:31 -08:00
Junio C Hamano f0e0955a99 Merge branch 'kh/tutorial-grammofix'
* kh/tutorial-grammofix:
  doc: omit needless "for"
  doc: make the intent of sentence clearer
  doc: add verb in front of command to run
  doc: add articles (grammar)
2016-12-19 14:45:41 -08:00
Junio C Hamano a3c988727d Merge branch 'da/mergetool-xxdiff-hotkey'
The way to specify hotkeys to "xxdiff" that is used by "git
mergetool" has been modernized to match recent versions of xxdiff.

* da/mergetool-xxdiff-hotkey:
  mergetools: fix xxdiff hotkeys
2016-12-19 14:45:41 -08:00
Junio C Hamano b07c4e9b24 Merge branch 'lr/doc-fix-cet'
* lr/doc-fix-cet:
  date-formats.txt: Typo fix
2016-12-19 14:45:41 -08:00
Junio C Hamano 2d91cb7935 Merge branch 'sb/t3600-cleanup'
Code cleanup.

* sb/t3600-cleanup:
  t3600: slightly modernize style
  t3600: remove useless redirect
2016-12-19 14:45:40 -08:00
Junio C Hamano 2fb11ec6c1 Merge branch 'jc/pull-rebase-ff'
"git pull --rebase", when there is no new commits on our side since
we forked from the upstream, should be able to fast-forward without
invoking "git rebase", but it didn't.

* jc/pull-rebase-ff:
  pull: fast-forward "pull --rebase=true"
2016-12-19 14:45:38 -08:00
Junio C Hamano 101f3dc92a Merge branch 'ld/p4-worktree'
"git p4" didn't interact with the internal of .git directory
correctly in the modern "git-worktree"-enabled world.

* ld/p4-worktree:
  git-p4: support git worktrees
2016-12-19 14:45:37 -08:00
Junio C Hamano 09b4fdb5f3 Merge branch 'jk/make-tags-find-sources-tweak'
Update the procedure to generate "tags" for developer support.

* jk/make-tags-find-sources-tweak:
  Makefile: exclude contrib from FIND_SOURCE_FILES
  Makefile: match shell scripts in FIND_SOURCE_FILES
  Makefile: exclude test cruft from FIND_SOURCE_FILES
  Makefile: reformat FIND_SOURCE_FILES
2016-12-19 14:45:37 -08:00
Junio C Hamano 4833b7ec25 Merge branch 'js/normalize-path-copy-ceil'
A pathname that begins with "//" or "\\" on Windows is special but
path normalization logic was unaware of it.

* js/normalize-path-copy-ceil:
  normalize_path_copy(): fix pushing to //server/share/dir on Windows
2016-12-19 14:45:37 -08:00
Junio C Hamano 0cfdda3479 Merge branch 'bb/unicode-9.0'
The character width table has been updated to match Unicode 9.0

* bb/unicode-9.0:
  unicode_width.h: update the width tables to Unicode 9.0
  update_unicode.sh: remove the plane filter
  update_unicode.sh: automatically download newer definition files
  update_unicode.sh: pin the uniset repo to a known good commit
  update_unicode.sh: remove an unnecessary subshell level
  update_unicode.sh: move it into contrib/update-unicode
2016-12-19 14:45:36 -08:00
Junio C Hamano 3da9366eb0 Merge branch 'jk/readme-gmane-is-no-more'
* jk/readme-gmane-is-no-more:
  README: replace gmane link with public-inbox
2016-12-19 14:45:35 -08:00
Junio C Hamano 95713ff4fb Merge branch 'jc/lock-report-on-error'
Git 2.11 had a minor regression in "merge --ff-only" that competed
with another process that simultanously attempted to update the
index. We used to explain what went wrong with an error message,
but the new code silently failed.  The error message has been
resurrected.

* jc/lock-report-on-error:
  lockfile: LOCK_REPORT_ON_ERROR
  hold_locked_index(): align error handling with hold_lockfile_for_update()
  wt-status: implement opportunisitc index update correctly
2016-12-19 14:45:35 -08:00
Junio C Hamano 731490bf06 Merge branch 'jk/xdiff-drop-xdl-fast-hash'
Retire the "fast hash" that had disastrous performance issues in
some corner cases.

* jk/xdiff-drop-xdl-fast-hash:
  xdiff: drop XDL_FAST_HASH
2016-12-19 14:45:35 -08:00
Junio C Hamano 06cd5a1e01 Merge branch 'nd/rebase-forget'
"git rebase" learned "--quit" option, which allows a user to
remove the metadata left by an earlier "git rebase" that was
manually aborted without using "git rebase --abort".

* nd/rebase-forget:
  rebase: add --quit to cleanup rebase, leave everything else untouched
2016-12-19 14:45:35 -08:00
Junio C Hamano f008159fc2 Merge branch 'jk/trailers-placeholder-in-pretty'
In addition to %(subject), %(body), "log --pretty=format:..."
learned a new placeholder %(trailers).

* jk/trailers-placeholder-in-pretty:
  ref-filter: add support to display trailers as part of contents
  pretty: add %(trailers) format for displaying trailers of a commit message
2016-12-19 14:45:34 -08:00
Junio C Hamano 3aead1cad7 Merge branch 'ak/commit-only-allow-empty'
"git commit --allow-empty --only" (no pathspec) with dirty index
ought to be an acceptable way to create a new commit that does not
change any paths, but it was forbidden, perhaps because nobody
needed it so far.

* ak/commit-only-allow-empty:
  commit: remove 'Clever' message for --only --amend
  commit: make --only --allow-empty work without paths
2016-12-19 14:45:34 -08:00
Junio C Hamano afe0e2a391 Merge branch 'da/difftool-dir-diff-fix'
"git difftool --dir-diff" had a minor regression when started from
a subdirectory, which has been fixed.

* da/difftool-dir-diff-fix:
  difftool: fix dir-diff index creation when in a subdirectory
2016-12-19 14:45:33 -08:00
Junio C Hamano c89606fa90 Merge branch 'jb/diff-no-index-no-abbrev'
"git diff --no-index" did not take "--no-abbrev" option.

* jb/diff-no-index-no-abbrev:
  diff: handle --no-abbrev in no-index case
2016-12-19 14:45:33 -08:00
Junio C Hamano 0a45050a14 Merge branch 'rj/git-version-gen-do-not-force-abbrev'
A minor build update.

* rj/git-version-gen-do-not-force-abbrev:
  GIT-VERSION-GEN: do not force abbreviation length used by 'describe'
2016-12-19 14:45:33 -08:00
Junio C Hamano db09f21bbd Merge branch 'jk/stash-disable-renames-internally'
When diff.renames configuration is on (and with Git 2.9 and later,
it is enabled by default, which made it worse), "git stash"
misbehaved if a file is removed and another file with a very
similar content is added.

* jk/stash-disable-renames-internally:
  stash: prefer plumbing over git-diff
2016-12-19 14:45:33 -08:00
Junio C Hamano da72ee87fb Merge branch 'jk/http-walker-limit-redirect'
Update the error messages from the dumb-http client when it fails
to obtain loose objects; we used to give sensible error message
only upon 404 but we now forbid unexpected redirects that needs to
be reported with something sensible.

* jk/http-walker-limit-redirect:
  http-walker: complain about non-404 loose object errors
2016-12-19 14:45:32 -08:00
Junio C Hamano 8a2882f23e Merge branch 'jk/http-walker-limit-redirect-2.9'
Transport with dumb http can be fooled into following foreign URLs
that the end user does not intend to, especially with the server
side redirects and http-alternates mechanism, which can lead to
security issues.  Tighten the redirection and make it more obvious
to the end user when it happens.

* jk/http-walker-limit-redirect-2.9:
  http: treat http-alternates like redirects
  http: make redirects more obvious
  remote-curl: rename shadowed options variable
  http: always update the base URL for redirects
  http: simplify update_url_from_redirect
2016-12-19 14:45:32 -08:00
Junio C Hamano 73e494f862 Merge branch 'nd/for-each-ref-ignore-case'
"git branch --list" and friends learned "--ignore-case" option to
optionally sort branches and tags case insensitively.

* nd/for-each-ref-ignore-case:
  tag, branch, for-each-ref: add --ignore-case for sorting and filtering
2016-12-19 14:45:31 -08:00
Junio C Hamano 0f30315ba1 Merge branch 'sb/unpack-trees-grammofix'
* sb/unpack-trees-grammofix:
  unpack-trees: fix grammar for untracked files in directories
2016-12-19 14:45:31 -08:00
Junio C Hamano b08c812f99 Merge branch 'ls/travis-update-p4-and-lfs'
The default Travis-CI configuration specifies newer P4 and GitLFS.

* ls/travis-update-p4-and-lfs:
  travis-ci: update P4 to 16.2 and GitLFS to 1.5.2 in Linux build
2016-12-19 14:45:30 -08:00
Junio C Hamano 63d6a9c962 Merge branch 'ls/t0021-fixup'
* ls/t0021-fixup:
  t0021: minor filter process test cleanup
2016-12-19 14:45:30 -08:00
Junio C Hamano 02db2d0421 Merge branch 'ah/grammos'
A few messages have been fixed for their grammatical errors.

* ah/grammos:
  clone,fetch: explain the shallow-clone option a little more clearly
  receive-pack: improve English grammar of denyCurrentBranch message
  bisect: improve English grammar of not-ancestors message
2016-12-19 14:45:30 -08:00
Junio C Hamano 1749053d02 Merge branch 'jc/renormalize-merge-kill-safer-crlf'
Fix a corner case in merge-recursive regression that crept in
during 2.10 development cycle.

* jc/renormalize-merge-kill-safer-crlf:
  convert: git cherry-pick -Xrenormalize did not work
  merge-recursive: handle NULL in add_cacheinfo() correctly
  cherry-pick: demonstrate a segmentation fault
2016-12-19 14:45:30 -08:00
Junio C Hamano 8b0db484e1 Merge branch 'jt/use-trailer-api-in-commands'
Commands that operate on a log message and add lines to the trailer
blocks, such as "format-patch -s", "cherry-pick (-x|-s)", and
"commit -s", have been taught to use the logic of and share the
code with "git interpret-trailer".

* jt/use-trailer-api-in-commands:
  sequencer: use trailer's trailer layout
  trailer: have function to describe trailer layout
  trailer: avoid unnecessary splitting on lines
  commit: make ignore_non_trailer take buf/len
  trailer: be stricter in parsing separators
2016-12-19 14:45:29 -08:00
Junio C Hamano eff96d7e16 First batch for 2.12
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2016-12-16 15:30:13 -08:00
Junio C Hamano 2a72b69407 Merge branch 'ls/p4-retry-thrice'
* ls/p4-retry-thrice:
  git-p4: add config to retry p4 commands; retry 3 times by default
2016-12-16 15:27:50 -08:00
Junio C Hamano 796bd3bb2a Merge branch 'ls/p4-empty-file-on-lfs'
"git p4" LFS support was broken when LFS stores an empty blob.

* ls/p4-empty-file-on-lfs:
  git-p4: fix empty file processing for large file system backend GitLFS
2016-12-16 15:27:49 -08:00
Junio C Hamano 031b5a9ad3 Merge branch 'ld/p4-update-shelve'
* ld/p4-update-shelve:
  git-p4: support updating an existing shelved changelist
2016-12-16 15:27:49 -08:00
Junio C Hamano 97c138fe4e Merge branch 'vk/p4-submit-shelve'
* vk/p4-submit-shelve:
  git-p4: allow submit to create shelved changelists.
2016-12-16 15:27:49 -08:00