Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for v2.33.1 #2707

Open
wants to merge 46 commits into
base: origin-v2.33.1-1733723654
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bc97b0b
commit patch 27631507
Dec 9, 2024
34f355a
commit patch 27884989
Dec 9, 2024
206feab
commit patch 23508418
Dec 9, 2024
b8153b1
commit patch 25960635
Dec 9, 2024
63e1dc0
commit patch 21078727
Dec 9, 2024
c94ccc3
commit patch 22030255
Dec 9, 2024
8e18b77
commit patch 25326066
Dec 9, 2024
c2dc1e2
commit patch 27779548
Dec 9, 2024
77aebbf
commit patch 17868760
Dec 9, 2024
4e0bf08
commit patch 27822013
Dec 9, 2024
f58a6c1
commit patch 20148812
Dec 9, 2024
675555d
commit patch 18650951
Dec 9, 2024
d6f74c7
commit patch 21713427
Dec 9, 2024
f1a5e33
commit patch 24374707
Dec 9, 2024
232da33
commit patch 22642993
Dec 9, 2024
2284d00
commit patch 20296967
Dec 9, 2024
ccd62ad
commit patch 25770250
Dec 9, 2024
b3d15c8
commit patch 26383458
Dec 9, 2024
5856de4
commit patch 17762939
Dec 9, 2024
9fdb161
commit patch 20339254
Dec 9, 2024
889e8b6
commit patch 18143963
Dec 9, 2024
b69b231
commit patch 20000927
Dec 9, 2024
eb2e8c8
commit patch 21205922
Dec 9, 2024
b9c2865
commit patch 18523800
Dec 9, 2024
2ac063b
commit patch 27969490
Dec 9, 2024
562f9a9
commit patch 19009335
Dec 9, 2024
065197f
commit patch 23212544
Dec 9, 2024
012381f
commit patch 18924865
Dec 9, 2024
e1cf270
commit patch 17762940
Dec 9, 2024
6547b27
commit patch 26488952
Dec 9, 2024
f692260
commit patch 20127499
Dec 9, 2024
64b40df
commit patch 18840572
Dec 9, 2024
f8a348d
commit patch 27631506
Dec 9, 2024
c5d8b39
commit patch 21671320
Dec 9, 2024
ba88bd9
commit patch 19473983
Dec 9, 2024
bc77a0a
commit patch 19853051
Dec 9, 2024
3d52b04
commit patch 18545330
Dec 9, 2024
b8e0575
commit patch 25283639
Dec 9, 2024
1dd902e
commit patch 20106254
Dec 9, 2024
0744bfc
commit patch 18079911
Dec 9, 2024
ca0861e
commit patch 23423717
Dec 9, 2024
fda68fa
commit patch 26278139
Dec 9, 2024
e235f77
commit patch 22051366
Dec 9, 2024
ce0d26e
commit patch 19853049
Dec 9, 2024
b998ce7
commit patch 19662982
Dec 9, 2024
603521c
commit patch 18798515
Dec 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
commit patch 27631506
  • Loading branch information
turly221 committed Dec 9, 2024
commit f8a348d6aea42e350f12cd743dbb52410a446048
6 changes: 6 additions & 0 deletions t/t4205-log-pretty-formats.sh
Original file line number Diff line number Diff line change
@@ -1034,6 +1034,12 @@ test_expect_success SIZE_T_IS_64BIT 'log --pretty with overflowing wrapping dire
test_cmp expect error
'

test_expect_success 'log --pretty with padding and preceding control chars' '
printf "\20\20 0" >expect &&
git log -1 --pretty="format:%x10%x10%>|(4)%x30" >actual &&
test_cmp expect actual
'

test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'log --pretty with huge commit message' '
# We only assert that this command does not crash. This needs to be
# executed with the address sanitizer to demonstrate failure.
12 changes: 12 additions & 0 deletions t/t4205-log-pretty-formats.sh.orig
Original file line number Diff line number Diff line change
@@ -1022,6 +1022,18 @@ test_expect_success 'log --pretty with magical wrapping directives' '
test_cmp expect actual
'

test_expect_success SIZE_T_IS_64BIT 'log --pretty with overflowing wrapping directive' '
cat >expect <<-EOF &&
fatal: number too large to represent as int on this platform: 2147483649
EOF
test_must_fail git log -1 --pretty="format:%w(2147483649,1,1)%d" 2>error &&
test_cmp expect error &&
test_must_fail git log -1 --pretty="format:%w(1,2147483649,1)%d" 2>error &&
test_cmp expect error &&
test_must_fail git log -1 --pretty="format:%w(1,1,2147483649)%d" 2>error &&
test_cmp expect error
'

test_expect_success EXPENSIVE,SIZE_T_IS_64BIT 'log --pretty with huge commit message' '
# We only assert that this command does not crash. This needs to be
# executed with the address sanitizer to demonstrate failure.
8 changes: 6 additions & 2 deletions utf8.c
Original file line number Diff line number Diff line change
@@ -212,11 +212,15 @@ int utf8_strnwidth(const char *string, size_t len, int skip_ansi)
const char *orig = string;

while (string && string < orig + len) {
int skip;
int glyph_width, skip;

while (skip_ansi &&
(skip = display_mode_esc_sequence_len(string)) != 0)
string += skip;
width += utf8_width(&string, NULL);

glyph_width = utf8_width(&string, NULL);
if (glyph_width > 0)
width += glyph_width;
}
return string ? width : len;
}