pktline : accept upercase hexadecimal value as pktline length information#1220
Conversation
2b4818e to
b06ba33
Compare
|
@BeChris can you confirm this is what upstream does and cross-link that here please? The CI failure is due to the commit message needing to start with |
|
Hello @pjbgf , As you can see, it calls hexval() defined here: Which in turn, refers hexval_table defined here: I reproduced all that code in my own test c file, to feed both a lowercase and an uppercase hex value: #include <stddef.h>
#include <stdio.h>
const signed char hexval_table[256] = {
-1, -1, -1, -1, -1, -1, -1, -1, /* 00-07 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 08-0f */
-1, -1, -1, -1, -1, -1, -1, -1, /* 10-17 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 18-1f */
-1, -1, -1, -1, -1, -1, -1, -1, /* 20-27 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 28-2f */
0, 1, 2, 3, 4, 5, 6, 7, /* 30-37 */
8, 9, -1, -1, -1, -1, -1, -1, /* 38-3f */
-1, 10, 11, 12, 13, 14, 15, -1, /* 40-47 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 48-4f */
-1, -1, -1, -1, -1, -1, -1, -1, /* 50-57 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 58-5f */
-1, 10, 11, 12, 13, 14, 15, -1, /* 60-67 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 68-67 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 70-77 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 78-7f */
-1, -1, -1, -1, -1, -1, -1, -1, /* 80-87 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 88-8f */
-1, -1, -1, -1, -1, -1, -1, -1, /* 90-97 */
-1, -1, -1, -1, -1, -1, -1, -1, /* 98-9f */
-1, -1, -1, -1, -1, -1, -1, -1, /* a0-a7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* a8-af */
-1, -1, -1, -1, -1, -1, -1, -1, /* b0-b7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* b8-bf */
-1, -1, -1, -1, -1, -1, -1, -1, /* c0-c7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* c8-cf */
-1, -1, -1, -1, -1, -1, -1, -1, /* d0-d7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* d8-df */
-1, -1, -1, -1, -1, -1, -1, -1, /* e0-e7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* e8-ef */
-1, -1, -1, -1, -1, -1, -1, -1, /* f0-f7 */
-1, -1, -1, -1, -1, -1, -1, -1, /* f8-ff */
};
unsigned int hexval(unsigned char c)
{
int val = hexval_table[c];
printf("hexval(0x%x) = %d\n", c, val);
return val;
}
int packet_length(const char lenbuf_hex[4])
{
return hexval(lenbuf_hex[0]) << 12 |
hexval(lenbuf_hex[1]) << 8 |
hexval(lenbuf_hex[2]) << 4 |
hexval(lenbuf_hex[3]);
}
int main(int argc, char **argv)
{
char lenbuf_hex[4] = {'0', '0', '1', 'e'};
printf("len = %d\n", packet_length(lenbuf_hex));
lenbuf_hex[3] = 'E';
printf("len = %d\n", packet_length(lenbuf_hex));
}When executed, this code displays: hexval(0x30) = 0
hexval(0x30) = 0
hexval(0x31) = 1
hexval(0x65) = 14
len = 30
hexval(0x30) = 0
hexval(0x30) = 0
hexval(0x31) = 1
hexval(0x45) = 14
len = 30So, yes, Git handle uppercase hexadecimal values when computing received packet len :) I'm going to fix my commit message and you will be able to accept it if you agree with my explanations. |
…e length information. Fixes go-git#1220
b06ba33 to
5e11196
Compare
…e length information. Fixes go-git#1220
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | require | minor | `v5.11.0` -> `v5.13.1` | --- ### Release Notes <details> <summary>go-git/go-git (github.com/go-git/go-git/v5)</summary> ### [`v5.13.1`](https://github.com/go-git/go-git/releases/tag/v5.13.1) [Compare Source](go-git/go-git@v5.13.0...v5.13.1) #### What's Changed - build: bump github.com/go-git/go-billy/v5 from 5.6.0 to 5.6.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1327 - build: bump github.com/elazarl/goproxy from 1.2.1 to 1.2.2 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1329 - build: bump github.com/elazarl/goproxy from 1.2.2 to 1.2.3 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1340 - Revert "plumbing: transport/ssh, Add support for SSH [@​cert-authority](https://github.com/cert-authority)." by [@​pjbgf](https://github.com/pjbgf) in [#​1346](go-git/go-git#1346) **Full Changelog**: go-git/go-git@v5.13.0...v5.13.1 ### [`v5.13.0`](https://github.com/go-git/go-git/releases/tag/v5.13.0) [Compare Source](go-git/go-git@v5.12.0...v5.13.0) #### What's Changed - build: bump github.com/go-git/go-git/v5 from 5.11.0 to 5.12.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1065 - build: bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1068 - build: bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1071 - Properly support skipping of non-mandatory extensions by [@​codablock](https://github.com/codablock) in go-git/go-git#1066 - git: Refine some codes in test and non-test. by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1077 - plumbing: protocol/packp, client-side filter capability support by [@​edigaryev](https://github.com/edigaryev) in go-git/go-git#1000 - build: bump golang.org/x/net from 0.22.0 to 0.23.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1078 - plumbing: fix sideband demux on flush by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#1084 - storage: dotgit, head reference usually comes first by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#1085 - build: bump golang.org/x/text from 0.14.0 to 0.15.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1091 - build: bump golang.org/x/crypto from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1094 - build: bump golang.org/x/net from 0.24.0 to 0.25.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1093 - git: Added an example for Repository.Branches by [@​johnmatthiggins](https://github.com/johnmatthiggins) in go-git/go-git#1088 - git: worktree_commit, Modify checking empty commit. Fixes [#​723](go-git/go-git#723) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1050 - plumbing: transport/http, Wrap http errors to return reason. Fixes [#​1097](go-git/go-git#1097) by [@​ggambetti](https://github.com/ggambetti) in go-git/go-git#1100 - build: bump golang.org/x/sys from 0.20.0 to 0.21.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1106 - build: bump golang.org/x/text from 0.15.0 to 0.16.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1107 - Bumps Go versions and go-billy by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1056 - \_examples: Fixed a dead link COMPATIBILITY.md by [@​gecko655](https://github.com/gecko655) in go-git/go-git#1109 - build: bump github.com/jessevdk/go-flags from 1.5.0 to 1.6.1 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1115 - build: bump github.com/elazarl/goproxy from v0.0.0-20230808193330-2592e75ae04a to v0.0.0-20240618083138-03be62527ccb by [@​hbelmiro](https://github.com/hbelmiro) in go-git/go-git#1124 - build: bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1104 - Add option approximating `git clean -x` flag. by [@​msuozzo](https://github.com/msuozzo) in go-git/go-git#995 - Revert "Add option approximating `git clean -x` flag." by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1129 - Fix reference updated concurrently error for the filesystem storer by [@​Javier-varez](https://github.com/Javier-varez) in go-git/go-git#1116 - build: bump golang.org/x/net from 0.26.0 to 0.27.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1134 - utils: merkletrie, Align error message with upstream by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1142 - plumbing: transport/file, Change paths to absolute by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1141 - plumbing: gitignore, Fix loading of ignored .gitignore files. by [@​Achilleshiel](https://github.com/Achilleshiel) in go-git/go-git#1114 - build: bump github.com/skeema/knownhosts from 1.2.2 to 1.3.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1147 - plumbing: transport/ssh, Add support for SSH [@​cert-authority](https://github.com/cert-authority). by [@​Javier-varez](https://github.com/Javier-varez) in go-git/go-git#1157 - build: run example tests during CI workflow by [@​crazybolillo](https://github.com/crazybolillo) in go-git/go-git#1030 - storage: filesystem, Fix object cache not working due to uninitialised objects being put into cache by [@​SatelliteMind](https://github.com/SatelliteMind) in go-git/go-git#1138 - git: Fix fetching missing commits by [@​AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#1032 - plumbing: format/packfile, remove duplicate checks in findMatch() by [@​edigaryev](https://github.com/edigaryev) in go-git/go-git#1152 - git: worktree, Fix file reported as `Untracked` while it is committed by [@​rodrigocam](https://github.com/rodrigocam) in go-git/go-git#1023 - build: bump golang.org/x/sys from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1160 - plumbing: filemode, Remove check for setting size of .git/index file by [@​nicholasSUSE](https://github.com/nicholasSUSE) in go-git/go-git#1159 - build: bump golang.org/x/net from 0.27.0 to 0.28.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1163 - Fix some lint warning and increase stalebot to 180 days by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1128 - adjust path extracted from file: url on Windows by [@​tomqwpl](https://github.com/tomqwpl) in go-git/go-git#416 - build: bump golang.org/x/sys from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1164 - Add RestoreStaged to Worktree that mimics the behaviour of git restore --staged <file>... by [@​ben-tbotlabs](https://github.com/ben-tbotlabs) in go-git/go-git#493 - plumbing: signature, support the same x509 signature formats as git by [@​yoavamit](https://github.com/yoavamit) in go-git/go-git#1169 - fix: allow discovery of non bare repos in fsLoader by [@​jakobmoellerdev](https://github.com/jakobmoellerdev) in go-git/go-git#1170 - build: bump golang.org/x/sys from 0.24.0 to 0.25.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1178 - build: bump golang.org/x/text from 0.17.0 to 0.18.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1179 - build: bump golang.org/x/net from 0.28.0 to 0.29.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1184 - Consume push URLs when they are provided by [@​mcepl](https://github.com/mcepl) in go-git/go-git#1191 - \*: use gocheck's MkDir instead of TempDir for tests. Fixes [#​807](go-git/go-git#807) by [@​uragirii](https://github.com/uragirii) in go-git/go-git#1194 - build: bump golang.org/x/net from 0.29.0 to 0.30.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1200 - worktree: .git/index not correctly generated when running on Windows by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1198 - git: worktree, Fix sparse reset. Fixes [#​90](go-git/go-git#90) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1101 - git: worktree, Pass context on updateSubmodules. Fixes [#​1098](go-git/go-git#1098) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1154 - build: bump github.com/go-git/go-billy/v5 from 5.5.1-0.20240427054813-8453aa90c6ec to 5.6.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1211 - Update contributing guidelines by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1217 - build: bump github.com/ProtonMail/go-crypto from 1.0.0 to 1.1.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1222 - build: bump golang.org/x/sys from 0.26.0 to 0.27.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1223 - build: bump golang.org/x/crypto from 0.28.0 to 0.29.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1221 - build: bump github.com/ProtonMail/go-crypto from 1.1.1 to 1.1.2 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1226 - build: bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1232 - build: bump github.com/ProtonMail/go-crypto from 1.1.2 to 1.1.3 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1231 - build: General improvements around fuzzing by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1229 - build: bump golang.org/x/net from 0.30.0 to 0.32.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1241 - build: group dependabot updates for golang.org by [@​AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#1243 - build: bump github/codeql-action from 2.22.11 to 3.27.6 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1244 - build: bump golang.org/x/crypto from 0.21.0 to 0.31.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1246 - build: bump golang.org/x/crypto from 0.30.0 to 0.31.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1247 - build: bump github.com/gliderlabs/ssh from 0.3.7 to 0.3.8 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1248 - add comment preventing people from creating invalid trees by [@​petar](https://github.com/petar) in go-git/go-git#732 - build: bump github/codeql-action from 3.27.6 to 3.27.9 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1250 - plumbing: Properly encode index version 4 by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1251 - Fix typos by [@​deining](https://github.com/deining) in go-git/go-git#1148 - Fix reset files in subfolders by [@​linglo](https://github.com/linglo) in go-git/go-git#1177 - git: update switch cases by [@​hezhizhen](https://github.com/hezhizhen) in go-git/go-git#1182 - build: bump golang.org/x/net from 0.32.0 to 0.33.0 in the golang-org group by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1256 - fix(1212): Fix invalid reference name error while cloning branches containing /- by [@​varmakarthik12](https://github.com/varmakarthik12) in go-git/go-git#1257 - pktline : accept upercase hexadecimal value as pktline length information by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1220 - build: bump github/codeql-action from 3.27.9 to 3.28.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1260 - build: bump github.com/elazarl/goproxy from 0.0.0-20240618083138-03be62527ccb to 1.2.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1262 - git: worktree_commit, sanitize author and commiter name and email before creating the commit object. Fixes [#​680](go-git/go-git#680) by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1261 #### New Contributors - [@​johnmatthiggins](https://github.com/johnmatthiggins) made their first contribution in go-git/go-git#1088 - [@​ggambetti](https://github.com/ggambetti) made their first contribution in go-git/go-git#1100 - [@​gecko655](https://github.com/gecko655) made their first contribution in go-git/go-git#1109 - [@​hbelmiro](https://github.com/hbelmiro) made their first contribution in go-git/go-git#1124 - [@​msuozzo](https://github.com/msuozzo) made their first contribution in go-git/go-git#995 - [@​Javier-varez](https://github.com/Javier-varez) made their first contribution in go-git/go-git#1116 - [@​Achilleshiel](https://github.com/Achilleshiel) made their first contribution in go-git/go-git#1114 - [@​crazybolillo](https://github.com/crazybolillo) made their first contribution in go-git/go-git#1030 - [@​SatelliteMind](https://github.com/SatelliteMind) made their first contribution in go-git/go-git#1138 - [@​rodrigocam](https://github.com/rodrigocam) made their first contribution in go-git/go-git#1023 - [@​nicholasSUSE](https://github.com/nicholasSUSE) made their first contribution in go-git/go-git#1159 - [@​tomqwpl](https://github.com/tomqwpl) made their first contribution in go-git/go-git#416 - [@​ben-tbotlabs](https://github.com/ben-tbotlabs) made their first contribution in go-git/go-git#493 - [@​yoavamit](https://github.com/yoavamit) made their first contribution in go-git/go-git#1169 - [@​uragirii](https://github.com/uragirii) made their first contribution in go-git/go-git#1194 - [@​petar](https://github.com/petar) made their first contribution in go-git/go-git#732 - [@​deining](https://github.com/deining) made their first contribution in go-git/go-git#1148 - [@​linglo](https://github.com/linglo) made their first contribution in go-git/go-git#1177 - [@​varmakarthik12](https://github.com/varmakarthik12) made their first contribution in go-git/go-git#1257 **Full Changelog**: go-git/go-git@v5.12.0...v5.13.0 ### [`v5.12.0`](https://github.com/go-git/go-git/releases/tag/v5.12.0) [Compare Source](go-git/go-git@v5.11.0...v5.12.0) #### What's Changed - git: Worktree.AddWithOptions: add skipStatus option when providing a specific path by [@​moranCohen26](https://github.com/moranCohen26) in go-git/go-git#994 - git: Signer: fix usage of crypto.Signer interface by [@​wlynch](https://github.com/wlynch) in go-git/go-git#1029 - git: Remote, fetch, adds the prune option. by [@​juliens](https://github.com/juliens) in go-git/go-git#366 - git: Add crypto.Signer option to CommitOptions. by [@​wlynch](https://github.com/wlynch) in go-git/go-git#996 - git: Worktree checkout tag hash id ([#​959](go-git/go-git#959)) by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#966 - git: Worktree, Don't panic on empty or root path when checking if it is valid by [@​tim775](https://github.com/tim775) in go-git/go-git#1042 - git: Add commit validation for Reset by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1048 - git: worktree_commit, Fix amend commit to apply changes. Fixes [#​1024](go-git/go-git#1024) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1045 - git: Implement Merge function with initial `FastForwardMerge` support by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1044 - plumbing: object, Make first commit visible on logs filtered with filename. Fixes [#​191](go-git/go-git#191) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1036 - plumbing: no panic in printStats function. Fixes [#​177](go-git/go-git#177) by [@​nodivbyzero](https://github.com/nodivbyzero) in go-git/go-git#971 - plumbing: object, Optimize logging with file. by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1046 - plumbing: object, check legitimacy in (\*Tree).Encode by [@​niukuo](https://github.com/niukuo) in go-git/go-git#967 - plumbing: format/gitattributes, close file in ReadAttributesFile by [@​prskr](https://github.com/prskr) in go-git/go-git#1018 - plumbing: check setAuth error. Fixes [#​185](go-git/go-git#185) by [@​nodivbyzero](https://github.com/nodivbyzero) in go-git/go-git#969 - plumbing: object, fix variable defaultUtf8CommitMessageEncoding name spell error by [@​Jerry-yz](https://github.com/Jerry-yz) in go-git/go-git#987 - utils: merkletrie, calculate filesystem node's hash lazily. by [@​candid82](https://github.com/candid82) in go-git/go-git#825 - utils: update comment in node.go's Hash() by [@​codablock](https://github.com/codablock) in go-git/go-git#992 - \_example: fix 404 link and added ssh-agent clone link by [@​grinish21](https://github.com/grinish21) in go-git/go-git#1022 - \_example: checkout-branch example by [@​dlambda](https://github.com/dlambda) in go-git/go-git#446 - \_example: example for git clone using ssh-agent by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#998 #### New Contributors - [@​candid82](https://github.com/candid82) made their first contribution in go-git/go-git#825 - [@​codablock](https://github.com/codablock) made their first contribution in go-git/go-git#992 - [@​Jerry-yz](https://github.com/Jerry-yz) made their first contribution in go-git/go-git#987 - [@​wlynch](https://github.com/wlynch) made their first contribution in go-git/go-git#996 - [@​moranCohen26](https://github.com/moranCohen26) made their first contribution in go-git/go-git#994 - [@​grinish21](https://github.com/grinish21) made their first contribution in go-git/go-git#1022 - [@​prskr](https://github.com/prskr) made their first contribution in go-git/go-git#1018 - [@​dlambda](https://github.com/dlambda) made their first contribution in go-git/go-git#446 - [@​juliens](https://github.com/juliens) made their first contribution in go-git/go-git#366 - [@​onee-only](https://github.com/onee-only) made their first contribution in go-git/go-git#1036 - [@​tim775](https://github.com/tim775) made their first contribution in go-git/go-git#1042 - [@​niukuo](https://github.com/niukuo) made their first contribution in go-git/go-git#967 - [@​avoidalone](https://github.com/avoidalone) made their first contribution in go-git/go-git#1047 **Full Changelog**: go-git/go-git@v5.11.0...v5.12.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * *" (UTC), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6ImZvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19--> Co-authored-by: Earl Warren <contact@earl-warren.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6495 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
…(#6496) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) | require | minor | `v5.11.0` -> `v5.13.1` | --- ### Release Notes <details> <summary>go-git/go-git (github.com/go-git/go-git/v5)</summary> ### [`v5.13.1`](https://github.com/go-git/go-git/releases/tag/v5.13.1) [Compare Source](go-git/go-git@v5.13.0...v5.13.1) #### What's Changed - build: bump github.com/go-git/go-billy/v5 from 5.6.0 to 5.6.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1327 - build: bump github.com/elazarl/goproxy from 1.2.1 to 1.2.2 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1329 - build: bump github.com/elazarl/goproxy from 1.2.2 to 1.2.3 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1340 - Revert "plumbing: transport/ssh, Add support for SSH [@​cert-authority](https://github.com/cert-authority)." by [@​pjbgf](https://github.com/pjbgf) in [#​1346](go-git/go-git#1346) **Full Changelog**: go-git/go-git@v5.13.0...v5.13.1 ### [`v5.13.0`](https://github.com/go-git/go-git/releases/tag/v5.13.0) [Compare Source](go-git/go-git@v5.12.0...v5.13.0) #### What's Changed - build: bump github.com/go-git/go-git/v5 from 5.11.0 to 5.12.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1065 - build: bump golang.org/x/net from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1068 - build: bump golang.org/x/net from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1071 - Properly support skipping of non-mandatory extensions by [@​codablock](https://github.com/codablock) in go-git/go-git#1066 - git: Refine some codes in test and non-test. by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1077 - plumbing: protocol/packp, client-side filter capability support by [@​edigaryev](https://github.com/edigaryev) in go-git/go-git#1000 - build: bump golang.org/x/net from 0.22.0 to 0.23.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1078 - plumbing: fix sideband demux on flush by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#1084 - storage: dotgit, head reference usually comes first by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#1085 - build: bump golang.org/x/text from 0.14.0 to 0.15.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1091 - build: bump golang.org/x/crypto from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1094 - build: bump golang.org/x/net from 0.24.0 to 0.25.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1093 - git: Added an example for Repository.Branches by [@​johnmatthiggins](https://github.com/johnmatthiggins) in go-git/go-git#1088 - git: worktree_commit, Modify checking empty commit. Fixes [#​723](go-git/go-git#723) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1050 - plumbing: transport/http, Wrap http errors to return reason. Fixes [#​1097](go-git/go-git#1097) by [@​ggambetti](https://github.com/ggambetti) in go-git/go-git#1100 - build: bump golang.org/x/sys from 0.20.0 to 0.21.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1106 - build: bump golang.org/x/text from 0.15.0 to 0.16.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1107 - Bumps Go versions and go-billy by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1056 - \_examples: Fixed a dead link COMPATIBILITY.md by [@​gecko655](https://github.com/gecko655) in go-git/go-git#1109 - build: bump github.com/jessevdk/go-flags from 1.5.0 to 1.6.1 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1115 - build: bump github.com/elazarl/goproxy from v0.0.0-20230808193330-2592e75ae04a to v0.0.0-20240618083138-03be62527ccb by [@​hbelmiro](https://github.com/hbelmiro) in go-git/go-git#1124 - build: bump golang.org/x/net from 0.25.0 to 0.26.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1104 - Add option approximating `git clean -x` flag. by [@​msuozzo](https://github.com/msuozzo) in go-git/go-git#995 - Revert "Add option approximating `git clean -x` flag." by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1129 - Fix reference updated concurrently error for the filesystem storer by [@​Javier-varez](https://github.com/Javier-varez) in go-git/go-git#1116 - build: bump golang.org/x/net from 0.26.0 to 0.27.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1134 - utils: merkletrie, Align error message with upstream by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1142 - plumbing: transport/file, Change paths to absolute by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1141 - plumbing: gitignore, Fix loading of ignored .gitignore files. by [@​Achilleshiel](https://github.com/Achilleshiel) in go-git/go-git#1114 - build: bump github.com/skeema/knownhosts from 1.2.2 to 1.3.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1147 - plumbing: transport/ssh, Add support for SSH [@​cert-authority](https://github.com/cert-authority). by [@​Javier-varez](https://github.com/Javier-varez) in go-git/go-git#1157 - build: run example tests during CI workflow by [@​crazybolillo](https://github.com/crazybolillo) in go-git/go-git#1030 - storage: filesystem, Fix object cache not working due to uninitialised objects being put into cache by [@​SatelliteMind](https://github.com/SatelliteMind) in go-git/go-git#1138 - git: Fix fetching missing commits by [@​AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#1032 - plumbing: format/packfile, remove duplicate checks in findMatch() by [@​edigaryev](https://github.com/edigaryev) in go-git/go-git#1152 - git: worktree, Fix file reported as `Untracked` while it is committed by [@​rodrigocam](https://github.com/rodrigocam) in go-git/go-git#1023 - build: bump golang.org/x/sys from 0.22.0 to 0.23.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1160 - plumbing: filemode, Remove check for setting size of .git/index file by [@​nicholasSUSE](https://github.com/nicholasSUSE) in go-git/go-git#1159 - build: bump golang.org/x/net from 0.27.0 to 0.28.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1163 - Fix some lint warning and increase stalebot to 180 days by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1128 - adjust path extracted from file: url on Windows by [@​tomqwpl](https://github.com/tomqwpl) in go-git/go-git#416 - build: bump golang.org/x/sys from 0.23.0 to 0.24.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1164 - Add RestoreStaged to Worktree that mimics the behaviour of git restore --staged <file>... by [@​ben-tbotlabs](https://github.com/ben-tbotlabs) in go-git/go-git#493 - plumbing: signature, support the same x509 signature formats as git by [@​yoavamit](https://github.com/yoavamit) in go-git/go-git#1169 - fix: allow discovery of non bare repos in fsLoader by [@​jakobmoellerdev](https://github.com/jakobmoellerdev) in go-git/go-git#1170 - build: bump golang.org/x/sys from 0.24.0 to 0.25.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1178 - build: bump golang.org/x/text from 0.17.0 to 0.18.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1179 - build: bump golang.org/x/net from 0.28.0 to 0.29.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1184 - Consume push URLs when they are provided by [@​mcepl](https://github.com/mcepl) in go-git/go-git#1191 - \*: use gocheck's MkDir instead of TempDir for tests. Fixes [#​807](go-git/go-git#807) by [@​uragirii](https://github.com/uragirii) in go-git/go-git#1194 - build: bump golang.org/x/net from 0.29.0 to 0.30.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1200 - worktree: .git/index not correctly generated when running on Windows by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1198 - git: worktree, Fix sparse reset. Fixes [#​90](go-git/go-git#90) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1101 - git: worktree, Pass context on updateSubmodules. Fixes [#​1098](go-git/go-git#1098) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1154 - build: bump github.com/go-git/go-billy/v5 from 5.5.1-0.20240427054813-8453aa90c6ec to 5.6.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1211 - Update contributing guidelines by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1217 - build: bump github.com/ProtonMail/go-crypto from 1.0.0 to 1.1.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1222 - build: bump golang.org/x/sys from 0.26.0 to 0.27.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1223 - build: bump golang.org/x/crypto from 0.28.0 to 0.29.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1221 - build: bump github.com/ProtonMail/go-crypto from 1.1.1 to 1.1.2 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1226 - build: bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1232 - build: bump github.com/ProtonMail/go-crypto from 1.1.2 to 1.1.3 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1231 - build: General improvements around fuzzing by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1229 - build: bump golang.org/x/net from 0.30.0 to 0.32.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1241 - build: group dependabot updates for golang.org by [@​AriehSchneier](https://github.com/AriehSchneier) in go-git/go-git#1243 - build: bump github/codeql-action from 2.22.11 to 3.27.6 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1244 - build: bump golang.org/x/crypto from 0.21.0 to 0.31.0 in /cli/go-git by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1246 - build: bump golang.org/x/crypto from 0.30.0 to 0.31.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1247 - build: bump github.com/gliderlabs/ssh from 0.3.7 to 0.3.8 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1248 - add comment preventing people from creating invalid trees by [@​petar](https://github.com/petar) in go-git/go-git#732 - build: bump github/codeql-action from 3.27.6 to 3.27.9 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1250 - plumbing: Properly encode index version 4 by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1251 - Fix typos by [@​deining](https://github.com/deining) in go-git/go-git#1148 - Fix reset files in subfolders by [@​linglo](https://github.com/linglo) in go-git/go-git#1177 - git: update switch cases by [@​hezhizhen](https://github.com/hezhizhen) in go-git/go-git#1182 - build: bump golang.org/x/net from 0.32.0 to 0.33.0 in the golang-org group by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1256 - fix(1212): Fix invalid reference name error while cloning branches containing /- by [@​varmakarthik12](https://github.com/varmakarthik12) in go-git/go-git#1257 - pktline : accept upercase hexadecimal value as pktline length information by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1220 - build: bump github/codeql-action from 3.27.9 to 3.28.0 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1260 - build: bump github.com/elazarl/goproxy from 0.0.0-20240618083138-03be62527ccb to 1.2.1 by [@​dependabot](https://github.com/dependabot) in go-git/go-git#1262 - git: worktree_commit, sanitize author and commiter name and email before creating the commit object. Fixes [#​680](go-git/go-git#680) by [@​BeChris](https://github.com/BeChris) in go-git/go-git#1261 #### New Contributors - [@​johnmatthiggins](https://github.com/johnmatthiggins) made their first contribution in go-git/go-git#1088 - [@​ggambetti](https://github.com/ggambetti) made their first contribution in go-git/go-git#1100 - [@​gecko655](https://github.com/gecko655) made their first contribution in go-git/go-git#1109 - [@​hbelmiro](https://github.com/hbelmiro) made their first contribution in go-git/go-git#1124 - [@​msuozzo](https://github.com/msuozzo) made their first contribution in go-git/go-git#995 - [@​Javier-varez](https://github.com/Javier-varez) made their first contribution in go-git/go-git#1116 - [@​Achilleshiel](https://github.com/Achilleshiel) made their first contribution in go-git/go-git#1114 - [@​crazybolillo](https://github.com/crazybolillo) made their first contribution in go-git/go-git#1030 - [@​SatelliteMind](https://github.com/SatelliteMind) made their first contribution in go-git/go-git#1138 - [@​rodrigocam](https://github.com/rodrigocam) made their first contribution in go-git/go-git#1023 - [@​nicholasSUSE](https://github.com/nicholasSUSE) made their first contribution in go-git/go-git#1159 - [@​tomqwpl](https://github.com/tomqwpl) made their first contribution in go-git/go-git#416 - [@​ben-tbotlabs](https://github.com/ben-tbotlabs) made their first contribution in go-git/go-git#493 - [@​yoavamit](https://github.com/yoavamit) made their first contribution in go-git/go-git#1169 - [@​uragirii](https://github.com/uragirii) made their first contribution in go-git/go-git#1194 - [@​petar](https://github.com/petar) made their first contribution in go-git/go-git#732 - [@​deining](https://github.com/deining) made their first contribution in go-git/go-git#1148 - [@​linglo](https://github.com/linglo) made their first contribution in go-git/go-git#1177 - [@​varmakarthik12](https://github.com/varmakarthik12) made their first contribution in go-git/go-git#1257 **Full Changelog**: go-git/go-git@v5.12.0...v5.13.0 ### [`v5.12.0`](https://github.com/go-git/go-git/releases/tag/v5.12.0) [Compare Source](go-git/go-git@v5.11.0...v5.12.0) #### What's Changed - git: Worktree.AddWithOptions: add skipStatus option when providing a specific path by [@​moranCohen26](https://github.com/moranCohen26) in go-git/go-git#994 - git: Signer: fix usage of crypto.Signer interface by [@​wlynch](https://github.com/wlynch) in go-git/go-git#1029 - git: Remote, fetch, adds the prune option. by [@​juliens](https://github.com/juliens) in go-git/go-git#366 - git: Add crypto.Signer option to CommitOptions. by [@​wlynch](https://github.com/wlynch) in go-git/go-git#996 - git: Worktree checkout tag hash id ([#​959](go-git/go-git#959)) by [@​aymanbagabas](https://github.com/aymanbagabas) in go-git/go-git#966 - git: Worktree, Don't panic on empty or root path when checking if it is valid by [@​tim775](https://github.com/tim775) in go-git/go-git#1042 - git: Add commit validation for Reset by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1048 - git: worktree_commit, Fix amend commit to apply changes. Fixes [#​1024](go-git/go-git#1024) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1045 - git: Implement Merge function with initial `FastForwardMerge` support by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#1044 - plumbing: object, Make first commit visible on logs filtered with filename. Fixes [#​191](go-git/go-git#191) by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1036 - plumbing: no panic in printStats function. Fixes [#​177](go-git/go-git#177) by [@​nodivbyzero](https://github.com/nodivbyzero) in go-git/go-git#971 - plumbing: object, Optimize logging with file. by [@​onee-only](https://github.com/onee-only) in go-git/go-git#1046 - plumbing: object, check legitimacy in (\*Tree).Encode by [@​niukuo](https://github.com/niukuo) in go-git/go-git#967 - plumbing: format/gitattributes, close file in ReadAttributesFile by [@​prskr](https://github.com/prskr) in go-git/go-git#1018 - plumbing: check setAuth error. Fixes [#​185](go-git/go-git#185) by [@​nodivbyzero](https://github.com/nodivbyzero) in go-git/go-git#969 - plumbing: object, fix variable defaultUtf8CommitMessageEncoding name spell error by [@​Jerry-yz](https://github.com/Jerry-yz) in go-git/go-git#987 - utils: merkletrie, calculate filesystem node's hash lazily. by [@​candid82](https://github.com/candid82) in go-git/go-git#825 - utils: update comment in node.go's Hash() by [@​codablock](https://github.com/codablock) in go-git/go-git#992 - \_example: fix 404 link and added ssh-agent clone link by [@​grinish21](https://github.com/grinish21) in go-git/go-git#1022 - \_example: checkout-branch example by [@​dlambda](https://github.com/dlambda) in go-git/go-git#446 - \_example: example for git clone using ssh-agent by [@​pjbgf](https://github.com/pjbgf) in go-git/go-git#998 #### New Contributors - [@​candid82](https://github.com/candid82) made their first contribution in go-git/go-git#825 - [@​codablock](https://github.com/codablock) made their first contribution in go-git/go-git#992 - [@​Jerry-yz](https://github.com/Jerry-yz) made their first contribution in go-git/go-git#987 - [@​wlynch](https://github.com/wlynch) made their first contribution in go-git/go-git#996 - [@​moranCohen26](https://github.com/moranCohen26) made their first contribution in go-git/go-git#994 - [@​grinish21](https://github.com/grinish21) made their first contribution in go-git/go-git#1022 - [@​prskr](https://github.com/prskr) made their first contribution in go-git/go-git#1018 - [@​dlambda](https://github.com/dlambda) made their first contribution in go-git/go-git#446 - [@​juliens](https://github.com/juliens) made their first contribution in go-git/go-git#366 - [@​onee-only](https://github.com/onee-only) made their first contribution in go-git/go-git#1036 - [@​tim775](https://github.com/tim775) made their first contribution in go-git/go-git#1042 - [@​niukuo](https://github.com/niukuo) made their first contribution in go-git/go-git#967 - [@​avoidalone](https://github.com/avoidalone) made their first contribution in go-git/go-git#1047 **Full Changelog**: go-git/go-git@v5.11.0...v5.12.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - "* 0-3 * * *" (UTC). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS45Mi4wIiwidXBkYXRlZEluVmVyIjoiMzkuOTIuMCIsInRhcmdldEJyYW5jaCI6InYxMC4wL2Zvcmdlam8iLCJsYWJlbHMiOlsiZGVwZW5kZW5jeS11cGdyYWRlIiwidGVzdC9ub3QtbmVlZGVkIl19--> Co-authored-by: Earl Warren <contact@earl-warren.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6496 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Hello,
At work, I use a homemade git client implemented using Go-Git v5.12.
This client tries to clone repos hosted on a gitolite instance through http protocol.
A gitweb server handle the communication between my client and the gitolite server.
When the gitolite server grants access to the repository, it returns such pktlines in its answer:
001e# service=git-upload-pack
000000b5ab0ed9bd726e63e0679491160be72aaae876838b HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done agent=git/1.8.3.1
The length of first pktline (0x001e) is correctly parsed by Go-Git and the clone is done as expected.
However, when the gitolite server doesn't grant access to the repository, it returns such pktlines in its answer:
001E# service=git-upload-pack
00000064ERR FATAL: R any reponame username DENIED by fallthru
(or you mis-spelled the reponame)
You may have notice that the first pktline length (0x001E) is in uppercase.
Go-Git can't handle an uppercase hexadecimal value and returns "invalid pkt-len found".
I would have expected to receive an ErrorLine error with this Text value :
I saw that the Pack and Http Protocols consider a valid hexadecimal digit as:
Is it possible to accept A, B, C, D, E and F as well ?