Commit graph

55914 commits

Author SHA1 Message Date
Jeff King 0ebbcf70e6 object: convert lookup_unknown_object() to use object_id
There are no callers left of lookup_unknown_object() that aren't just
passing us the "hash" member of a "struct object_id". Let's take the
whole struct, which gets us closer to removing all raw sha1 variables.
It also matches the existing conversions of lookup_blob(), etc.

The conversions of callers were done by hand, but they're all mechanical
one-liners.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 10:06:19 -07:00
Jeff King 5e7ac68028 pack-objects: convert locate_object_entry_hash() to object_id
There are no callers of locate_object_entry_hash() that aren't just
passing us the "hash" member of a "struct object_id". Let's take the
whole struct, which gets us closer to removing all raw sha1 variables.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 10:03:32 -07:00
Jeff King 3df28caefb pack-objects: convert packlist_find() to use object_id
We take a raw hash pointer, but most of our callers have a "struct
object_id" already. Let's switch to taking the full struct, which will
let us continue removing uses of raw sha1 buffers.

There are two callers that do need special attention:

  - in rebuild_existing_bitmaps(), we need to switch to
    nth_packed_object_oid(). This incurs an extra hash copy over
    pointing straight to the mmap'd sha1, but it shouldn't be measurable
    compared to the rest of the operation.

  - in can_reuse_delta() we already spent the effort to copy the sha1
    into a "struct object_id", but now we just have to do so a little
    earlier in the function (we can't easily convert that function's
    callers because they may be pointing at mmap'd REF_DELTA blocks).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 09:54:58 -07:00
Jeff King 05805d7411 pack-bitmap-write: convert some helpers to use object_id
A few functions take raw hash pointers, but all of their callers
actually have a "struct object_id". Let's retain that extra type as long
as possible (which will let future patches extend that further, and so
on).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 09:33:09 -07:00
Jeff King 62b89d43e2 upload-pack: rename a "sha1" variable to "oid"
This variable is a "struct object_id", but uses the old-style name
"sha1". Let's call it oid to match more modern code (and make it clear
that it can handle any algorithm, since it uses parse_oid_hex()
properly).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 09:32:54 -07:00
Jeff King 6d79e5ecb3 describe: fix accidental oid/hash type-punning
The find_commit_name() function passes an object_id.hash as the key of a
hashmap. That ends up in commit_name_neq(), which then feeds it to
oideq(). Which means we should actually be the whole "struct object_id".

It works anyway because pointers to the two are interchangeable. And
because we're going through a layer of void pointers, the compiler
doesn't notice the type mismatch.

But it's worth cleaning up (especially since once we switch away from
sha1hash() on the same line, accessing the hash member will look doubly
out of place).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-20 09:23:53 -07:00
Junio C Hamano a6a95cd1b4 The second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-17 10:16:10 -07:00
Junio C Hamano 14f49b2058 Merge branch 'xl/record-partial-clone-origin'
When creating a partial clone, the object filtering criteria is
recorded for the origin of the clone, but this incorrectly used a
hardcoded name "origin" to name that remote; it has been corrected
to honor the "--origin <name>" option.

* xl/record-partial-clone-origin:
  clone: respect user supplied origin name when setting up partial clone
2019-06-17 10:15:20 -07:00
Junio C Hamano dedc046421 Merge branch 'pb/request-pull-verify-remote-ref'
"git request-pull" learned to warn when the ref we ask them to pull
from in the local repository and in the published repository are
different.

* pb/request-pull-verify-remote-ref:
  request-pull: warn if the remote object is not the same as the local one
  request-pull: quote regex metacharacters in local ref
2019-06-17 10:15:20 -07:00
Junio C Hamano add59c4708 Merge branch 'mm/p4-unshelve-windows-fix'
The command line to invoke a "git cat-file" command from inside
"git p4" was not properly quoted to protect a caret and running a
broken command on Windows, which has been corrected.

* mm/p4-unshelve-windows-fix:
  p4 unshelve: fix "Not a valid object name HEAD0" on Windows
2019-06-17 10:15:19 -07:00
Junio C Hamano d4fdeed006 Merge branch 'po/git-help-on-git-itself'
"git help git" was hard to discover (well, at least for some
people).

* po/git-help-on-git-itself:
  Doc: git.txt: remove backticks from link and add git-scm.com/docs
  git.c: show usage for accessing the git(1) help page
2019-06-17 10:15:19 -07:00
Junio C Hamano 55b34f30c2 Merge branch 'es/first-contrib-tutorial'
A new tutorial targetting specifically aspiring git-core
developers.

