Commit Graph

56550 Commits

Author SHA1 Message Date
brian m. carlson
e0cb7cdb89 wt-status: convert struct wt_status to object_id
Change struct wt_status to use struct object_id instead of an array of
unsigned char.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:59 -07:00
brian m. carlson
8d4d86b0f0 cache: remove null_sha1
All of the existing uses of null_sha1 can be converted into uses of
null_oid, so do so.  Remove null_sha1 and is_null_sha1, and define
is_null_oid in terms of null_oid.  This also has the additional benefit
of removing several uses of sha1_to_hex.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:59 -07:00
brian m. carlson
f6ca67d673 builtin/worktree: switch null_sha1 to null_oid
Switch the remaining use of null_sha1 to null_oid.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:59 -07:00
brian m. carlson
dd336a5511 builtin/repack: write object IDs of the proper length
Use the_hash_algo when calling xwrite with a hex object ID so that the
proper amount of data is written.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
894c0f66bb pack-write: use hash_to_hex when writing checksums
Pack checksums always use the current hash algorithm in use, so switch
from sha1_to_hex to hash_to_hex.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
4439c7a360 sequencer: convert to use the_hash_algo
Convert several uses of GIT_SHA1_HEXSZ constants to be references to
the_hash_algo.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
95518faac1 bisect: switch to using the_hash_algo
Instead of using GIT_SHA1_HEXSZ, use the_hash_algo so that the code is
hash size independent.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
e84f3572bd sha1-lookup: switch hard-coded constants to the_hash_algo
Switch a hard-coded 18 to be a reference to the_hash_algo.  Rename the
sha1 parameter to be called hash instead.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
fe9fec45f6 config: use the_hash_algo in abbrev comparison
Switch one use of a hard-coded 40 constant to use the_hash_algo.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
976ff7e49d combine-diff: replace GIT_SHA1_HEXSZ with the_hash_algo
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
703d2d4193 bundle: switch to use the_hash_algo
Switch a use of the constant 40 and a use of GIT_SHA1_HEXSZ to use
the_hash_algo instead.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
9d958cc041 connected: switch GIT_SHA1_HEXSZ to the_hash_algo
Switch various uses of GIT_SHA1_HEXSZ to reference the_hash_algo
instead.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
7962e046ff show-index: switch hard-coded constants to the_hash_algo
show-index uses a variety of hard-coded constants to enumerate the
values in pack indices.  Switch these hard-coded constants to use
the_hash_algo or GIT_MAX_RAWSZ, as appropriate, and convert one instance
of an unsigned char array to struct object_id.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:58 -07:00
brian m. carlson
fee49308a1 blame: remove needless comparison with GIT_SHA1_HEXSZ
When faking a working tree commit, we read in lines from MERGE_HEAD into
a strbuf.  Because the strbuf is NUL-terminated and get_oid_hex will
fail if it unexpectedly encounters a NUL, the check for the length of
the line is unnecessary.  There is no optimization benefit from this
case, either, since on failure we call die.  Remove this check, since it
is no longer needed.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
7e0d029f18 builtin/rev-parse: switch to use the_hash_algo
Switch several hard-coded uses of the constant 40 to references to
the_hash_algo.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
319009642c builtin/blame: switch uses of GIT_SHA1_HEXSZ to the_hash_algo
Switch several uses of GIT_SHA1_HEXSZ to the_hash_algo.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
fabec2c5c3 builtin/receive-pack: switch to use the_hash_algo
The push cert code uses HMAC-SHA-1 to create a nonce.  This is a secure
use of SHA-1 which is not affected by its collision resistance (or lack
thereof).  However, it makes sense for us to use a better algorithm if
one is available, one which may even be more performant.  Futhermore,
until we have specialized functions for computing the hex value of an
arbitrary function, it simplifies the code greatly to use the same hash
algorithm everywhere.

