]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
5 years agopack-check.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:07 +0000 (06:49 +0100)] 
pack-check.c: remove the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agonotes-cache.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:06 +0000 (06:49 +0100)] 
notes-cache.c: remove the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoline-log.c: remove the_repository reference
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:05 +0000 (06:49 +0100)] 
line-log.c: remove the_repository reference

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodiff-lib.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:04 +0000 (06:49 +0100)] 
diff-lib.c: remove the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agodelta-islands.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:03 +0000 (06:49 +0100)] 
delta-islands.c: remove the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocache-tree.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:02 +0000 (06:49 +0100)] 
cache-tree.c: remove the_repository references

This case is more interesting than other boring "remove the_repo"
commits because while we need access to the object database, we cannot
simply use r->index because unpack-trees.c can operate on a temporary
index, not $GIT_DIR/index. Ideally we should be able to pass an object
database to lookup_tree() but that ship has sailed.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agobundle.c: remove the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:01 +0000 (06:49 +0100)] 
bundle.c: remove the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agobranch.c: remove the_repository reference
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:49:00 +0000 (06:49 +0100)] 
branch.c: remove the_repository reference

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agobisect.c: remove the_repository reference
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:59 +0000 (06:48 +0100)] 
bisect.c: remove the_repository reference

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoblame.c: remove implicit dependency the_repository
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:58 +0000 (06:48 +0100)] 
blame.c: remove implicit dependency the_repository

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer.c: remove implicit dependency on the_repository
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:57 +0000 (06:48 +0100)] 
sequencer.c: remove implicit dependency on the_repository

Note that the_hash_algo stays, even if we can easily replace it with
repo->hash_algo. My reason is I still believe tying hash_algo to a
struct repository is a wrong move. But if I'm wrong, we can always go
for another round of conversion.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer.c: remove implicit dependency on the_index
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:56 +0000 (06:48 +0100)] 
sequencer.c: remove implicit dependency on the_index

Since we're going to pass 'struct repository *' around most of the
time instead of 'struct index_state *' because most sequencer.c
operations need more than just the index, the_repository is replaced
as well in the functions that now take 'struct repository
*'. the_repository is still present in this file, but total clean up
will be done later. It's not the main focus of this patch.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agotransport.c: remove implicit dependency on the_index
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:55 +0000 (06:48 +0100)] 
transport.c: remove implicit dependency on the_index

note, there's still another hidden dependency related to this: even
though we pass a repo to transport_push() we still use
is_bare_repository() which pretty much assumes the_repository (and
some other global state).

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agonotes-merge.c: remove implicit dependency the_repository
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:54 +0000 (06:48 +0100)] 
notes-merge.c: remove implicit dependency the_repository

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agonotes-merge.c: remove implicit dependency on the_index
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:53 +0000 (06:48 +0100)] 
notes-merge.c: remove implicit dependency on the_index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agolist-objects.c: reduce the_repository references
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:52 +0000 (06:48 +0100)] 
list-objects.c: reduce the_repository references

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agolist-objects-filter.c: remove implicit dependency on the_index
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:51 +0000 (06:48 +0100)] 
list-objects-filter.c: remove implicit dependency on the_index

While at there, since we have access to struct repository now,
eliminate the only the_repository reference in this file.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agowt-status.c: remove implicit dependency the_repository
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:50 +0000 (06:48 +0100)] 
wt-status.c: remove implicit dependency the_repository

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agowt-status.c: remove implicit dependency on the_index
Nguyễn Thái Ngọc Duy [Sat, 10 Nov 2018 05:48:49 +0000 (06:48 +0100)] 
wt-status.c: remove implicit dependency on the_index

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoNinth batch for 2.20
Junio C Hamano [Tue, 6 Nov 2018 06:51:23 +0000 (15:51 +0900)] 
Ninth batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'sg/test-verbose-log'
Junio C Hamano [Tue, 6 Nov 2018 06:50:23 +0000 (15:50 +0900)] 
Merge branch 'sg/test-verbose-log'

Our test scripts can now take the '-V' option as a synonym for the
'--verbose-log' option.

* sg/test-verbose-log:
  test-lib: introduce the '-V' short option for '--verbose-log'

5 years agoMerge branch 'rj/header-cleanup'
Junio C Hamano [Tue, 6 Nov 2018 06:50:23 +0000 (15:50 +0900)] 
Merge branch 'rj/header-cleanup'

Code cleanup.

* rj/header-cleanup:
  commit-reach.h: add missing declarations (hdr-check)
  ewok_rlw.h: add missing 'inline' to function definition
  fetch-object.h: add missing declaration (hdr-check)

5 years agoMerge branch 'ss/travis-ci-force-vm-mode'
Junio C Hamano [Tue, 6 Nov 2018 06:50:23 +0000 (15:50 +0900)] 
Merge branch 'ss/travis-ci-force-vm-mode'

The "container" mode of TravisCI is going away.  Our .travis.yml
file is getting prepared for the transition.

* ss/travis-ci-force-vm-mode:
  travis-ci: no longer use containers

5 years agoMerge branch 'sg/test-rebase-editor-fix'
Junio C Hamano [Tue, 6 Nov 2018 06:50:22 +0000 (15:50 +0900)] 
Merge branch 'sg/test-rebase-editor-fix'

