mirror of
https://github.com/git/git.git
synced 2026-01-18 14:44:28 +00:00
Merge branch 'master' into next
* master: Indentation fix. Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length.
This commit is contained in:
14
commit.c
14
commit.c
@@ -7,15 +7,15 @@ int save_commit_buffer = 1;
|
||||
struct sort_node
|
||||
{
|
||||
/*
|
||||
* the number of children of the associated commit
|
||||
* that also occur in the list being sorted.
|
||||
*/
|
||||
* the number of children of the associated commit
|
||||
* that also occur in the list being sorted.
|
||||
*/
|
||||
unsigned int indegree;
|
||||
|
||||
/*
|
||||
* reference to original list item that we will re-use
|
||||
* on output.
|
||||
*/
|
||||
* reference to original list item that we will re-use
|
||||
* on output.
|
||||
*/
|
||||
struct commit_list * list_item;
|
||||
|
||||
};
|
||||
@@ -123,7 +123,7 @@ static int commit_graft_pos(const unsigned char *sha1)
|
||||
while (lo < hi) {
|
||||
int mi = (lo + hi) / 2;
|
||||
struct commit_graft *graft = commit_graft[mi];
|
||||
int cmp = memcmp(sha1, graft->sha1, 20);
|
||||
int cmp = hashcmp(sha1, graft->sha1);
|
||||
if (!cmp)
|
||||
return mi;
|
||||
if (cmp < 0)
|
||||
|
||||
Reference in New Issue
Block a user