Switch this code to use GIT_MAX_BLKSZ and the_hash_algo for computing
the push cert nonce, and rename the hmac_sha1 function to simply "hmac".

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
f6af19a9ad fetch-pack: use parse_oid_hex
Instead of hard-coding constants, use parse_oid_hex to compute a pointer
and use it in further parsing operations.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
36261e42ec patch-id: convert to use the_hash_algo
Convert the two separate patch-id implementations to use the_hash_algo
in their implementation.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
brian m. carlson
28ba1830d0 builtin/replace: make hash size independent
Instead of using GIT_SHA1_HEXSZ and hard-coded constants, switch to
using the_hash_algo.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-19 15:04:57 -07:00
Junio C Hamano
5fa0f5238b Git 2.23
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-16 10:28:23 -07:00
Junio C Hamano
8e0fa0e056 l10n-2.23.0-rnd2
-----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCgA3FiEET/4dIHc7EQTOoGRdx6TpG3VEeigFAl1WcV4ZHHdvcmxkaGVs
 bG8ubmV0QGdtYWlsLmNvbQAKCRDHpOkbdUR6KMXWD/99nW+vms2G0BfpWcCdBzmS
 e4TCLis53FgXX/1n2OAIMoBHg+6uLyzfA1eePOlzFUAJJD2L+vp0jRCDs6IFa5vd
 a+RwoRBJveQW9h1K713b+iyEuQaIsPV8xL8sDwDapli/mRy9uSXJW3hpd8ACpO2P
 BHLSQYzHxojb3/Orp5mwloZUvuGEfabLMiBMXCKzcCzULN3C/f/zpDse4C06hIDD
 bO5wwJcmiasBNPsEOvIs/rtUKBksAvmiFyj8DfSNhdP6rxOcp/+X0jDVekLr08i5
 Ou/5SDmKiTH5JCM385QYgYBw7OZlGcG6q8ETZ6wpmwuvVx/Eb/FcM03O/Q2k49K2
 WbaMhbnQZHG9TMsLMLLzcBGixsnrau5Hl5KQW5OuGtSEk0ZD8VNuRE1GHhGm/yve
 LFNBurL3S7MRj2W18aCXEQin7Wk3iuH72gcQ2WV836JkVHAyEzD6ewbzsfL895/i
 7PfnXOgh09P/WnjpfpZGTlUD5vFEfLo6OcfUCDhF2fooozqih83tccRGEuF5Kam4
 53MMVSDws7zvVC+cYpUAupMJvTswH76+qTX4nYRvCI9R/UFJ3hXukBElsRFbhTaO
 fyJCtO/EFfzhvShADElEP5MAy0gtQdGYLzqoCQLXIAmfzPn089OZbnx7IeCao2ig
 SwXvhx56kGvGhn/l0VMfrw==
 =kBji
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.23.0-rnd2' of git://github.com/git-l10n/git-po

l10n-2.23.0-rnd2
2019-08-16 10:22:51 -07:00
Jiang Xin
a6cd2cc485 l10n: zh_CN: for git v2.23.0 l10n round 1~2
Translate 128 new messages (4674t0f0u) for git 2.23.0.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-08-16 16:59:17 +08:00
Matthias Ruester
1f5ab2d1ae l10n: de.po: Update German translation
Signed-off-by: Matthias Rüster <matthias.ruester@gmail.com>
Reviewed-by: Ralf Thielow <ralf.thielow@gmail.com>
Reviewed-by: Phillip Szelat <phillip.szelat@gmail.com>
2019-08-12 18:48:08 +02:00
Jiang Xin
5900439e88 Merge branch 'master' of https://github.com/vnwildman/git
* 'master' of https://github.com/vnwildman/git:
  l10n: vi(4674t): Updated translation for Vietnamese
2019-08-12 16:04:28 +08:00
Jiang Xin
ba82e37314 Merge branch 'update-italian-translation' of github.com:AlessandroMenti/git-po
* 'update-italian-translation' of github.com:AlessandroMenti/git-po:
  l10n: it.po: update the Italian localization for v2.23.0 round 2
2019-08-12 16:02:08 +08:00
Jiang Xin
6c1a7dd97c Merge branch 'next' of https://github.com/ChrisADR/git-po
* 'next' of https://github.com/ChrisADR/git-po:
  l10n: es: 2.23.0 round 2
2019-08-12 16:00:14 +08:00
Junio C Hamano
ff66981f45 Git 2.22.1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAl1QkocACgkQsLXohpav
 5suehRAAzR2f8ypABrB4Q+od4Z7861axXNGQE789XrQxbW8RCpN7twqkMTXqomRC
 cvLld+CxinkWE1opafkqfjpmJWFVeQhdI+UI8EhWY1q1YIcTHsTcNAFRcISBvJoO
 HukU6nmo8ahpO/FR6re4Z9rvoJlaXfVqhrzYegoHqsZhH3msmlG9edSqIEP6CtG0
 jB3Hsv4dKxLEW66Oi3ETY6EL0y44iaX1criYarWjjF2BL3Mt0+pgFEy++qQZcgA4
 PD1lTKYGz4VTBIa8D5D0C0xj1vhnR2WbhSRl0PuXUzMna7EYwimx++kje3hfhIyG
 msSYC05ZmEr+tXZdOblV6IAA1EOXCqvIbOwqigUxfF2OE0+1D88AWWAiE7NLMi5L
 bH/cGDpzmU9Vz2sF4O3mMj0uAoH7Kjs3lwDf99OVn3PLcB1hLVkq9NJvE63vj9pG
 R63XO2GDmWonYfYaT5iowwlJih0bzX8ERS4jbqcNGf+FltXefIj9ncrKtuLirXUI
 1xlo6QWHESdvRmPVAGTCPZIJXeaXUw3iohRQqxkQEslcxYbQCvWyjG0sm3nIJ77I
 lIK51ybnHYqXj1ZRTDaAl2RTi9nq2/+i2r4vZfGlELgbfsQUAmE0EfYanhY0rj6e
 6UC1cP18FQ2pS4M5pzaGsXHloXlsabxc4XoMWrIEVvfPvIZnGhU=
 =xvH4
 -----END PGP SIGNATURE-----