* es/first-contrib-tutorial:
  doc: add some nit fixes to MyFirstContribution
  documentation: add anchors to MyFirstContribution
  documentation: add tutorial for first contribution
2019-06-17 10:15:19 -07:00
Junio C Hamano 3dc47c4288 Merge branch 'bb/unicode-12.1-reiwa'
Update to Unicode 12.1 width table.

* bb/unicode-12.1-reiwa:
  unicode: update the width tables to Unicode 12.1
2019-06-17 10:15:18 -07:00
Junio C Hamano e7ef93ba7a Merge branch 'sw/git-p4-unshelve-branched-files'
"git p4" update.

* sw/git-p4-unshelve-branched-files:
  git-p4: allow unshelving of branched files
2019-06-17 10:15:18 -07:00
Junio C Hamano a3e6b426b9 Merge branch 'js/fsmonitor-unflake'
The data collected by fsmonitor was not properly written back to
the on-disk index file, breaking t7519 tests occasionally, which
has been corrected.

* js/fsmonitor-unflake:
  mark_fsmonitor_valid(): mark the index as changed if needed
  fill_stat_cache_info(): prepare for an fsmonitor fix
2019-06-17 10:15:18 -07:00
Junio C Hamano bdc81d15a2 Merge branch 'ds/topo-traversal-using-commit-graph'
Prepare use of reachability index in topological walker that works
on a range (A..B).

* ds/topo-traversal-using-commit-graph:
  revision: keep topo-walk free of unintersting commits
  revision: use generation for A..B --topo-order queries
2019-06-17 10:15:17 -07:00
Junio C Hamano 2f475317f2 Merge branch 'bl/userdiff-octave'
The pattern "git diff/grep" use to extract funcname and words
boundary for Matlab has been extend to cover Octave, which is more
or less equivalent.

* bl/userdiff-octave:
  userdiff: fix grammar and style issues
  userdiff: add Octave
2019-06-17 10:15:17 -07:00
Junio C Hamano 94760948f1 Merge branch 'ba/clone-remote-submodules'
"git clone --recurse-submodules" learned to set up the submodules
to ignore commit object names recorded in the superproject gitlink
and instead use the commits that happen to be at the tip of the
remote-tracking branches from the get-go, by passing the new
"--remote-submodules" option.

* ba/clone-remote-submodules:
  clone: add `--remote-submodules` flag
2019-06-17 10:15:17 -07:00
Junio C Hamano 6e0b1c60ad Merge branch 'vv/merge-squash-with-explicit-commit'
"git merge --squash" is designed to update the working tree and the
index without creating the commit, and this cannot be countermanded
by adding the "--commit" option; the command now refuses to work
when both options are given.

* vv/merge-squash-with-explicit-commit:
  merge: refuse --commit with --squash
2019-06-17 10:15:17 -07:00
Junio C Hamano 3a54d80ac8 Merge branch 'js/bundle-verify-require-object-store'
"git bundle verify" needs to see if prerequisite objects exist in
the receiving repository, but the command did not check if we are
in a repository upfront, which has been corrected.

* js/bundle-verify-require-object-store:
  bundle verify: error out if called without an object database
2019-06-17 10:15:16 -07:00
Junio C Hamano 5b476dc2f1 Merge branch 'js/bisect-helper-check-get-oid-return-value'
Code cleanup.

* js/bisect-helper-check-get-oid-return-value:
  bisect--helper: verify HEAD could be parsed before continuing
2019-06-17 10:15:16 -07:00
Junio C Hamano 9b3897ab06 Merge branch 'jk/am-i-resolved-fix'
"git am -i --resolved" segfaulted after trying to see a commit as
if it were a tree, which has been corrected.

* jk/am-i-resolved-fix:
  am: fix --interactive HEAD tree resolution
  am: drop tty requirement for --interactive
  am: read interactive input from stdin
  am: simplify prompt response handling
2019-06-17 10:15:15 -07:00
Junio C Hamano 86d87307c1 Merge branch 'jk/HEAD-symref-in-xfer-namespaces'
The server side support for "git fetch" used to show incorrect
value for the HEAD symbolic ref when the namespace feature is in
use, which has been corrected.

* jk/HEAD-symref-in-xfer-namespaces:
  upload-pack: strip namespace from symref data
2019-06-17 10:15:15 -07:00
Junio C Hamano 63b6b4b7e1 Merge branch 'ew/server-info-remove-crufts'
"git update-server-info" used to leave stale packfiles in its
output, which has been corrected.

