Commit graph

68893 commits

Author SHA1 Message Date
René Scharfe 93ea118bed cache-tree: fix strbuf growth in prime_cache_tree_rec()
Use size_t to store the original length of the strbuf tree_len, as
that's the correct type.

Don't double the allocated size of the strbuf when adding a subdirectory
name.  And the chance of the trailing slash fitting in the slack left by
strbuf_add() is very high, so stop pre-growing the strbuf at all.

Suggested-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-02-10 12:24:12 -08:00
Junio C Hamano 844ede312b Sync with maint-2.38
* maint-2.38:
  attr: adjust a mismatched data type
2023-01-19 13:49:08 -08:00
Junio C Hamano b78628d426 Sync with maint-2.37
* maint-2.37:
  attr: adjust a mismatched data type
2023-01-19 13:48:26 -08:00
Junio C Hamano f2027d2626 Sync with maint-2.36
* maint-2.36:
  attr: adjust a mismatched data type
2023-01-19 13:48:17 -08:00
Junio C Hamano 5c1fc48d68 Sync with maint-2.35
* maint-2.35:
  attr: adjust a mismatched data type
2023-01-19 13:48:08 -08:00
Junio C Hamano c508c30968 Sync with maint-2.34
* maint-2.34:
  attr: adjust a mismatched data type
2023-01-19 13:48:00 -08:00
Junio C Hamano f39fe8fcb2 Sync with maint-2.33
* maint-2.33:
  attr: adjust a mismatched data type
2023-01-19 13:47:42 -08:00
Junio C Hamano 25d7cb600c Sync with maint-2.32
* maint-2.32:
  attr: adjust a mismatched data type
2023-01-19 13:46:04 -08:00
Junio C Hamano 012e0d76dc Sync with maint-2.31
* maint-2.31:
  attr: adjust a mismatched data type
2023-01-19 13:45:37 -08:00
Junio C Hamano f8bf6b8f3d Sync with maint-2.30
* maint-2.30:
  attr: adjust a mismatched data type
2023-01-19 13:45:23 -08:00
Johannes Schindelin 0227130244 attr: adjust a mismatched data type
On platforms where `size_t` does not have the same width as `unsigned
long`, passing a pointer to the former when a pointer to the latter is
expected can lead to problems.

Windows and 32-bit Linux are among the affected platforms.

In this instance, we want to store the size of the blob that was read in
that variable. However, `read_blob_data_from_index()` passes that
pointer to `read_object_file()` which expects an `unsigned long *`.
Which means that on affected platforms, the variable is not fully
populated and part of its value is left uninitialized. (On Big-Endian
platforms, this problem would be even worse.)

The consequence is that depending on the uninitialized memory's
contents, we may erroneously reject perfectly fine attributes.

Let's address this by passing a pointer to a variable of the expected
data type.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-01-19 13:38:06 -08:00
Johannes Schindelin 37537d6472 attr: adjust a mismatched data type
On platforms where `size_t` does not have the same width as `unsigned
long`, passing a pointer to the former when a pointer to the latter is
expected can lead to problems.

Windows and 32-bit Linux are among the affected platforms.

In this instance, we want to store the size of the blob that was read in
that variable. However, `read_blob_data_from_index()` passes that
pointer to `read_object_file()` which expects an `unsigned long *`.
Which means that on affected platforms, the variable is not fully
populated and part of its value is left uninitialized. (On Big-Endian
platforms, this problem would be even worse.)

The consequence is that depending on the uninitialized memory's
contents, we may erroneously reject perfectly fine attributes.

