[PATCH v2] Make default pages configurable

jean-christophe manciot actionmystique at gmail.com
Tue Aug 20 11:09:46 CEST 2019


>
> Sorry, that's on your end. If you're using the Gmail web interface,
> make sure to click "Show original" before you copy-and-paste, as Gmail
> tends to add buttons and mangle messages in various ways.
>

   -  "Show original" displays an encrypted message
   - the patch from a non-gmail source
   <https://www.mail-archive.com/cgit@lists.zx2c4.com/msg02904.html> after
   removing the non-original added new lines (as *attached below*) raises
   multiple issues, maybe because all tabulations have been replaced by
   spaces:

*git checkout -f v1.2.1-24-ge1ad15d*
*git apply --verbose ../default-pages.patch*
Checking patch cgit.c...
error: while searching for:
               repo->homepage = xstrdup(value);
       else if (!strcmp(name, "defbranch"))
               repo->defbranch = xstrdup(value);
       else if (!strcmp(name, "extra-head-content"))
               repo->extra_head_content = xstrdup(value);
       else if (!strcmp(name, "snapshots"))

error: patch failed: cgit.c:46
error: cgit.c: patch does not apply
Checking patch cgit.h...
error: while searching for:
       char *owner;
       char *homepage;
       char *defbranch;
       char *module_link;
       struct string_list readme;
       char *section;

error: patch failed: cgit.h:86
error: cgit.h: patch does not apply
Checking patch cgitrc.5.txt...
error: while searching for:
       Url which specifies the css document to include in all cgit pages.
       Default value: "/cgit.css".

email-filter::
       Specifies a command which will be invoked to format names and email
       address of committers, authors, and taggers, as represented in
various

error: patch failed: cgitrc.5.txt:128
error: cgitrc.5.txt: patch does not apply
Checking patch cmd.c...
error: while searching for:
                       free(redirect);
               } else if (ctx.repo->readme.nr)
                       cgit_print_repo_readme(ctx.qry.path);
               else if (ctx.repo->homepage)
                       cgit_redirect(ctx.repo->homepage, false);
               else {
                       char *currenturl = cgit_currenturl();
                       char *redirect = fmtalloc("%s../", currenturl);
                       cgit_redirect(redirect, false);
                       free(currenturl);
                       free(redirect);
               }
       } else

error: patch failed: cmd.c:51
error: cmd.c: patch does not apply
Checking patch ui-repolist.c...
error: while searching for:
               }
               htmlf("<tr><td class='%s'>",
                     !sorted && section ? "sublevel-repo" :
"toplevel-repo");
               cgit_summary_link(ctx.repo->name, ctx.repo->name, NULL,
NULL);
               html("</td><td>");
               repourl = cgit_repourl(ctx.repo->url);
               html_link_open(repourl, NULL, NULL);

error: patch failed: ui-repolist.c:321
error: ui-repolist.c: patch does not apply
Checking patch ui-shared.c...
error: while searching for:
       html("</a>");
}

void cgit_summary_link(const char *name, const char *title, const char
*class,
                      const char *head)
{
       reporevlink(NULL, name, title, class, head, NULL, NULL);
}

void cgit_tag_link(const char *name, const char *title, const char *class,

error: patch failed: ui-shared.c:327
error: ui-shared.c: patch does not apply
Checking patch ui-shared.h...
error: while searching for:

extern void cgit_index_link(const char *name, const char *title,
                           const char *class, const char *pattern, const
char *sort, int ofs, int always_root);
extern void cgit_summary_link(const char *name, const char *title,
                             const char *class, const char *head);
extern void cgit_tag_link(const char *name, const char *title,

error: patch failed: ui-shared.h:17
error: ui-shared.h: patch does not apply

Could you attach the correct patch in your answer that we could apply to
the latest master commit?

--
Jean-Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190820/819ce838/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default-pages.patch
Type: text/x-patch
Size: 9941 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190820/819ce838/attachment.bin>


More information about the CGit mailing list