Commit cb2dc0b0f81af446ea7927876a64bc95ab794bff

Ben Straub 2012-06-21T13:37:08

Clone: replace one hardcoded value with another.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/clone.c b/src/clone.c
index cc20b97..2691786 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -73,8 +73,8 @@ static int reference_matches_remote_head(const char *head_name, void *payload)
 
    if (!git_reference_name_to_oid(&oid, head_info->repo, head_name) &&
        !git_oid_cmp(&head_info->remote_head_oid, &oid)) {
-      /* strlen("refs/remotes/origin/") == 20 */
-      git_buf_puts(&head_info->branchname, head_name+20);
+      git_buf_puts(&head_info->branchname,
+                   head_name+strlen("refs/remotes/origin/"));
    }
    return 0;
 }