Let's address this by passing a pointer to a variable of the expected
data type.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-01-17 06:58:20 -08:00
Johannes Schindelin c6ab91335a fsck: document the new gitattributes message IDs
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-01-16 12:03:14 -08:00
Junio C Hamano 01443f01b7 Git 2.39.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:25:28 +09:00
Junio C Hamano 96738bb0e1 Sync with 2.38.3 2022-12-13 21:25:15 +09:00
Junio C Hamano 37ed7bf0f1 Git 2.38.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:24:14 +09:00
Junio C Hamano fea9f607a8 Sync with Git 2.37.5 2022-12-13 21:23:36 +09:00
Junio C Hamano e43ac5f23d Git 2.37.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:20:47 +09:00
Junio C Hamano 431f6e67e6 Merge branch 'maint-2.36' into maint-2.37 2022-12-13 21:20:35 +09:00
Junio C Hamano ad949b24f8 Git 2.36.4
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:19:24 +09:00
Junio C Hamano 8253c00421 Merge branch 'maint-2.35' into maint-2.36 2022-12-13 21:19:11 +09:00
Junio C Hamano 02f4981723 Git 2.35.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:17:26 +09:00
Junio C Hamano fbabbc30e7 Merge branch 'maint-2.34' into maint-2.35 2022-12-13 21:17:10 +09:00
Junio C Hamano 6c9466944c Git 2.34.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:15:39 +09:00
Junio C Hamano 3748b5b7f5 Merge branch 'maint-2.33' into maint-2.34 2022-12-13 21:15:22 +09:00
Junio C Hamano 7fe9bf55b8 Git 2.33.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:13:48 +09:00
Junio C Hamano 5f22dcc02d Sync with Git 2.32.5 2022-12-13 21:13:11 +09:00
Junio C Hamano d96ea538e8 Git 2.32.5
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:10:27 +09:00
Junio C Hamano 32e357b6df Merge branch 'ps/attr-limits-with-fsck' into maint-2.32 2022-12-13 21:09:56 +09:00
Junio C Hamano 8a755eddf5 Sync with Git 2.31.6 2022-12-13 21:09:40 +09:00
Junio C Hamano 82689d5e5d Git 2.31.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 21:04:03 +09:00
Junio C Hamano 16128765d7 Git 2.30.7
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmOYaKAACgkQsLXohpav
 5svHThAAhjTaBBBYDM6FbHcFUHv515fSo04AmyXl6QKdjiBroaGj+WpJPrYM3B5G
 eR0MYfwDfp7rAvxPQwq1LzSQLz2G2Swue1a4X0t3Bomjpqf48OeAUleGHQlBUTm7
 wfZIHpgCbMBIHJtVAVPiEOo43ZJ1OareCwVpPOpAXLVgTU2Bbx59K0oUqGszjgE3
 anQ0kon6hELZ9aBTx80hUJaYWaxiUqENtRFs6vyOV/MKvW2KR+MJgvu/SQqbRJPy
 ndBJ5r0gcSbes0OLxKCAFFNVt2p6BeVb4IxyPogJveGwJsNU88DQnarSos7hvPYG
 DkhTzfpPmFJkP0WiRHr87jWCXNJraq1SmK65ac1CGV/NTrDfX9ZNoGIRFsHfLmw2
 1poTxhB/h0F4wCucZu7Wavvgd2NI2V+GK5dx8Mx5NovrC67smBny2W7kQgXJCdZX
 e6vNuKVK7pz3cVYvo5GbUo2ivY2igm9Xbj3Na1/Ie8wTFaZ0ZX+oRnxxAdwKbL/1
 X0VRUTQMgtrrLd24JCApo8r5+Ssg0HvIOpXcUZFpvaYl9kMltatwV1Y01lNAhAgF
 VFBvUWdFy5tGzPzSCd3w2NyZOJBng2GdKw9YUt/WVWCKeiLXLI3wh10pC+m1qJus
 HJwQbRRSzC4mhXlkKZ5IG+Xz7x+HrHFnLpQXhtjeSc5WwGQkE2w=
 =syKo
 -----END PGP SIGNATURE-----