* ew/server-info-remove-crufts:
  server-info: do not list unlinked packs
2019-06-17 10:15:15 -07:00
Junio C Hamano ac97dc4fa9 Merge branch 'es/grep-require-name-when-needed'
More parameter validation.

* es/grep-require-name-when-needed:
  grep: fail if call could output and name is null
2019-06-17 10:15:14 -07:00
Junio C Hamano 7df94cd1f6 Merge branch 'es/git-debugger-doc'
Doc update.

* es/git-debugger-doc:
  doc: hint about GIT_DEBUGGER in CodingGuidelines
2019-06-17 10:15:14 -07:00
Junio C Hamano 5d5c46b28c Merge branch 'ds/object-info-for-prefetch-fix'
Code cleanup and futureproof.

* ds/object-info-for-prefetch-fix:
  sha1-file: split OBJECT_INFO_FOR_PREFETCH
2019-06-17 10:15:14 -07:00
Junio C Hamano 0aae918dd9 The first batch after 2.22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-13 13:23:03 -07:00
Junio C Hamano c510261154 Merge branch 'pw/rebase-edit-message-for-replayed-merge'
A "merge -c" instruction during "git rebase --rebase-merges" should
give the user a chance to edit the log message, even when there is
otherwise no need to create a new merge and replace the existing
one (i.e. fast-forward instead), but did not.  Which has been
corrected.

* pw/rebase-edit-message-for-replayed-merge:
  rebase -r: always reword merge -c
2019-06-13 13:19:43 -07:00
Junio C Hamano 51d6c0f015 Merge branch 'ab/deprecate-R-for-dynpath'
The way of specifying the path to find dynamic libraries at runtime
has been simplified.  The old default to pass -R/path/to/dir has been
replaced with the new default to pass -Wl,-rpath,/path/to/dir,
which is the more recent GCC uses.  Those who need to build with an
old GCC can still use "CC_LD_DYNPATH=-R"

* ab/deprecate-R-for-dynpath:
  Makefile: remove the NO_R_TO_GCC_LINKER flag
2019-06-13 13:19:43 -07:00
Junio C Hamano 2a983b227d Merge branch 'mh/import-transport-fd-fix'
The ownership rule for the file descriptor to fast-import remote
backend was mixed up, leading to unrelated file descriptor getting
closed, which has been fixed.

* mh/import-transport-fd-fix:
  Use xmmap_gently instead of xmmap in use_pack
  dup() the input fd for fast-import used for remote helpers
2019-06-13 13:19:43 -07:00
Junio C Hamano 813a3a2ab7 Merge branch 'ew/update-server-info'
"git update-server-info" learned not to rewrite the file with the
same contents.

* ew/update-server-info:
  update-server-info: avoid needless overwrites
2019-06-13 13:19:42 -07:00
Junio C Hamano 8d32d2552e Merge branch 'jk/help-unknown-ref-fix'
Improve the code to show args with potential typo that cannot be
interpreted as a commit-ish.

* jk/help-unknown-ref-fix:
  help_unknown_ref(): check for refname ambiguity
  help_unknown_ref(): duplicate collected refnames
2019-06-13 13:19:42 -07:00
Junio C Hamano e91f65d0e2 Merge branch 'dl/format-patch-notes-config'
"git format-patch" learns a configuration to set the default for
its --notes=<ref> option.

* dl/format-patch-notes-config:
  format-patch: teach format.notes config option
  git-format-patch.txt: document --no-notes option
2019-06-13 13:19:42 -07:00
Junio C Hamano c4a38d161c Merge branch 'nd/merge-quit'
"git merge" learned "--quit" option that cleans up the in-progress
merge while leaving the working tree and the index still in a mess.

* nd/merge-quit:
  merge: add --quit
  merge: remove drop_save() in favor of remove_merge_branch_state()
2019-06-13 13:19:41 -07:00
Junio C Hamano 89d1b573d7 Merge branch 'ab/fail-prereqs-in-test'
Developer support to emulate unsatisfied prerequisites in tests to
ensure that the remainer of the tests still succeeds when tests
with prerequisites are skipped.

* ab/fail-prereqs-in-test:
  tests: add a special setup where prerequisites fail
2019-06-13 13:19:41 -07:00
Junio C Hamano 000bce0ee4 Merge branch 'nd/corrupt-worktrees'
"git worktree add" used to fail when another worktree connected to
the same repository was corrupt, which has been corrected.

