diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-02-03 16:12:33 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-02-03 16:12:33 -0800 |
| commit | e5a0d5d8bbeed7d0cb21533f9727591e110f50b8 (patch) | |
| tree | d832eac70fdd06842f431101c655390396fa05ce /commit.c | |
| parent | Merge branch 'ds/path-walk-1' into ds/backfill (diff) | |
| parent | The seventh batch (diff) | |
| download | git-e5a0d5d8bbeed7d0cb21533f9727591e110f50b8.tar.gz git-e5a0d5d8bbeed7d0cb21533f9727591e110f50b8.zip | |
Merge branch 'master' into ds/backfill
* master: (446 commits)
The seventh batch
The sixth batch
The fifth batch
The fourth batch
refs/reftable: fix uninitialized memory access of `max_index`
remote: announce removal of "branches/" and "remotes/"
The third batch
hash.h: drop unsafe_ function variants
csum-file: introduce hashfile_checkpoint_init()
t/helper/test-hash.c: use unsafe_hash_algo()
csum-file.c: use unsafe_hash_algo()
hash.h: introduce `unsafe_hash_algo()`
csum-file.c: extract algop from hashfile_checksum_valid()
csum-file: store the hash algorithm as a struct field
t/helper/test-tool: implement sha1-unsafe helper
trace2: prevent segfault on config collection with valueless true
refs: fix creation of reflog entries for symrefs
ci: wire up Visual Studio build with Meson
ci: raise error when Meson generates warnings
meson: fix compilation with Visual Studio
...
Diffstat (limited to 'commit.c')
| -rw-r--r-- | commit.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -276,7 +276,7 @@ static int read_graft_file(struct repository *r, const char *graft_file) "to convert the grafts into replace refs.\n" "\n" "Turn this message off by running\n" - "\"git config advice.graftFileDeprecated false\"")); + "\"git config set advice.graftFileDeprecated false\"")); while (!strbuf_getwholeline(&buf, fp, '\n')) { /* The format is just "Commit Parent1 Parent2 ...\n" */ struct commit_graft *graft = read_graft_line(&buf); @@ -778,11 +778,11 @@ static void clear_commit_marks_1(struct commit_list **plist, } } -void clear_commit_marks_many(int nr, struct commit **commit, unsigned int mark) +void clear_commit_marks_many(size_t nr, struct commit **commit, unsigned int mark) { struct commit_list *list = NULL; - while (nr--) { + for (size_t i = 0; i < nr; i++) { clear_commit_marks_1(&list, *commit, mark); commit++; } @@ -1765,7 +1765,6 @@ int commit_tree_extended(const char *msg, size_t msg_len, { &compat_sig, r->compat_hash_algo }, { &sig, r->hash_algo }, }; - int i; /* * We write algorithms in the order they were implemented in @@ -1779,7 +1778,7 @@ int commit_tree_extended(const char *msg, size_t msg_len, * We traverse each algorithm in order, and apply the signature * to each buffer. */ - for (i = 0; i < ARRAY_SIZE(bufs); i++) { + for (size_t i = 0; i < ARRAY_SIZE(bufs); i++) { if (!bufs[i].algo) continue; add_header_signature(&buffer, bufs[i].sig, bufs[i].algo); |