* sg/test-rebase-editor-fix:
  t3404-rebase-interactive: test abbreviated commands

5 years agoMerge branch 'tb/char-may-be-unsigned'
Junio C Hamano [Tue, 6 Nov 2018 06:50:22 +0000 (15:50 +0900)] 
Merge branch 'tb/char-may-be-unsigned'

Build portability fix.

* tb/char-may-be-unsigned:
  path.c: char is not (always) signed

5 years agoMerge branch 'js/mingw-ns-filetime'
Junio C Hamano [Tue, 6 Nov 2018 06:50:21 +0000 (15:50 +0900)] 
Merge branch 'js/mingw-ns-filetime'

Windows port learned to use nano-second resolution file timestamps.

* js/mingw-ns-filetime:
  mingw: implement nanosecond-precision file times
  mingw: replace MSVCRT's fstat() with a Win32-based implementation
  mingw: factor out code to set stat() data

5 years agoMerge branch 'md/exclude-promisor-objects-fix'
Junio C Hamano [Tue, 6 Nov 2018 06:50:21 +0000 (15:50 +0900)] 
Merge branch 'md/exclude-promisor-objects-fix'

Operations on promisor objects make sense in the context of only a
small subset of the commands that internally use the revisions
machinery, but the "--exclude-promisor-objects" option were taken
and led to nonsense results by commands like "log", to which it
didn't make much sense.  This has been corrected.

* md/exclude-promisor-objects-fix:
  exclude-promisor-objects: declare when option is allowed
  Documentation/git-log.txt: do not show --exclude-promisor-objects

5 years agoMerge branch 'jw/send-email-no-auth'
Junio C Hamano [Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)] 
Merge branch 'jw/send-email-no-auth'

"git send-email" learned to disable SMTP authentication via the
"--smtp-auth=none" option, even when the smtp username is given
(which turns the authentication on by default).

* jw/send-email-no-auth:
  send-email: explicitly disable authentication

5 years agoMerge branch 'nd/submodule-unused-vars'
Junio C Hamano [Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)] 
Merge branch 'nd/submodule-unused-vars'

Code clean-up.

* nd/submodule-unused-vars:
  submodule.c: remove some of the_repository references

5 years agoMerge branch 'nd/unpack-trees-with-cache-tree'
Junio C Hamano [Tue, 6 Nov 2018 06:50:20 +0000 (15:50 +0900)] 
Merge branch 'nd/unpack-trees-with-cache-tree'

Trivial bugfix.

* nd/unpack-trees-with-cache-tree:
  read-cache: use of memory after it is freed

5 years agoMerge branch 'nd/completion-negation'
Junio C Hamano [Tue, 6 Nov 2018 06:50:19 +0000 (15:50 +0900)] 
Merge branch 'nd/completion-negation'

The command line completion machinery (in contrib/) has been
updated to allow the completion script to tweak the list of options
that are reported by the parse-options machinery correctly.

* nd/completion-negation:
  completion: fix __gitcomp_builtin no longer consider extra options

5 years agoMerge branch 'jt/upload-pack-v2-fix-shallow'
Junio C Hamano [Tue, 6 Nov 2018 06:50:19 +0000 (15:50 +0900)] 
Merge branch 'jt/upload-pack-v2-fix-shallow'

"git fetch" over protocol v2 into a shallow repository failed to
fetch full history behind a new tip of history that was diverged
before the cut-off point of the history that was previously fetched
shallowly.

* jt/upload-pack-v2-fix-shallow:
  upload-pack: clear flags before each v2 request
  upload-pack: make want_obj not global
  upload-pack: make have_obj not global

5 years agoMerge branch 'sb/submodule-url-to-absolute'
Junio C Hamano [Tue, 6 Nov 2018 06:50:19 +0000 (15:50 +0900)] 
Merge branch 'sb/submodule-url-to-absolute'

Some codepaths failed to form a proper URL when .gitmodules record
the URL to a submodule repository as relative to the repository of
superproject, which has been corrected.

* sb/submodule-url-to-absolute:
  submodule helper: convert relative URL to absolute URL if needed

5 years agoMerge branch 'js/shallow-and-fetch-prune'
Junio C Hamano [Tue, 6 Nov 2018 06:50:18 +0000 (15:50 +0900)] 
Merge branch 'js/shallow-and-fetch-prune'

"git repack" in a shallow clone did not correctly update the
shallow points in the repository, leading to a repository that
does not pass fsck.

* js/shallow-and-fetch-prune:
  repack -ad: prune the list of shallow commits
  shallow: offer to prune only non-existing entries
  repack: point out a bug handling stale shallow info

5 years agoMerge branch 'js/remote-archive-dwimfix'
Junio C Hamano [Tue, 6 Nov 2018 06:50:18 +0000 (15:50 +0900)] 
Merge branch 'js/remote-archive-dwimfix'

The logic to determine the archive type "git archive" uses did not
correctly kick in for "git archive --remote", which has been
corrected.

* js/remote-archive-dwimfix:
  archive: initialize archivers earlier

5 years agoMerge branch 'jc/http-curlver-warnings'
Junio C Hamano [Fri, 2 Nov 2018 15:53:59 +0000 (00:53 +0900)] 
Merge branch 'jc/http-curlver-warnings'

Warning message fix.

* jc/http-curlver-warnings:
  http: give curl version warnings consistently