* nd/corrupt-worktrees:
  worktree add: be tolerant of corrupt worktrees
2019-06-13 13:19:41 -07:00
Junio C Hamano ed7f8acbaa Merge branch 'js/rebase-cleanup'
Update supporting parts of "git rebase" to remove code that should
no longer be used.

* js/rebase-cleanup:
  rebase: fold git-rebase--common into the -p backend
  sequencer: the `am` and `rebase--interactive` scripts are gone
  .gitignore: there is no longer a built-in `git-rebase--interactive`
  t3400: stop referring to the scripted rebase
  Drop unused git-rebase--am.sh
2019-06-13 13:19:40 -07:00
Junio C Hamano 0d107b1989 Merge branch 'nd/worktree-name-sanitization'
In recent versions of Git, per-worktree refs are exposed in
refs/worktrees/<wtname>/ hierarchy, which means that worktree names
must be a valid refname component.  The code now sanitizes the names
given to worktrees, to make sure these refs are well-formed.

* nd/worktree-name-sanitization:
  worktree add: sanitize worktree names
2019-06-13 13:19:40 -07:00
Junio C Hamano 66dc7b68e4 Merge branch 'en/fast-export-encoding'
The "git fast-export/import" pair has been taught to handle commits
with log messages in encoding other than UTF-8 better.

* en/fast-export-encoding:
  fast-export: do automatic reencoding of commit messages only if requested
  fast-export: differentiate between explicitly UTF-8 and implicitly UTF-8
  fast-export: avoid stripping encoding header if we cannot reencode
  fast-import: support 'encoding' commit header
  t9350: fix encoding test to actually test reencoding
2019-06-13 13:19:40 -07:00
Junio C Hamano c0e78f7e46 Merge branch 'jk/unused-params-final-batch'
* jk/unused-params-final-batch:
  verify-commit: simplify parameters to run_gpg_verify()
  show-branch: drop unused parameter from show_independent()
  rev-list: drop unused void pointer from finish_commit()
  remove_all_fetch_refspecs(): drop unused "remote" parameter
  receive-pack: drop unused "commands" from prepare_shallow_update()
  pack-objects: drop unused rev_info parameters
  name-rev: drop unused parameters from is_better_name()
  mktree: drop unused length parameter
  wt-status: drop unused status parameter
  read-cache: drop unused parameter from threaded load
  clone: drop dest parameter from copy_alternates()
  submodule: drop unused prefix parameter from some functions
  builtin: consistently pass cmd_* prefix to parse_options
  cmd_{read,write}_tree: rename "unused" variable that is used
2019-06-13 13:19:34 -07:00
Junio C Hamano 8202d12fca Merge branch 'sb/format-patch-base-patch-id-fix'
The "--base" option of "format-patch" computed the patch-ids for
prerequisite patches in an unstable way, which has been updated to
compute in a way that is compatible with "git patch-id --stable".

* sb/format-patch-base-patch-id-fix:
  format-patch: make --base patch-id output stable
  format-patch: inform user that patch-id generation is unstable
2019-06-13 13:18:46 -07:00
Junio C Hamano cf3269fba8 Merge branch 'nd/init-relative-template-fix'
A relative pathname given to "git init --template=<path> <repo>"
ought to be relative to the directory "git init" gets invoked in,
but it instead was made relative to the repository, which has been
corrected.

* nd/init-relative-template-fix:
  init: make --template path relative to $CWD
2019-06-13 13:18:46 -07:00
Junio C Hamano 86d2271f06 Merge branch 'ab/send-email-transferencoding-fix'
Since "git send-email" learned to take 'auto' as the value for the
transfer-encoding, it by mistake stopped honoring the values given
to the configuration variables sendemail.transferencoding and/or
sendemail.<ident>.transferencoding.  This has been corrected to
(finally) redoing the order of setting the default, reading the
configuration and command line options.

* ab/send-email-transferencoding-fix:
  send-email: fix regression in sendemail.identity parsing
  send-email: document --no-[to|cc|bcc]
  send-email: fix broken transferEncoding tests
  send-email: remove cargo-culted multi-patch pattern in tests
  send-email: do defaults -> config -> getopt in that order
  send-email: rename the @bcclist variable for consistency
  send-email: move the read_config() function above getopts
