Documentation: fix diff.external example
[gitweb.git] / revision.c
index fb9924e5af65bc52db588cb5f9be3654b6a5c962..8dc3ca7bf696c14ad73f4ebe0fe845cba298c20e 100644 (file)
@@ -259,7 +259,7 @@ static int tree_difference = REV_TREE_SAME;
 static void file_add_remove(struct diff_options *options,
                    int addremove, unsigned mode,
                    const unsigned char *sha1,
-                   const char *base, const char *path)
+                   const char *fullpath)
 {
        int diff = REV_TREE_DIFFERENT;
 
@@ -285,7 +285,7 @@ static void file_change(struct diff_options *options,
                 unsigned old_mode, unsigned new_mode,
                 const unsigned char *old_sha1,
                 const unsigned char *new_sha1,
-                const char *base, const char *path)
+                const char *fullpath)
 {
        tree_difference = REV_TREE_DIFFERENT;
        DIFF_OPT_SET(options, HAS_CHANGES);
@@ -1197,12 +1197,17 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
                                revs->verbose_header = 1;
                                continue;
                        }
-                       if (!prefixcmp(arg, "--pretty")) {
+                       if (!strcmp(arg, "--pretty")) {
                                revs->verbose_header = 1;
                                get_commit_format(arg+8, revs);
                                continue;
                        }
-                       if (!prefixcmp(arg, "--graph")) {
+                       if (!prefixcmp(arg, "--pretty=")) {
+                               revs->verbose_header = 1;
+                               get_commit_format(arg+9, revs);
+                               continue;
+                       }
+                       if (!strcmp(arg, "--graph")) {
                                revs->topo_order = 1;
                                revs->rewrite_parents = 1;
                                revs->graph = graph_init(revs);