Sync with Git 2.30.7
2022-12-13 21:02:20 +09:00
Junio C Hamano b7b37a3371 Git 2.30.7
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-13 20:56:43 +09:00
Junio C Hamano c48035d29b Git 2.39
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-12 09:59:08 +09:00
Junio C Hamano 31cc8be91d l10n-2.39.0-rnd1
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmOVxA8ACgkQk24VDd1F
 MtWuNg//dA2bUkbCzE9hHVN4lF48kPw1UGBYICVLPjM5OPPfVn9e1Ka16fCubJnX
 0M1Mztbp8nmU1awNFrhmt7o0Wqrsspo1kXCeij+TRnYxFmUa8PFwjtPyYQiwizJ/
 /y833vcNKrqwsgKm4hP14cYyp39uyErmsLucjId84EKUEBl7cueapQ1p97WP3tjG
 2yptavW58bGCRVhc0ItzWXyOajOB/Nb9OekYUups6W3iGaiTsTlPhl5HE3pFHDt4
 2/Tlh2UJEIGiKsR1PZNkKm8UeWGFP4r1QGIMVGlXAOmJ1nxBYPrdY6Qrj+3rKU72
 f3juk/P+ugpvddr2SjD9HChxemN+Q/BVowojmvo/9VWBDZ+jfZ0v2sbPAu3ZzGNH
 rfjx8YVhLaJVC2MjNJXRMPkhqJuR2bG0I2s9Jhway1of20Ex/MgrtDwrn/t5OhKV
 Bx9W10/zc5poUqKqZZWhcuAvJTnZ/vzsDFUgHss6sg1I5xSDoTQ2qj5RcujAVBWu
 rc+Yl88O7icADO6RYqpxsHeGIdj7MPuBxAImhB319jLm3dhie6JzAQfYB/HCoFhf
 k6UetwTG0+3IxZ/EvcRXm6JfAYWlANUoYGaTuaVnZmfpTeIyh/hcv2j9EodlRmJC
 ZU6cSAC53WlEobKUd09YUXfrRC9zIHGGAQX/yKlECAP7upRr7SM=
 =fetA
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.39.0-rnd1' of https://github.com/git-l10n/git-po

l10n-2.39.0-rnd1

* tag 'l10n-2.39.0-rnd1' of https://github.com/git-l10n/git-po:
  l10n: zh_TW.po: Git 2.39-rc2
  l10n: tr: v2.39.0 updates
  l10n: Update Catalan translation
  l10n: bg.po: Updated Bulgarian translation (5501t)
  l10n: de.po: update German translation
  l10n: zh_CN v2.39.0 round 1
  l10n: fr: v2.39 rnd 1
  l10n: po-id for 2.39 (round 1)
  l10n: sv.po: Update Swedish translation (5501t0f0)
2022-12-12 09:20:49 +09:00
Junio C Hamano 694cb1b2ab Git 2.38.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmOVJUoACgkQsLXohpav
 5svArg//a71Y4bZaGu6r6a34rJKc8FvSJij9bXDx8adQPjigr0G4J8B9bGJChUZX
 e/iFRSQgHtA2FQ9J20x5enTmr60/Fn5M4VsA1lxipL8GSS3SIEpVV+3qSD2j7/bF
 cWknzRtrf4J/U71rwU3c1bMdbktRI/T8Mn/1Hben7VrGfeLbdRwoCTZil8LD9u9U
 jJ7RERCqcDgLEA0bnlNMlnZUoTwX2rV92O/OzsWSkbFurfz9ExuQ3gmicy7R28uF
 eAlseNmBdIaW8lkpqT+9/c9/UGNBG6OCT4Cq1eWttXuP6+3UCvaEiSO6BhVchlJE
 /uYe3yfYYtGpMG4wU1pIuzN3zlLrR8w0QArcKCILJm0PNKvr6Y1hEIq7JU6l/aJx
 pLmKA49ucRjwraNbAjoXGaQLXiNpMPqfcPyWJNNXgRp5VfARLPqa/YvgK7Xlfj5d
 EBvPpIynVH5mWnj0RQPJioY7/T+SB3TKvToleNMurPsIZAdHTd6t5m4YjZBoA15J
 ShdezOi1a5kUwcRSJYoIML07zI3mZ/iPa4cJoNZdxiOeUCAKAy2mugYUM69octrS
 moKQU7K7L86nEeIv6njyLTMaX70TVUJ84loOXw2rjNiXWJ3aMaY4hFC0cx7kwD4N
 cM73XcREMERMUwWVsfTMsxcyouqD3q9WtcAEPFL9qmofBuR3OsE=
 =Gypb
 -----END PGP SIGNATURE-----