Sync with Git 2.22.1
2019-08-11 17:41:39 -07:00
Mark Rushakoff
24966cd982 doc: fix repeated words
Inspired by 21416f0a07 ("restore: fix typo in docs", 2019-08-03), I ran
"git grep -E '(\b[a-zA-Z]+) \1\b' -- Documentation/" to find other cases
where words were duplicated, e.g. "the the", and in most cases removed
one of the repeated words.

There were many false positives by this grep command, including
deliberate repeated words like "really really" or valid uses of "that
that" which I left alone, of course.

I also did not correct any of the legitimate, accidentally repeated
words in old RelNotes.

Signed-off-by: Mark Rushakoff <mark.rushakoff@gmail.com>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-11 17:40:07 -07:00
Junio C Hamano
75b2f01a0f Git 2.22.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-11 15:07:51 -07:00
Philip Oakley
3d246dec11 .mailmap: update email address of Philip Oakley
My IEE 'home for life' email service is being withdrawn on 30 Sept 2019.
Replace with my new email domain.

I also have a secondary (backup) 'home for life' through
<philipoakley@dunelm.org.uk>.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-11 15:07:51 -07:00
Alessandro Menti
ad1d0a52dd
l10n: it.po: update the Italian localization for v2.23.0 round 2
Signed-off-by: Alessandro Menti <alessandro.menti@alessandromenti.it>
2019-08-11 11:54:27 +02:00
Tran Ngoc Quan
8a4adfdd2d l10n: vi(4674t): Updated translation for Vietnamese
Signed-off-by: Tran Ngoc Quan <vnwildman@gmail.com>
2019-08-11 07:14:07 +07:00
Christopher Diaz Riveros
3f3e3f9209 l10n: es: 2.23.0 round 2
Signed-off-by: Christopher Diaz Riveros <chrisadr@gentoo.org>
2019-08-10 13:17:33 -05:00
Jean-Noël Avila
ec688f776c l10n: fr v2.23.0 round 2
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2019-08-10 18:17:31 +02:00
Jiang Xin
466c88fa0e l10n: git.pot: v2.23.0 round 2 (4 new, 6 removed)
Generate po/git.pot from v2.23.0-rc2 for git v2.23.0 l10n round 2.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2019-08-10 20:13:14 +08:00
Jiang Xin
d6d5cbfe87 Git 2.23-rc2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAl1NqkwACgkQsLXohpav
 5ssjXQ//VsqRnuVu947TP0x/3vJzAuLSsTW1qE4kJUNQbRCRz64ejSiKiVlfDtpb
 yk4rWbdnVVVCZwCUCNp421SAKWVWuFvEDhqd6JMe69DF1MqOwdn7gVleRiVa59Sv
 2aVMzCO0FcRwUxuSkHogExJp94z2kyzL6EdAVYyalU8InR54cBML+in+gqtWToXE
 7gGzAyu6g2Dv7/Wx2laohm05xppvbgsnrGqZvMhoYR1rl5pf9LlERvS/CjNl4FBc
 mFqhJYgYjjvWfVPmv7WSce1JxlGd/AdDK0eMl6rnorHwSfDbeNsmvDT5a62YioQ7
 9eC2/2woRom5T56NuEwobMYhpEG7ttlZDHEDg0YULSW7gbaNJdEoYJ78T0p7yQL3
 HIljlg2H+l/I2wxeiMDg50oLCIWptT8d0E9TkEX89UkLq8Lc0XQeA7oxIM8HpjQy
 n/Zx7sfDE4DVd7mFZb9UmzvHpzwXKl1NEy9a2/Mb7gRIUwO1DEHL8ATjar+j3AbO
 uh3vOShC4u1Ya1vUOY7wRbmxfxIGIRiqRHtEmx60j1GCSDQMl71fTyO/QnAi71KH
 CNzBRWauiyuJqwXQfzhZzXKLBDjfufoPudVHlWm0UC5oY3MXuLv9jUH6JAoaRP1U
 46gauPfLinOeB0XQ4Uo3xbHJ6j2e91BLt2TzyQMMz0n6upGM9QE=
 =hE45
 -----END PGP SIGNATURE-----

