]> granicus.if.org Git - cgit/commitdiff
Merge branch 'jh/path-limit'
authorLars Hjemli <hjemli@gmail.com>
Tue, 22 Jun 2010 14:15:48 +0000 (16:15 +0200)
committerLars Hjemli <hjemli@gmail.com>
Tue, 22 Jun 2010 14:15:48 +0000 (16:15 +0200)
Conflicts:
cgit.h
ui-commit.c

1  2 
cgit.c
cgit.css
cgit.h
cgitrc.5.txt
cmd.c
shared.c
ui-commit.c

diff --cc cgit.c
Simple merge
diff --cc cgit.css
Simple merge
diff --cc cgit.h
index 8884f9e500dddb7d403ed1877217d8f3600bb041,f990b1506e29cdc10e89697041da06959319fdaa..80c3902b5e5dec8e16b6b2bbaf60207ada344854
--- 1/cgit.h
--- 2/cgit.h
+++ b/cgit.h
@@@ -146,7 -145,7 +146,8 @@@ struct cgit_query 
        char *sort;
        int showmsg;
        int ssdiff;
 +      int show_all;
+       char *vpath;
  };
  
  struct cgit_config {
diff --cc cgitrc.5.txt
Simple merge
diff --cc cmd.c
Simple merge
diff --cc shared.c
Simple merge
diff --cc ui-commit.c
index 41313b9d7d08fb6b5fa17f4d3bfa73db04ba50e2,2d98ed9ea956cef5f71272e1473293c0c1b32338..a11bc5f3b00d21368c3ba826e7060aeb14de83d7
  #include "ui-diff.h"
  #include "ui-log.h"
  
- void cgit_print_commit(char *hex)
+ void cgit_print_commit(char *hex, const char *prefix)
  {
        struct commit *commit, *parent;
 -      struct commitinfo *info;
 +      struct commitinfo *info, *parent_info;
        struct commit_list *p;
        unsigned char sha1[20];
 -      char *tmp;
 +      char *tmp, *tmp2;
        int parents = 0;
  
        if (!hex)
                }
                html("<tr><th>parent</th>"
                     "<td colspan='2' class='sha1'>");
 -              cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL,
 -                               ctx.qry.head,
 -                               sha1_to_hex(p->item->object.sha1), prefix, 0);
 +              tmp = tmp2 = sha1_to_hex(p->item->object.sha1);
 +              if (ctx.repo->enable_subject_links) {
 +                      parent_info = cgit_parse_commit(parent);
 +                      tmp2 = parent_info->subject;
 +              }
-               cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, 0);
++              cgit_commit_link(tmp2, NULL, NULL, ctx.qry.head, tmp, prefix, 0);
                html(" (");
                cgit_diff_link("diff", NULL, NULL, ctx.qry.head, hex,
-                              sha1_to_hex(p->item->object.sha1), NULL, 0);
+                              sha1_to_hex(p->item->object.sha1), prefix, 0);
                html(")</td></tr>");
                parents++;
        }