Sync with Git 2.38.2
2022-12-11 09:34:51 +09:00
Junio C Hamano 8706a59933 Git 2.38.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-12-11 09:32:48 +09:00
pan93412 6d0497d526
l10n: zh_TW.po: Git 2.39-rc2
Signed-off-by: pan93412 <pan93412@gmail.com>
2022-12-11 01:27:25 +08:00
Johannes Schindelin 0ddd73fa9f ci: use a newer github-script version
The old version we currently use runs in node.js v12.x, which is being
deprecated in GitHub Actions. The new version uses node.js v16.x.

Incidentally, this also avoids the warning about the deprecated
`::set-output::` workflow command because the newer version of the
`github-script` Action uses the recommended new way to specify outputs.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
2022-12-10 16:32:16 +09:00
Junio C Hamano e71f00f73f Merge branch 'jx/ci-ubuntu-fix' into maint-2.38
Adjust the GitHub CI to newer ubuntu release.

* jx/ci-ubuntu-fix:
  ci: install python on ubuntu
  ci: use the same version of p4 on both Linux and macOS
  ci: remove the pipe after "p4 -V" to catch errors
  github-actions: run gcc-8 on ubuntu-20.04 image
2022-12-10 16:17:47 +09:00
Junio C Hamano bbfd79af89 Sync with 'maint' 2022-12-10 14:02:22 +09:00
Junio C Hamano ec9816c6b3 Merge branch 'js/ci-use-newer-up-down-artifact' into maint-2.38
CI fix.

* js/ci-use-newer-up-down-artifact:
  ci: avoid using deprecated {up,down}load-artifacts Action
2022-12-10 14:02:09 +09:00
Junio C Hamano 75efbc1372 Merge branch 'ab/ci-use-macos-12' into maint-2.38
CI fix.

* ab/ci-use-macos-12:
  CI: upgrade to macos-12, and pin OSX version
2022-12-10 14:02:09 +09:00
Junio C Hamano 634d026866 Merge branch 'ab/ci-retire-set-output' into maint-2.38
CI fix.

* ab/ci-retire-set-output:
  CI: migrate away from deprecated "set-output" syntax
2022-12-10 14:02:09 +09:00
Junio C Hamano 8972be0252 Merge branch 'ab/ci-musl-bash-fix' into maint-2.38
CI fix.

* ab/ci-musl-bash-fix:
  CI: don't explicitly pick "bash" shell outside of Windows, fix regression
2022-12-10 14:02:09 +09:00
Junio C Hamano 78c5de91f2 Merge branch 'od/ci-use-checkout-v3-when-applicable' into maint-2.38
Update GitHub CI to use actions/checkout@v3; use of the older
checkout@v2 gets annoying deprecation notices.

* od/ci-use-checkout-v3-when-applicable:
  ci(main): upgrade actions/checkout to v3
2022-12-10 14:02:09 +09:00
Junio C Hamano 481d274aae Merge branch 'js/ci-use-newer-up-down-artifact'
CI fix.

* js/ci-use-newer-up-down-artifact:
  ci: avoid using deprecated {up,down}load-artifacts Action
2022-12-10 14:01:06 +09:00
Junio C Hamano 0b32d1aea2 Merge branch 'ab/ci-use-macos-12'
CI fix.

* ab/ci-use-macos-12:
  CI: upgrade to macos-12, and pin OSX version
2022-12-10 14:01:06 +09:00
Junio C Hamano 82444ead4c Merge branch 'ab/ci-retire-set-output'
CI fix.

* ab/ci-retire-set-output:
  CI: migrate away from deprecated "set-output" syntax
2022-12-10 14:01:05 +09:00
Junio C Hamano a64bf54bfa Merge branch 'ab/ci-musl-bash-fix'
CI fix.

* ab/ci-musl-bash-fix:
  CI: don't explicitly pick "bash" shell outside of Windows, fix regression
2022-12-10 14:01:05 +09:00