Code

gitweb: support for / as home_link.
[git.git] / blame.c
diff --git a/blame.c b/blame.c
index b04b8f58aaf718208ab13e5cbfd8cd2a4444cbd7..c253b9ca45cf7d860052ddae95bc1ed34974ffb8 100644 (file)
--- a/blame.c
+++ b/blame.c
@@ -20,7 +20,7 @@
 
 #define DEBUG 0
 
-static const char blame_usage[] = "[-c] [-l] [-t] [-S <revs-file>] [--] file [commit]\n"
+static const char blame_usage[] = "git-blame [-c] [-l] [-t] [-S <revs-file>] [--] file [commit]\n"
        "  -c, --compatibility Use the same output mode as git-annotate (Default: off)\n"
        "  -l, --long          Show long commit SHA1 (Default: off)\n"
        "  -t, --time          Show raw timestamp (Default: off)\n"
@@ -56,9 +56,9 @@ struct patch {
 static void get_blob(struct commit *commit);
 
 /* Only used for statistics */
-static int num_get_patch = 0;
-static int num_commits = 0;
-static int patch_time = 0;
+static int num_get_patch;
+static int num_commits;
+static int patch_time;
 
 struct blame_diff_state {
        struct xdiff_emit_state xm;
@@ -351,10 +351,7 @@ static int fill_util_info(struct commit *commit)
        assert(util);
        assert(util->pathname);
 
-       if (get_blob_sha1(commit->tree, util->pathname, util->sha1))
-               return 1;
-       else
-               return 0;
+       return !!get_blob_sha1(commit->tree, util->pathname, util->sha1);
 }
 
 static void alloc_line_map(struct commit *commit)
@@ -834,7 +831,7 @@ int main(int argc, const char **argv)
        }
 
 
-       init_revisions(&rev);
+       init_revisions(&rev, setup_git_directory());
        rev.remove_empty_trees = 1;
        rev.topo_order = 1;
        rev.prune_fn = simplify_commit;