Code

Merge branch 'jc/submittingpatches'
[git.git] / builtin-blame.c
index 5466d01f9a5917dbba4108669ee4513b581ff2c9..c7e68874e7f02ac150343ab6d7a0aa95601f2ba3 100644 (file)
@@ -125,7 +125,6 @@ static void origin_decref(struct origin *o)
        if (o && --o->refcnt <= 0) {
                if (o->file.ptr)
                        free(o->file.ptr);
-               memset(o, 0, sizeof(*o));
                free(o);
        }
 }
@@ -542,7 +541,7 @@ static struct patch *compare_buffer(mmfile_t *file_p, mmfile_t *file_o,
        state.ret->chunks = NULL;
        state.ret->num = 0;
 
-       xdl_diff(file_p, file_o, &xpp, &xecfg, &ecb);
+       xdi_diff(file_p, file_o, &xpp, &xecfg, &ecb);
 
        if (state.ret->num) {
                struct chunk *chunk;
@@ -607,7 +606,7 @@ static void add_blame_entry(struct scoreboard *sb, struct blame_entry *e)
 
 /*
  * src typically is on-stack; we want to copy the information in it to
- * an malloced blame_entry that is already on the linked list of the
+ * a malloced blame_entry that is already on the linked list of the
  * scoreboard.  The origin of dst loses a refcnt while the origin of src
  * gains one.
  */
@@ -2093,7 +2092,7 @@ static struct commit *fake_working_tree_commit(const char *path, const char *con
        if (!mode) {
                int pos = cache_name_pos(path, len);
                if (0 <= pos)
-                       mode = ntohl(active_cache[pos]->ce_mode);
+                       mode = active_cache[pos]->ce_mode;
                else
                        /* Let's not bother reading from HEAD tree */
                        mode = S_IFREG | 0644;