1. 09 11月, 2006 4 次提交
    • J
      2b2a8c78
    • J
      gitweb: New improved patchset view · 744d0ac3
      Jakub Narebski 提交于
      Replace "gitweb diff header" with its full sha1 of blobs and replace
      it by "git diff" header and extended diff header. Change also somewhat
      highlighting of diffs.
      
      Added `file_type_long' subroutine to convert file mode in octal to
      file type description (only for file modes which used by git).
      
      Changes:
      * "gitweb diff header" which looked for example like below:
          file:_<sha1 before>_ -> file:_<sha1 after>_
        where 'file' is file type and '<sha1>' is full sha1 of blob is
        changed to
          diff --git _a/<file before>_ _b/<file after>_
        In both cases links are visible and use default link style. If file
        is added, a/<file> is not hyperlinked. If file is deleted, b/<file>
        is not hyperlinked.
      * there is added "extended diff header", with <path> and <hash>
        hyperlinked (and <hash> shortened to 7 characters), and <mode>
        explained: '<mode>' is extended to '<mode> (<file type description>)',
        where added text is slightly lighter to easy distinguish that it
        was added (and it is difference from git-diff output).
      * from-file/to-file two-line header lines have slightly darker color
        than removed/added lines.
      * chunk header has now delicate line above for easier finding chunk
        boundary, and top margin of 2px, both barely visible.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      744d0ac3
    • J
      gitweb: Use character or octal escape codes (and add span.cntrl) in esc_path · 1d3bc0cc
      Jakub Narebski 提交于
      Instead of simply hiding control characters in esc_path by replacing
      them with '?', use Character Escape Codes (CEC) i.e. alphabetic
      backslash sequences like those found in C programming language and
      many other languages influenced by it, such as Java and Perl.  If
      control characted doesn't have corresponding character escape code,
      use octal char sequence to escape it.
      
      Alternatively, controls can be replaced with Unicode Control
      Pictures U+2400 - U+243F (9216 - 9279), the Unicode characters
      reserved for representing control characters when it is
      necessary to print or display them.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1d3bc0cc
    • J
      gitweb: Better git-unquoting and gitweb-quoting of pathnames · 403d0906
      Jakub Narebski 提交于
      Extend unquote subroutine, which unquotes quoted and escaped filenames
      which git may return, to deal not only with octal char sequence
      quoting, but also quoting ordinary characters including '\"' and '\\'
      which are respectively quoted '"' and '\', and to deal also with
      C escape sequences including '\t' for TAB and '\n' for LF.
      
      Add esc_path subroutine for gitweb quoting and HTML escaping filenames
      (currently it does equivalent of ls' --hide-control-chars, which means
      showing undisplayable characters (including '\n' and '\t') as '?'
      (question mark) character, and use 'span' element with cntrl CSS class
      to help rendering them differently.
      
      Convert gitweb to use esc_path correctly to print pathnames.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      403d0906
  2. 08 11月, 2006 2 次提交
    • J
      gitweb: minimally fix "fork" support. · 83ee94c1
      Junio C Hamano 提交于
      A forked project is defined to be $projname/$forkname.git for
      $projname.git; the code did not check this correctly and mistook
      $projname/.git to be a fork of itself.  This minimally fixes the
      breakage.
      
      Also forks were not checked when index.aux file was in use.
      Listing the forked ones in index.aux would show them also on the
      toplevel index which may go against the hierarchical nature of
      forks, but again this is a minimal fix to whip it in a better
      shape suitable to be in the 'master' branch.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      83ee94c1
    • J
      gitweb: fix disabling of "forks" · 5dd5ed09
      Junio C Hamano 提交于
      Apparently this code was never tested without "forks".  check-feature
      returns a one-element list (0) when disabled, and assigning that to a
      scalar variable made it to be called in a scalar context, which meant
      my $check_forks = gitweb_check_feature("forks") were always 1!
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5dd5ed09
  3. 04 11月, 2006 1 次提交
  4. 03 11月, 2006 3 次提交
    • J
      gitweb: Better support for non-CSS aware web browsers · 6255ef08
      Jakub Narebski 提交于
      Add option to replace SPC (' ') with hard (non-breakable) space HTML
      entity '&nbsp;' in esc_html subroutine.
      
      Replace ' ' with '&nbsp;' for the code/diff display part in git_blob
      and git_patchset_body; this is to be able to view code and diffs in
      web browsers which doesn't understand "white-space: pre;" CSS
      declaration.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6255ef08
    • J
      gitweb: Output also empty patches in "commitdiff" view · 241cc599
      Jakub Narebski 提交于
      Remove skipping over empty patches (i.e. patches which consist solely
      of extended headers) in git_patchset_body, and add links to those
      header-only patches in git_difftree_body (but not generate blobdiff
      links when there were no change in file contents).
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      241cc599
    • J
      gitweb: Use git-for-each-ref to generate list of heads and/or tags · cd146408
      Jakub Narebski 提交于
      Add two subroutines: git_get_heads_list and git_get_refs_list, which
      fill out needed parts of refs info (heads and tags respectively) info
      using single call to git-for-each-ref, instead of using
      git-peek-remote to get list of references and using parse_ref for each
      ref to get ref info, which in turn uses at least one call of git
      command.
      
      Replace call to git_get_refs_list in git_summary by call to
      git_get_references, git_get_heads_list and git_get_tags_list
      (simplifying this subroutine a bit). Use git_get_heads_list in
      git_heads and git_get_tags_list in git_tags. Modify git_tags_body
      slightly to accept output from git_get_tags_list.
      
      Remove no longer used, and a bit hackish, git_get_refs_list.
      parse_ref is no longer used, but is left for now.
      
      Generating "summary" and "tags" views should be much faster for
      projects which have large number of tags.
      
      CHANGES IN OUTPUT: Before, if ref in refs/tags was tag pointing to
      commit we used committer epoch as epoch for ref, and used tagger epoch
      as epoch only for tag pointing to object of other type. If ref in
      refs/tags was commit, we used committer epoch as epoch for ref (see
      parse_ref; we sorted in gitweb by 'epoch' field).
      
      Currently we use committer epoch for refs pointing to commit objects,
      and tagger epoch for refs pointing to tag object, even if tag points
      to commit.
      
      Simple ab benchmark before and after this patch for my git.git
      repository (git/jnareb-git.git) with some heads and tags added
      as compared to git.git repository, shows around 2.4-3.0 times speedup
      for "summary" and "tags" views:
      
       summary   3134 +/- 24.2 ms  -->   1081 +/- 30.2 ms
       tags      2886 +/- 18.9 ms  -->   1196 +/- 15.6 ms
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cd146408
  5. 02 11月, 2006 3 次提交
  6. 29 10月, 2006 2 次提交
  7. 28 10月, 2006 1 次提交
  8. 27 10月, 2006 1 次提交
  9. 26 10月, 2006 2 次提交
    • J
      gitweb: Use --no-commit-id in git_commit and git_commitdiff · 35f401a6
      Jakub Narebski 提交于
      Use --no-commit-id option to git-diff-tree command in git_commit and
      git_commitdiff to filter out commit ID output that git-diff-tree adds
      when called with only one <tree-ish> (not only for --stdin). Remove
      filtering commit IDs from git-diff-tree output.
      
      This option is in git since at least v1.0.0, so make use of it.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      35f401a6
    • P
      gitweb: Support for 'forks' · e30496df
      Petr Baudis 提交于
      On repo.or.cz, I want to support project 'forks', which are meant
      for repositories which are spinoffs of a given project and share
      its objects database through the alternates mechanism. But another
      (and perhaps even greater) incentive for that is that those 'forked
      projects' do not clutter the main project index but are completely
      grouped inside of the project view.
      
      A forked project is just like a normal project, but given project
      $projectroot/$projname.git, the forked project resides in directory
      $projectroot/$projname/$forkname.git. This is a somewhat arbitrary
      naming rule, but I think that for now it's fine; if someone will need
      something wildly different, let them submit a patch. The 'forked'
      mode is by default off and can be turned on in runtime gitweb
      configuration just like other features.
      
      A project having forks is marked by a '+' (pointing to the list of
      forks) in the project list (this could become some cutesy AJAXy
      DHTML in the future), there is a forks section in the project
      summary similar to the heads and tags sections, and of course
      a forks view which looks the same as the root project list.
      
      Forks can be recursive.
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e30496df
  10. 25 10月, 2006 3 次提交
  11. 24 10月, 2006 5 次提交
  12. 23 10月, 2006 4 次提交
  13. 15 10月, 2006 1 次提交
  14. 12 10月, 2006 2 次提交
  15. 11 10月, 2006 1 次提交
  16. 09 10月, 2006 1 次提交
    • J
      gitweb: Cleanup Git logo and Git logo target generation · 9a7a62ff
      Jakub Narebski 提交于
      Rename $githelp_url and $githelp_label to $logo_url and $logo_label to
      be more obvious what they refer to; while at it add commented out
      previous contents (git documentation at kernel.org). Add comment about
      logo size.
      
      Use $cgi->a(...) to generate Git logo link; it automatically escapes
      attribute values when it is needed.  Escape href attribute using
      esc_url instead of (incorrect!) esc_html.
      
      Move styling of git logo <img> element from "style" attribute to CSS
      via setting class to "logo".  Perhaps we should set it by id rather
      than by class.
      Signed-off-by: NJakub Narebski <jnareb@gmail.com>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9a7a62ff
  17. 08 10月, 2006 1 次提交
  18. 07 10月, 2006 3 次提交