5 years agoMerge branch 'js/mingw-http-ssl'
Junio C Hamano [Fri, 2 Nov 2018 15:53:58 +0000 (00:53 +0900)] 
Merge branch 'js/mingw-http-ssl'

On platforms with recent cURL library, http.sslBackend configuration
variable can be used to choose a different SSL backend at runtime.
The Windows port uses this mechanism to switch between OpenSSL and
Secure Channel while talking over the HTTPS protocol.

* js/mingw-http-ssl:
  http: when using Secure Channel, ignore sslCAInfo by default
  http: add support for disabling SSL revocation checks in cURL
  http: add support for selecting SSL backends at runtime

5 years agoMerge branch 'mg/gpg-fingerprint'
Junio C Hamano [Fri, 2 Nov 2018 15:53:58 +0000 (00:53 +0900)] 
Merge branch 'mg/gpg-fingerprint'

New "--pretty=format:" placeholders %GF and %GP that show the GPG
key fingerprints have been invented.

* mg/gpg-fingerprint:
  gpg-interface.c: obtain primary key fingerprint as well
  gpg-interface.c: support getting key fingerprint via %GF format
  gpg-interface.c: use flags to determine key/signer info presence

5 years agoMerge branch 'mg/gpg-parse-tighten'
Junio C Hamano [Fri, 2 Nov 2018 15:53:57 +0000 (00:53 +0900)] 
Merge branch 'mg/gpg-parse-tighten'

Detect and reject a signature block that has more than one GPG
signature.

* mg/gpg-parse-tighten:
  gpg-interface.c: detect and reject multiple signatures on commits

5 years agoMerge branch 'en/merge-cleanup-more'
Junio C Hamano [Fri, 2 Nov 2018 15:53:57 +0000 (00:53 +0900)] 
Merge branch 'en/merge-cleanup-more'

Further clean-up of merge-recursive machinery.

* en/merge-cleanup-more:
  merge-recursive: avoid showing conflicts with merge branch before HEAD
  merge-recursive: improve auto-merging messages with path collisions

5 years agoEighth batch for 2.20
Junio C Hamano [Thu, 1 Nov 2018 12:26:34 +0000 (21:26 +0900)] 
Eighth batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agorebase: apply cocci patch
Junio C Hamano [Thu, 1 Nov 2018 12:44:41 +0000 (21:44 +0900)] 
rebase: apply cocci patch

Favor oideq() over !oidcmp() when checking for equality.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/rebase-i-shortopt'
Junio C Hamano [Fri, 2 Nov 2018 02:04:59 +0000 (11:04 +0900)] 
Merge branch 'js/rebase-i-shortopt'

"git rebase -i" learned to take 'b' as the short form of 'break'
option in the todo list.

* js/rebase-i-shortopt:
  rebase -i: recognize short commands without arguments

5 years agoMerge branch 'js/rebase-i-break'
Junio C Hamano [Fri, 2 Nov 2018 02:04:58 +0000 (11:04 +0900)] 
Merge branch 'js/rebase-i-break'

"git rebase -i" learned a new insn, 'break', that the user can
insert in the to-do list.  Upon hitting it, the command returns
control back to the user.

* js/rebase-i-break:
  rebase -i: introduce the 'break' command
  rebase -i: clarify what happens on a failed `exec`

5 years agoMerge branch 'js/rebase-autostash-fix'
Junio C Hamano [Fri, 2 Nov 2018 02:04:58 +0000 (11:04 +0900)] 
Merge branch 'js/rebase-autostash-fix'

"git rebase" that has recently been rewritten in C had a few issues
in its "--autstash" feature, which have been corrected.

* js/rebase-autostash-fix:
  rebase --autostash: fix issue with dirty submodules
  rebase --autostash: demonstrate a problem with dirty submodules
  rebase (autostash): use an explicit OID to apply the stash
  rebase (autostash): store the full OID in <state-dir>/autostash
  rebase (autostash): avoid duplicate call to state_dir_path()

5 years agoMerge branch 'cb/printf-empty-format'
Junio C Hamano [Fri, 2 Nov 2018 02:04:57 +0000 (11:04 +0900)] 
Merge branch 'cb/printf-empty-format'

Build fix for a topic in flight.

* cb/printf-empty-format:
  sequencer: cleanup for gcc warning in non developer mode

5 years agoMerge branch 'jc/rebase-in-c-5-test-typofix'
Junio C Hamano [Fri, 2 Nov 2018 02:04:57 +0000 (11:04 +0900)] 
Merge branch 'jc/rebase-in-c-5-test-typofix'

Typofix.

* jc/rebase-in-c-5-test-typofix:
  rebase: fix typoes in error messages

