summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-23 14:18:24 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-23 14:18:24 -0700
commit2ad6ba353aa3815894674a0dee56aa75f8a5fc7b (patch)
tree344307752bbd6c01d424e03eb7a4481012d4bde4 /commit.c
parenteed94a570e0421175d6b4342c0ac48e03ceedf0b (diff)
parenta8e0d16d85fb2ea53775f64549cac2396cd621a6 (diff)
downloadgit-2ad6ba353aa3815894674a0dee56aa75f8a5fc7b.tar.gz
Merge branch 'gl/cleanup' into gl/cleanup-next
* gl/cleanup: (160 commits) Convert memset(hash,0,20) to hashclr(hash). Convert memcpy(a,b,20) to hashcpy(a,b). Fix a comparison bug in diff-delta.c git-send-email: Don't set author_not_sender from Cc: lines Remove unnecessary forward declaration of unpack_entry. Verify we know how to read a pack before trying to using it. Add write_or_die(), a helper function Axe the last ent builtin-mv: readability patch git-mv: fix off-by-one error git-mv: special case destination "." builtin-mv: readability patch Indentation fix. Do not use memcmp(sha1_1, sha1_2, 20) with hardcoded length. gitweb: Uniquify version info output, add meta generator in page header Be nicer if git executable is not installed builtin-grep: remove unused debugging cruft. gitweb: Add support for per project git URLs [PATCH] git-mv: add more path normalization Remove the "delay writing to avoid runtime penalty of racy-git avoidance" ...
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/commit.c b/commit.c
index 77f0ca175c..00bc3de22e 100644
--- a/commit.c
+++ b/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)
@@ -727,10 +727,10 @@ struct commit *pop_commit(struct commit_list **stack)
int count_parents(struct commit * commit)
{
- int count = 0;
+ int count;
struct commit_list * parents = commit->parents;
- for (count=0;parents; parents=parents->next,count++)
- ;
+ for (count = 0; parents; parents = parents->next,count++)
+ ;
return count;
}