Merge tag 'v2.23.0-rc2' of git://git.kernel.org/pub/scm/git/git

Git 2.23-rc2

* tag 'v2.23.0-rc2' of git://git.kernel.org/pub/scm/git/git: (63 commits)
  Git 2.23-rc2
  t0000: reword comments for "local" test
  t: decrease nesting in test_oid_to_path
  sha1-file: release strbuf after use
  test-dir-iterator: use path argument directly
  dir-iterator: release strbuf after use
  commit-graph: release strbufs after use
  l10n: reformat some localized strings for v2.23.0
  merge-recursive: avoid directory rename detection in recursive case
  commit-graph: fix bug around octopus merges
  restore: fix typo in docs
  doc: typo: s/can not/cannot/ and s/is does/does/
  Git 2.23-rc1
  log: really flip the --mailmap default
  RelNotes/2.23.0: fix a few typos and other minor issues
  RelNotes/2.21.1: typofix
  log: flip the --mailmap default unconditionally
  config: work around bug with includeif:onbranch and early config
  A few more last-minute fixes
  repack: simplify handling of auto-bitmaps and .keep files
  ...
2019-08-10 20:11:17 +08:00
Alexander Shopov
5532a55b34 l10n: bg.po: Updated Bulgarian translation (4674t)
Signed-off-by: Alexander Shopov <ash@kambanaria.org>
2019-08-10 12:34:54 +03:00
Junio C Hamano
5d929ecbcb Merge branch 'cb/xdiff-no-system-includes-in-dot-c' into maint
Compilation fix.

* cb/xdiff-no-system-includes-in-dot-c:
  xdiff: remove duplicate headers from xpatience.c
  xdiff: remove duplicate headers from xhistogram.c
  xdiff: drop system includes in xutils.c
2019-08-09 15:18:19 -07:00
Junio C Hamano
414784d016 Merge branch 'jk/no-system-includes-in-dot-c' into maint
Compilation fix.

* jk/no-system-includes-in-dot-c:
  wt-status.h: drop stdio.h include
  verify-tag: drop signal.h include
2019-08-09 15:18:19 -07:00
Junio C Hamano
5e864ac348 Merge branch 'sg/fsck-config-in-doc' into maint
Doc update.

* sg/fsck-config-in-doc:
  Documentation/git-fsck.txt: include fsck.* config variables
2019-08-09 15:18:18 -07:00
Junio C Hamano
ae76814c6c Merge branch 'jk/xdiff-clamp-funcname-context-index' into maint
The internal diff machinery can be made to read out of bounds while
looking for --funcion-context line in a corner case, which has been
corrected.

* jk/xdiff-clamp-funcname-context-index:
  xdiff: clamp function context indices in post-image
2019-08-09 15:18:18 -07:00
Junio C Hamano
2e27de94d4 Git 2.23-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-08-09 10:15:39 -07:00
Junio C Hamano
fcdd9cc86d Merge branch 'bc/hash-independent-tests-part-4'
Test fix.

* bc/hash-independent-tests-part-4:
  t0000: reword comments for "local" test
  t: decrease nesting in test_oid_to_path
2019-08-09 10:13:14 -07:00
Junio C Hamano
d2422a99cc Merge branch 'rs/plug-strbuf-reak-in-read-alt-refs'
Leakfix.

* rs/plug-strbuf-reak-in-read-alt-refs:
  sha1-file: release strbuf after use
2019-08-09 10:13:14 -07:00
Junio C Hamano
9179380aa6 Merge branch 'mt/dir-iterator-updates'
Leakfix.

* mt/dir-iterator-updates:
  test-dir-iterator: use path argument directly
  dir-iterator: release strbuf after use
2019-08-09 10:13:14 -07:00
Junio C Hamano
203cf46fac Merge branch 'ds/commit-graph-incremental'
Leakfix.

* ds/commit-graph-incremental:
  commit-graph: release strbufs after use
2019-08-09 10:13:13 -07:00
Junio C Hamano
c2a8c3701b Merge branch 'ja/l10n-fixes'
A few messages have been updated to help localization better.

* ja/l10n-fixes:
  l10n: reformat some localized strings for v2.23.0
2019-08-08 14:26:10 -07:00
Junio C Hamano
0bdaec1d3d Merge branch 'en/disable-dir-rename-in-recursive-merge'
"merge-recursive" hit a BUG() when building a virtual merge base
detected a directory rename.

* en/disable-dir-rename-in-recursive-merge:
  merge-recursive: avoid directory rename detection in recursive case
2019-08-08 14:26:10 -07:00
Junio C Hamano
c0a6c6614d Merge branch 'nd/switch-and-restore'
Docfix.

* nd/switch-and-restore:
  restore: fix typo in docs
2019-08-08 14:26:09 -07:00