5 years agoMerge branch 'pk/rebase-in-c-6-final'
Junio C Hamano [Fri, 2 Nov 2018 02:04:56 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c-6-final'

The final step of rewriting "rebase -i" in C.

* pk/rebase-in-c-6-final:
  rebase: default to using the builtin rebase

5 years agoMerge branch 'js/rebase-in-c-5.5-work-with-rebase-i-in-c'
Junio C Hamano [Fri, 2 Nov 2018 02:04:56 +0000 (11:04 +0900)] 
Merge branch 'js/rebase-in-c-5.5-work-with-rebase-i-in-c'

"rebase" that has been rewritten learns the new calling convention
used by "rebase -i" that was rewritten in C, tying the loose end
between two GSoC topics that stomped on each other's toes.

* js/rebase-in-c-5.5-work-with-rebase-i-in-c:
  builtin rebase: prepare for builtin rebase -i

5 years agoMerge branch 'pk/rebase-in-c-5-test'
Junio C Hamano [Fri, 2 Nov 2018 02:04:55 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c-5-test'

Rewrite "git rebase" in C.

* pk/rebase-in-c-5-test:
  builtin rebase: error out on incompatible option/mode combinations
  builtin rebase: use no-op editor when interactive is "implied"
  builtin rebase: show progress when connected to a terminal
  builtin rebase: fast-forward to onto if it is a proper descendant
  builtin rebase: optionally pass custom reflogs to reset_head()
  builtin rebase: optionally auto-detect the upstream

5 years agoMerge branch 'pk/rebase-in-c-4-opts'
Junio C Hamano [Fri, 2 Nov 2018 02:04:55 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c-4-opts'

Rewrite "git rebase" in C.

* pk/rebase-in-c-4-opts:
  builtin rebase: support --root
  builtin rebase: add support for custom merge strategies
  builtin rebase: support `fork-point` option
  merge-base --fork-point: extract libified function
  builtin rebase: support --rebase-merges[=[no-]rebase-cousins]
  builtin rebase: support `--allow-empty-message` option
  builtin rebase: support `--exec`
  builtin rebase: support `--autostash` option
  builtin rebase: support `-C` and `--whitespace=<type>`
  builtin rebase: support `--gpg-sign` option
  builtin rebase: support `--autosquash`
  builtin rebase: support `keep-empty` option
  builtin rebase: support `ignore-date` option
  builtin rebase: support `ignore-whitespace` option
  builtin rebase: support --committer-date-is-author-date
  builtin rebase: support --rerere-autoupdate
  builtin rebase: support --signoff
  builtin rebase: allow selecting the rebase "backend"

5 years agoMerge branch 'pk/rebase-in-c-3-acts'
Junio C Hamano [Fri, 2 Nov 2018 02:04:54 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c-3-acts'

Rewrite "git rebase" in C.

* pk/rebase-in-c-3-acts:
  builtin rebase: stop if `git am` is in progress
  builtin rebase: actions require a rebase in progress
  builtin rebase: support --edit-todo and --show-current-patch
  builtin rebase: support --quit
  builtin rebase: support --abort
  builtin rebase: support --skip
  builtin rebase: support --continue

5 years agoMerge branch 'pk/rebase-in-c-2-basic'
Junio C Hamano [Fri, 2 Nov 2018 02:04:53 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c-2-basic'

Rewrite "git rebase" in C.

* pk/rebase-in-c-2-basic:
  builtin rebase: support `git rebase <upstream> <switch-to>`
  builtin rebase: only store fully-qualified refs in `options.head_name`
  builtin rebase: start a new rebase only if none is in progress
  builtin rebase: support --force-rebase
  builtin rebase: try to fast forward when possible
  builtin rebase: require a clean worktree
  builtin rebase: support the `verbose` and `diffstat` options
  builtin rebase: support --quiet
  builtin rebase: handle the pre-rebase hook and --no-verify
  builtin rebase: support `git rebase --onto A...B`
  builtin rebase: support --onto

5 years agoMerge branch 'ag/rebase-i-in-c'
Junio C Hamano [Fri, 2 Nov 2018 02:04:53 +0000 (11:04 +0900)] 
Merge branch 'ag/rebase-i-in-c'

Rewrite of the remaining "rebase -i" machinery in C.

* ag/rebase-i-in-c:
  rebase -i: move rebase--helper modes to rebase--interactive
  rebase -i: remove git-rebase--interactive.sh
  rebase--interactive2: rewrite the submodes of interactive rebase in C
  rebase -i: implement the main part of interactive rebase as a builtin
  rebase -i: rewrite init_basic_state() in C
  rebase -i: rewrite write_basic_state() in C
  rebase -i: rewrite the rest of init_revisions_and_shortrevisions() in C
  rebase -i: implement the logic to initialize $revisions in C
  rebase -i: remove unused modes and functions
  rebase -i: rewrite complete_action() in C
  t3404: todo list with commented-out commands only aborts
  sequencer: change the way skip_unnecessary_picks() returns its result
  sequencer: refactor append_todo_help() to write its message to a buffer
  rebase -i: rewrite checkout_onto() in C
  rebase -i: rewrite setup_reflog_action() in C
  sequencer: add a new function to silence a command, except if it fails
  rebase -i: rewrite the edit-todo functionality in C
  editor: add a function to launch the sequence editor
  rebase -i: rewrite append_todo_help() in C
  sequencer: make three functions and an enum from sequencer.c public

5 years agoMerge branch 'pk/rebase-in-c'
Junio C Hamano [Fri, 2 Nov 2018 02:04:52 +0000 (11:04 +0900)] 
Merge branch 'pk/rebase-in-c'

Rewrite of the "rebase" machinery in C.

* pk/rebase-in-c:
  builtin/rebase: support running "git rebase <upstream>"
  rebase: refactor common shell functions into their own file
  rebase: start implementing it as a builtin

5 years agoSeventh batch for 2.20
Junio C Hamano [Tue, 30 Oct 2018 06:44:45 +0000 (15:44 +0900)] 
Seventh batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'jk/uploadpack-packobjectshook-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:50 +0000 (15:43 +0900)] 
Merge branch 'jk/uploadpack-packobjectshook-fix'

Code clean-up that results in a small bugfix.

* jk/uploadpack-packobjectshook-fix:
  upload-pack: fix broken if/else chain in config callback

5 years agoMerge branch 'uk/merge-subtree-doc-update'
Junio C Hamano [Tue, 30 Oct 2018 06:43:49 +0000 (15:43 +0900)] 
Merge branch 'uk/merge-subtree-doc-update'

Belated documentation update to adjust to a new world order that
happened a yew years ago.

* uk/merge-subtree-doc-update:
  howto/using-merge-subtree: mention --allow-unrelated-histories

5 years agoMerge branch 'cb/compat-mmap-is-private-read-only'
Junio C Hamano [Tue, 30 Oct 2018 06:43:49 +0000 (15:43 +0900)] 
Merge branch 'cb/compat-mmap-is-private-read-only'

Code tightening.

* cb/compat-mmap-is-private-read-only:
  compat: make sure git_mmap is not expected to write

5 years agoMerge branch 'dl/mergetool-gui-option'
Junio C Hamano [Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)] 
Merge branch 'dl/mergetool-gui-option'

"git mergetool" learned to take the "--[no-]gui" option, just like
"git difftool" does.

* dl/mergetool-gui-option:
  doc: document diff/merge.guitool config keys
  completion: support `git mergetool --[no-]gui`
  mergetool: accept -g/--[no-]gui as arguments

5 years agoMerge branch 'js/mingw-load-sys-dll'
Junio C Hamano [Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)] 
Merge branch 'js/mingw-load-sys-dll'

The way DLLs are loaded on the Windows port has been improved.

* js/mingw-load-sys-dll:
  mingw: load system libraries the recommended way

5 years agoMerge branch 'js/mingw-getcwd'
Junio C Hamano [Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)] 
Merge branch 'js/mingw-getcwd'

The way the Windows port figures out the current directory has been
improved.

* js/mingw-getcwd:
  mingw: fix getcwd when the parent directory cannot be queried
  mingw: ensure `getcwd()` reports the correct case

5 years agoMerge branch 'cb/khash-maybe-unused-function'
Junio C Hamano [Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)] 
Merge branch 'cb/khash-maybe-unused-function'

Build fix.

* cb/khash-maybe-unused-function:
  khash: silence -Wunused-function for delta-islands
  commit-slabs: move MAYBE_UNUSED out

5 years agoMerge branch 'jc/cocci-preincr'
Junio C Hamano [Tue, 30 Oct 2018 06:43:48 +0000 (15:43 +0900)] 
Merge branch 'jc/cocci-preincr'

Code cleanup.

* jc/cocci-preincr:
  fsck: s/++i > 1/i++/
  cocci: simplify "if (++u > 1)" to "if (u++)"

5 years agoMerge branch 'ss/rename-tests'
Junio C Hamano [Tue, 30 Oct 2018 06:43:47 +0000 (15:43 +0900)] 
Merge branch 'ss/rename-tests'

Reorganize some tests and rename them; "ls t/" now gives a better
overview of what is tested for these scripts than before.

* ss/rename-tests:
  t7501: rename commit test to comply with naming convention
  t7500: rename commit tests script to comply with naming convention
  t7502: rename commit test script to comply with naming convention
  t7509: cleanup description and filename
  t2000: rename and combine checkout clash tests

5 years agoMerge branch 'ah/doc-updates'
Junio C Hamano [Tue, 30 Oct 2018 06:43:47 +0000 (15:43 +0900)] 
Merge branch 'ah/doc-updates'

Doc updates.

* ah/doc-updates:
  doc: fix formatting in git-update-ref
  doc: fix indentation of listing blocks in gitweb.conf.txt
  doc: fix descripion for 'git tag --format'
  doc: fix inappropriate monospace formatting
  doc: fix ASCII art tab spacing
  doc: clarify boundaries of 'git worktree list --porcelain'

5 years agoMerge branch 'ds/reachable'
Junio C Hamano [Tue, 30 Oct 2018 06:43:47 +0000 (15:43 +0900)] 
Merge branch 'ds/reachable'

Trivial bugfix.

* ds/reachable:
  commit-reach: fix cast in compare_commits_by_gen()

5 years agoMerge branch 'jc/receive-deny-current-branch-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:46 +0000 (15:43 +0900)] 
Merge branch 'jc/receive-deny-current-branch-fix'

The receive.denyCurrentBranch=updateInstead codepath kicked in even
when the push should have been rejected due to other reasons, such
as it does not fast-forward or the update-hook rejects it, which
has been corrected.

* jc/receive-deny-current-branch-fix:
  receive: denyCurrentBranch=updateinstead should not blindly update

5 years agoMerge branch 'ds/ci-commit-graph-and-midx'
Junio C Hamano [Tue, 30 Oct 2018 06:43:46 +0000 (15:43 +0900)] 
Merge branch 'ds/ci-commit-graph-and-midx'

One of our CI tests to run with "unusual/experimental/random"
settings now also uses commit-graph and midx.

* ds/ci-commit-graph-and-midx:
  ci: add optional test variables

5 years agoMerge branch 'jk/unused-function'
Junio C Hamano [Tue, 30 Oct 2018 06:43:46 +0000 (15:43 +0900)] 
Merge branch 'jk/unused-function'

Developer support.

* jk/unused-function:
  config.mak.dev: enable -Wunused-function

5 years agoMerge branch 'cb/remove-dead-init'
Junio C Hamano [Tue, 30 Oct 2018 06:43:45 +0000 (15:43 +0900)] 
Merge branch 'cb/remove-dead-init'

Code clean-up.

* cb/remove-dead-init:
  multi-pack-index: avoid dead store for struct progress
  unpack-trees: avoid dead store for struct progress

5 years agoMerge branch 'js/diff-notice-has-drive-prefix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:45 +0000 (15:43 +0900)] 
Merge branch 'js/diff-notice-has-drive-prefix'

Under certain circumstances, "git diff D:/a/b/c D:/a/b/d" on
Windows would strip initial parts from the paths because they
were not recognized as absolute, which has been corrected.

* js/diff-notice-has-drive-prefix:
  diff: don't attempt to strip prefix from absolute Windows paths

5 years agoMerge branch 'ot/ref-filter-plug-leaks'
Junio C Hamano [Tue, 30 Oct 2018 06:43:44 +0000 (15:43 +0900)] 
Merge branch 'ot/ref-filter-plug-leaks'

Plugging a handful of memory leaks in the ref-filter codepath.

* ot/ref-filter-plug-leaks:
  ref-filter: free item->value and item->value->s
  ls-remote: release memory instead of UNLEAK
  ref-filter: free memory from used_atom

5 years agoMerge branch 'ds/reachable-first-parent-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:44 +0000 (15:43 +0900)] 
Merge branch 'ds/reachable-first-parent-fix'

Correct performance regression in commit ancestry computation when
generation numbers are involved.

* ds/reachable-first-parent-fix:
  commit-reach: fix first-parent heuristic

5 years agoMerge branch 'rj/header-guards'
Junio C Hamano [Tue, 30 Oct 2018 06:43:44 +0000 (15:43 +0900)] 
Merge branch 'rj/header-guards'

Code clean-up.

* rj/header-guards:
  headers: normalize the spelling of some header guards

5 years agoMerge branch 'jk/test-tool-help'
Junio C Hamano [Tue, 30 Oct 2018 06:43:44 +0000 (15:43 +0900)] 
Merge branch 'jk/test-tool-help'

Developer support.

* jk/test-tool-help:
  test-tool: show tool list on error

5 years agoMerge branch 'sg/doc-show-branch-typofix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:44 +0000 (15:43 +0900)] 
Merge branch 'sg/doc-show-branch-typofix'

Docfix.

* sg/doc-show-branch-typofix:
  doc: fix small typo in git show-branch

5 years agoMerge branch 'sb/submodule-helper-remove-cruft'
Junio C Hamano [Tue, 30 Oct 2018 06:43:43 +0000 (15:43 +0900)] 
Merge branch 'sb/submodule-helper-remove-cruft'

Code clean-up.

* sb/submodule-helper-remove-cruft:
  builtin/submodule--helper: remove debugging leftover tracing

5 years agoMerge branch 'js/pack-objects-mutex-init-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:43 +0000 (15:43 +0900)] 
Merge branch 'js/pack-objects-mutex-init-fix'

A mutex used in "git pack-objects" were not correctly initialized
and this caused "git repack" to dump core on Windows.

* js/pack-objects-mutex-init-fix:
  pack-objects (mingw): initialize `packing_data` mutex in the correct spot
  pack-objects (mingw): demonstrate a segmentation fault with large deltas
  pack-objects: fix typo 'detla' -> 'delta'

5 years agoMerge branch 'tq/branch-style-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:43 +0000 (15:43 +0900)] 
Merge branch 'tq/branch-style-fix'

Code clean-up.

* tq/branch-style-fix:
  branch: trivial style fix

5 years agoMerge branch 'tq/branch-create-wo-branch-get'
Junio C Hamano [Tue, 30 Oct 2018 06:43:42 +0000 (15:43 +0900)] 
Merge branch 'tq/branch-create-wo-branch-get'

Code clean-up.

* tq/branch-create-wo-branch-get:
  builtin/branch.c: remove useless branch_get

5 years agoMerge branch 'bc/hash-transition-part-15'
Junio C Hamano [Tue, 30 Oct 2018 06:43:42 +0000 (15:43 +0900)] 
Merge branch 'bc/hash-transition-part-15'

More codepaths are moving away from hardcoded hash sizes.

* bc/hash-transition-part-15:
  rerere: convert to use the_hash_algo
  submodule: make zero-oid comparison hash function agnostic
  apply: rename new_sha1_prefix and old_sha1_prefix
  apply: replace hard-coded constants
  tag: express constant in terms of the_hash_algo
  transport: use parse_oid_hex instead of a constant
  upload-pack: express constants in terms of the_hash_algo
  refs/packed-backend: express constants using the_hash_algo
  packfile: express constants in terms of the_hash_algo
  pack-revindex: express constants in terms of the_hash_algo
  builtin/fetch-pack: remove constants with parse_oid_hex
  builtin/mktree: remove hard-coded constant
  builtin/repack: replace hard-coded constants
  pack-bitmap-write: use GIT_MAX_RAWSZ for allocation
  object_id.cocci: match only expressions of type 'struct object_id'

5 years agoMerge branch 'sb/strbuf-h-update'
Junio C Hamano [Tue, 30 Oct 2018 06:43:41 +0000 (15:43 +0900)] 
Merge branch 'sb/strbuf-h-update'

Code clean-up to serve as a BCP example.

* sb/strbuf-h-update:
  strbuf.h: format according to coding guidelines

5 years agoMerge branch 'jk/run-command-notdot'
Junio C Hamano [Tue, 30 Oct 2018 06:43:41 +0000 (15:43 +0900)] 
Merge branch 'jk/run-command-notdot'

The implementation of run_command() API on the UNIX platforms had a
bug that caused a command not on $PATH to be found in the current
directory.

* jk/run-command-notdot:
  run-command: mark path lookup errors with ENOENT

5 years agoMerge branch 'tb/filter-alternate-refs'
Junio C Hamano [Tue, 30 Oct 2018 06:43:41 +0000 (15:43 +0900)] 
Merge branch 'tb/filter-alternate-refs'

Test fix.

* tb/filter-alternate-refs:
  t5410: use longer path for sample script
  Documentation/config.txt: fix typo in core.alternateRefsCommand

5 years agoMerge branch 'rv/send-email-cc-misc-by'
Junio C Hamano [Tue, 30 Oct 2018 06:43:40 +0000 (15:43 +0900)] 
Merge branch 'rv/send-email-cc-misc-by'

"git send-email" learned to grab address-looking string on any
trailer whose name ends with "-by"; --suppress-cc=misc-by on the
command line, or setting sendemail.suppresscc configuration
variable to "misc-by", can be used to disable this behaviour.

This is a backward-incompatible change that may surprise existing
users.

* rv/send-email-cc-misc-by:
  send-email: also pick up cc addresses from -by trailers
  send-email: only consider lines containing @ or <> for automatic Cc'ing
  Documentation/git-send-email.txt: style fixes

5 years agoMerge branch 'lm/range-diff-submodule-fix'
Junio C Hamano [Tue, 30 Oct 2018 06:43:40 +0000 (15:43 +0900)] 
Merge branch 'lm/range-diff-submodule-fix'

"git range-diff" did not work well when the compared ranges had
changes in submodules and the "--submodule=log" was used.

* lm/range-diff-submodule-fix:
  range-diff: allow to diff files regardless of submodule config

5 years agoMerge branch 'ch/subtree-build'
Junio C Hamano [Tue, 30 Oct 2018 06:43:39 +0000 (15:43 +0900)] 
Merge branch 'ch/subtree-build'

Build update for "git subtree" (in contrib/) documentation pages.

* ch/subtree-build:
  Revert "subtree: make install targets depend on build targets"
  subtree: make install targets depend on build targets
  subtree: add build targets 'man' and 'html'

5 years agoMerge branch 'md/filter-trees'
Junio C Hamano [Tue, 30 Oct 2018 06:43:39 +0000 (15:43 +0900)] 
Merge branch 'md/filter-trees'

The "rev-list --filter" feature learned to exclude all trees via
"tree:0" filter.

* md/filter-trees:
  list-objects: support for skipping tree traversal
  filter-trees: code clean-up of tests
  list-objects-filter: implement filter tree:0
  list-objects-filter-options: do not over-strbuf_init
  list-objects-filter: use BUG rather than die
  revision: mark non-user-given objects instead
  rev-list: handle missing tree objects properly
  list-objects: always parse trees gently
  list-objects: refactor to process_tree_contents
  list-objects: store common func args in struct

5 years agotest-lib: introduce the '-V' short option for '--verbose-log'
SZEDER Gábor [Mon, 29 Oct 2018 12:13:59 +0000 (13:13 +0100)] 
test-lib: introduce the '-V' short option for '--verbose-log'

'--verbose-log' is one of the most useful and thus most frequently
used test options, but due to its length it's a pain to type on the
command line.

Let's introduce the corresponding short option '-V' to save some
keystrokes.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agocommit-reach.h: add missing declarations (hdr-check)
Ramsay Jones [Sat, 27 Oct 2018 01:53:57 +0000 (02:53 +0100)] 
commit-reach.h: add missing declarations (hdr-check)

Add the necessary #includes and forward declarations to allow the header
file to pass the 'hdr-check' target.

Note that, since this header includes the commit-slab implementation
header file (indirectly via commit-slab.h), some of the commit-slab
inline functions (e.g contains_cache_at_peek()) will not compile without
the complete type of 'struct commit'. Hence, we replace the forward
declaration of 'struct commit' with the an #include of the 'commit.h'
header file.

It is possible, using the 'commit-slab-{decl,impl}.h' files, to avoid
this inclusion of the 'commit.h' header. Commit a9f1f1f9f8 ("commit-slab.h:
code split", 2018-05-19) separated the commit-slab interface from its
implementation, to allow for the definition of a public commit-slab data
structure. This enabled us to avoid including the commit-slab implementation
in a header file, which could result in the replication of the commit-slab
functions in each compilation unit in which it was included.

Indeed, if you compile with optimizations disabled, then run this script:

  $ cat -n dup-static.sh
       1 #!/bin/sh
       2
       3 nm $1 | grep ' t ' | cut -d' ' -f3 | sort | uniq -c |
       4  sort -rn | grep -v '      1'
  $

  $ ./dup-static.sh git | grep contains
       24 init_contains_cache_with_stride
       24 init_contains_cache
       24 contains_cache_peek
       24 contains_cache_at_peek
       24 contains_cache_at
       24 clear_contains_cache
  $

you will find 24 copies of the commit-slab routines for the contains_cache.
Of course, when you enable optimizations again, these duplicate static
functions (mostly) disappear. Compiling with gcc at -O2, leaves two static
functions, thus:

  $ nm commit-reach.o | grep contains_cache
  0000000000000870 t contains_cache_at_peek.isra.1.constprop.6
  $ nm ref-filter.o | grep contains_cache
  00000000000002b0 t clear_contains_cache.isra.14
  $

However, using a shared 'contains_cache' would result in all six of the
above functions as external public functions in the git binary. At present,
only three of these functions are actually called, so the trade-off
seems to favour letting the compiler inline the commit-slab functions.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoewok_rlw.h: add missing 'inline' to function definition
Ramsay Jones [Sat, 27 Oct 2018 01:52:05 +0000 (02:52 +0100)] 
ewok_rlw.h: add missing 'inline' to function definition

The 'ewok_rlw.h' header file contains the rlw_get_run_bit() function
definition, which is marked as 'static' but not 'inline'. At least when
compiled by gcc, with the default -O2 optimization level, the function
is actually inlined and leaves no static version in the ewah_bitmap.o
and ewah_rlw.o object files. Despite this, add the missing 'inline'
keyword to better describe the intended behaviour.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agofetch-object.h: add missing declaration (hdr-check)
Ramsay Jones [Sat, 27 Oct 2018 01:50:02 +0000 (02:50 +0100)] 
fetch-object.h: add missing declaration (hdr-check)

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agot3404-rebase-interactive: test abbreviated commands
Johannes Sixt [Sat, 27 Oct 2018 08:08:01 +0000 (10:08 +0200)] 
t3404-rebase-interactive: test abbreviated commands

Make sure that each short command is tested at least once. To
not exacerbate the runtime of the test script, do not add new
tests, but modify existing ones according to these criteria:

- The test does not have a prerequisite.
- The 'git rebase' command is not guarded by test_must_fail.

The pick commands are optional in the FAKE_LINES variable, but
when used, they do end up in the insn sheet. Test them, too.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agosequencer: cleanup for gcc warning in non developer mode
Carlo Marcelo Arenas Belón [Thu, 25 Oct 2018 09:38:54 +0000 (02:38 -0700)] 
sequencer: cleanup for gcc warning in non developer mode

as shown by:

  sequencer.c: In function ‘write_basic_state’:
  sequencer.c:2392:37: warning: zero-length gnu_printf format string [-Wformat-zero-length]
     write_file(rebase_path_verbose(), "");

where write_file will create an empty file if told to write an empty string
as can be inferred by the previous call

the somehow more convoluted syntax works around the issue by providing a non
empty format string and is already being used for the abort safety file since
1e41229d96 ("sequencer: make sequencer abort safer", 2016-12-07)

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoSixth batch for 2.20
Junio C Hamano [Fri, 26 Oct 2018 05:53:16 +0000 (14:53 +0900)] 
Sixth batch for 2.20

Signed-off-by: Junio C Hamano <gitster@pobox.com>
5 years agoMerge branch 'js/mingw-default-ident'
Junio C Hamano [Fri, 26 Oct 2018 05:22:15 +0000 (14:22 +0900)] 
Merge branch 'js/mingw-default-ident'

The logic to select the default user name and e-mail on Windows has
been improved.

* js/mingw-default-ident:
  mingw: use domain information for default email
  getpwuid(mingw): provide a better default for the user name
  getpwuid(mingw): initialize the structure only once

5 years agoMerge branch 'ld/p4-unshelve'
Junio C Hamano [Fri, 26 Oct 2018 05:22:15 +0000 (14:22 +0900)] 
Merge branch 'ld/p4-unshelve'

"git p4 unshelve" improvements.

* ld/p4-unshelve:
  git-p4: fully support unshelving changelists
  git-p4: unshelve into refs/remotes/p4-unshelved, not refs/remotes/p4/unshelved
  git-p4: do not fail in verbose mode for missing 'fileSize' key

5 years agoMerge branch 'du/cherry-is-plumbing'
Junio C Hamano [Fri, 26 Oct 2018 05:22:14 +0000 (14:22 +0900)] 
Merge branch 'du/cherry-is-plumbing'

Doc update to mark "git cherry" as a plumbing command.

* du/cherry-is-plumbing:
  doc: move git-cherry to plumbing

5 years agoMerge branch 'ab/gc-doc-update'
Junio C Hamano [Fri, 26 Oct 2018 05:22:14 +0000 (14:22 +0900)] 
Merge branch 'ab/gc-doc-update'

The documentation of "git gc" has been updated to mention that it
is no longer limited to "pruning away crufts" but also updates
ancillary files like commit-graph as a part of repository
optimization.

* ab/gc-doc-update:
  gc doc: mention the commit-graph in the intro