2019-06-13 13:18:46 -07:00
Junio C Hamano b697d92f56 Git 2.22
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-06-07 09:39:21 -07:00
Junio C Hamano 6ee1eaca3e l10n-2.22.0-rnd3
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEET/4dIHc7EQTOoGRdx6TpG3VEeigFAlz6JwgZHHdvcmxkaGVs
 bG8ubmV0QGdtYWlsLmNvbQAKCRDHpOkbdUR6KJIiEACdMlFDsNNZ1bG5hpwLIRTN
 aK2y1L0sJDLvjjvXIR4VSjWHjazeIQqMCw+O3F90a2NAHHjGhHPTbHPgpiTnTeyd
 UUhCECHRVf3qFm+WvSsxFTbAwTeah4vKIe/X5kHuMNyxJNBXhvfCVjbFRKwktSGV
 +Oot5d5QR/cLsCJNrSyifwHS2AvXnSqR57p78oWNEmusnORYfZM5J/muRcbaxOhi
 FcFEBZAmpC1Kp+0QvTt4KGMjbbpzgWz5jm7NuyEhETNQPnXY9Uo6LppkSEZnRQwt
 rwzJkPKtGmFfwgey9YvTX6uXBQuugDPEIPL5pmRvOe4LNCTu1DKatpDg15HIBH+e
 JKtCjE4vDQCD22w9ARRkxJFiGUBhqyfiX/RJmNTeQyH7TQPP9cy5r6P4S2yNESDK
 yFe17J4GCBbe/L4fvqC0qPZxYI0lMV5n2oT21KTv5OwLK5b96EtsgDG53VEzrYsN
 zwUcpJYg/L5MlLX19UHZVNxay0ri7y2cdYMOhXYKN2/xuf/lbiweWOpODg5uzH8E
 ymoXc/Vu0k/ltVx9JqY1JFeNe9FDa2sf67n2XgiW/JZAGOwqnR0rt4dQ0iE9mDmn
 qqkWo/2xZymOZoV0IjruChAMYnB3jlpZbIGU9gUH/zurd1iu/seVfpK+VllcXS+p
 se6TLAwZkNybfy0eNsMGzw==
 =IHre
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po

l10n-2.22.0-rnd3

* tag 'l10n-2.22.0-rnd3' of git://github.com/git-l10n/git-po: (25 commits)
  l10n: fr.po: Review French translation
  l10n: de.po: Update German translation
  l10n: de.po: improve description of 'git reset --quiet'
  l10n: TEAMS: Change German translation team leader
  l10n: bg.po: Updated Bulgarian translation (4581t)
  l10n: zh_CN: Revision for git v2.22.0 l10n
  l10n: zh_CN: for git v2.22.0 l10n round 1~3
  l10n: es: 2.22.0 round 3
  l10n: it.po: Updated Italian translation
  l10n: fr v2.22.0 rnd 3
  l10n: vi.po(4581t): Updated Vietnamese translation for v2.22.0 round 3
  l10n: git.pot: v2.22.0 round 3 (3 new, 2 removed)
  l10n: es: 2.22.0 round 2
  l10n: bg.po: Updated Bulgarian translation (4580t)
  l10n: vi.po(4580t): Updated Vietnamese translation for v2.22.0 round 2
  l10n: fr.po v2.22.0 round 2
  l10n: git.pot: v2.22.0 round 2 (6 new, 3 removed)
  l10n: bg.po: Updated Bulgarian translation (4577t)
  l10n: es: 2.22.0 round 1
  l10n: vi.po(4577t): Updated Vietnamese translation for v2.22.0 round 1
  ...
2019-06-07 09:36:32 -07:00
Jiang Xin 0cdb8d2db2 Merge branch 'fr_review' of git://github.com/jnavila/git
* 'fr_review' of git://github.com/jnavila/git:
  l10n: fr.po: Review French translation
2019-06-07 16:51:09 +08:00
Jiang Xin d014920079 Merge branch 'master' of git://github.com/alshopov/git-po
* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4581t)
2019-06-07 16:50:23 +08:00
Cédric Malard 82eb147dbb l10n: fr.po: Review French translation
Signed-off-by: Cédric Malard <c.malard-git@valdun.net>
Signed-off-by: Jean-Noel Avila <jn.avila@free.fr>
2019-06-07 08:54:28 +02:00
Junio C Hamano 20fbf7dd42 Merge branch 'en/merge-directory-renames-fix'
Recent code restructuring of merge-recursive engine introduced a
regression dealing with rename/add conflict.

* en/merge-directory-renames-fix:
  merge-recursive: restore accidentally dropped setting of path
2019-06-06 14:03:36 -07:00