summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2006-06-21gitweb: Make use of $PATH_INFO for project parameterLibravatar Jakub Narebski1-1/+2
Allow to have project name in the path part of URL, just after the name of script. For example instead of gitweb.cgi?p=git.git you can write gitweb.cgi/git.git or gitweb.cgi/git.git/ Not used in URLs inside gitweb; it means that the above alternate syntax must be generated by hand, at least for now. Side effect: project name parameter is now stripped of leading and trailing slash before validation. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-21Move $gitbin earlier in gitweb.cgiLibravatar Jakub Narebski1-3/+3
(cherry picked from 9dca843086356b964f27d8fabe1e3c48074a9f02 commit) Signed-off-by: Jakub Narebski <jnareb.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-21Add git version to gitweb outputLibravatar Jakub Narebski1-2/+11
Add git-core binaries used version as the comment at the beginning of HTML output, just below the comment with version of git web interface version. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-21gitweb: whitespace cleanupLibravatar Jakub Narebski2-21/+21
Do not use tabs to align variable initialization (actually use tabs only at the beginning of line, for code indent). Remove trailing whitespace. Make whitespace usage more consistent. Signed-off-by: Jakub Narebski <jnareb.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-20gitweb: style done with stylesheetLibravatar Jakub Narebski2-154/+246
Replace (almost) all 'style' attributes with 'class' attribute and adding rule to CSS file. Some tables use CSS for styling instead of legacy styling attributes. [jc: too many rejects -- hand fixed and reindented]
2006-06-20gitweb: A couple of page title tweakingLibravatar Jakub Narebski1-0/+6
[jc: the e-mailed patch did not apply, so I had to guess but I think I got the result right.]
2006-06-20Fix: Support for the standard mime.types map in gitwebLibravatar Jakub Narebski1-1/+1
Temporary fix: commented out offending line in mimetype_guess. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19gitweb: add type="text/css" to stylesheet linkLibravatar Jakub Narebski1-2/+2
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19Make CSS file gitweb/gitweb.css more readableLibravatar Jakub Narebski1-50/+222
Taken from git://git.xmms.se/xmms2/gitweb-xmms2.git commit 561262030d58a6325f500b36d836dbe02a5abc68 "Make CSS readable" by Daniel Svensson, with extra parts removed and consistent whitespace usage. [jc: tabified the results to cleaning things up, and removed an added item that was commented out. ] Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Fix gitweb stylesheetLibravatar Jakub Narebski1-0/+4
An earlier commit forgot to move some piece from the CGI script to the external stylesheet. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Support for the standard mime.types map in gitwebLibravatar Petr Baudis1-0/+44
gitweb will try to look up the filename mimetype in /etc/mime.types and optionally a user-configured mime.types map as well. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18gitweb: text files for 'blob_plain' action without charset by defaultLibravatar Jakub Narebski1-3/+3
$default_text_plain_charset is undefined (no specified charset) by default. Additionally ':raw' layer for binmode is used for outputting file content. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18gitweb: safely output binary files for 'blob_plain' actionLibravatar Jakub Narebski1-4/+39
gitweb tries now to output correct Content-Type header for 'blob_plain' action; for now text/plain for text files, appropriate image MIME type for *.png, *.gif and *.jpg/*.jpeg files, and application/octet-stream for other binary files. Introduced new configuration variables: $default_blob_plain_mimetype and $default_text_plain_charset (only 'utf-8' is guaranteed to work for the latter). binmode changed to ':raw' in git_blob_plain for output of non-text files. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Move gitweb style to gitweb.cssLibravatar Jakub Narebski2-60/+58
Move gitweb style from embedded <style> element in gitweb/gitweb.cgi to external CSS file gitweb/gitweb.css. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Merge branch 'yl/build'Libravatar Junio C Hamano1-8/+20
* yl/build: auto-detect changed prefix and/or changed build flags
2006-06-18Merge branch 'jc/shared'Libravatar Junio C Hamano5-7/+47
* jc/shared: shared repository: optionally allow reading to "others".
2006-06-18Merge branch 'eb/mail'Libravatar Junio C Hamano1-2/+5
* eb/mail: Fix git-format-patch -s
2006-06-18Fix PPC SHA1 routine for large input buffersLibravatar Paul Mackerras1-1/+1
The PPC SHA1 routine had an overflow which meant that it gave incorrect results for input buffers >= 512MB. This fixes it by ensuring that the update of the total length in bits is done using 64-bit arithmetic. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Make t8001-annotate and t8002-blame more portableLibravatar Dennis Stosberg1-3/+1
These two tests assume that "sed" will not modify the final line of a stream if it does not end with a newline character. The assumption is not true at least for FreeBSD and Solaris 9. FreeBSD's "sed" appends a newline character; "sed" in Solaris 9 even removes the incomplete final line. This patch makes the test use perl instead. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Remove "refs" field from "struct object"Libravatar Linus Torvalds5-74/+149
This shrinks "struct object" to the absolutely minimal size possible. It now contains /only/ the object flags and the SHA1 hash name of the object. The "refs" field, which is really needed only for fsck, is maintained in a separate hashed lookup-table, allowing all normal users to totally ignore it. This helps memory usage, although not as much as I hoped: it looks like the allocation overhead of malloc (and the alignment constraints in particular) means that while the structure size shrinks, the actual allocation overhead mostly does not. [ That said: memory usage is actually down, but not as much as it should be: I suspect just one of the object types actually ended up shrinking its effective allocation size. To get to the next level, we probably need specialized allocators that don't pad the allocation more than necessary. ] The separation makes for some code cleanup, though, and makes the ref tracking that fsck wants a clearly separate thing. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18Make release tarballs friendlier to older tar versionsLibravatar Rene Scharfe1-1/+1
git-tar-tree adds an extended pax header to archives if its first parameter points to a commit. It confuses older tars and isn't very useful in the case of git anyway, so stop doing it. Idea: Junio, implementation: Junio. I just wrote it up. :-) Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18git-tar-tree: no more void pointer arithmeticLibravatar Rene Scharfe1-2/+5
Noticed by Florian Forster: Use a char pointer when adding offsets, because void pointer arithmetic is a GNU extension. Const'ify the function arguments while we're at it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18git-tar-tree: documentation updateLibravatar Rene Scharfe1-5/+10
* add example on how to avoid adding a global extended pax header * don't mention linux anymore, use git itself as an example instead * update to v1.4.0 ;-) * append missing :: to the examples Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-18git-tar-tree: Simplify write_trailer()Libravatar Rene Scharfe1-25/+15
We can write the trailer in one or at most two steps; it will always fit within two blocks. With the last caller of get_record() gone we can get rid of it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17auto-detect changed prefix and/or changed build flagsLibravatar Yakov Lerner1-8/+20
Detect changed prefix and/or changed build flags in the middle of the build (or between 'make' and 'make install'), and if change is detected, make sure all objects are compiled with same build flags and same prefix, thus avoiding inconsistent/broken build. [jc: removed otherwise unnecessary Makefile target to test the change this patch introduces. ] Signed-off-by: Yakov Lerner <iler.ml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Fix git-format-patch -sLibravatar Eric W. Biederman1-2/+5
When git-format-patch was converted to a builtin an appropriate call to setup_ident was missed and thus git-format-patch -s fails because it doesn't look up anything in the password file. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Some more memory leak avoidanceLibravatar Linus Torvalds3-2/+14
This is really the dregs of my effort to not waste memory in git-rev-list, and makes barely one percent of a difference in the memory footprint, but hey, it's also a pretty small patch. It discards the parent lists and the commit buffer after the commit has been shown by git-rev-list (and "git log" - which already did the commit buffer part), and frees the commit list entry that was used by the revision walker. The big win would be to get rid of the "refs" pointer in the object structure (another 5%), because it's only used by fsck. That would require some pretty major surgery to fsck, though, so I'm timid and did the less interesting but much easier part instead. This (percentually) makes a bigger difference to "git log" and friends, since those are walking _just_ commits, and thus the list entries tend to be a bigger percentage of the memory use. But the "list all objects" case does improve too. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Move "void *util" from "struct object" into "struct commit"Libravatar Linus Torvalds6-42/+48
Every single user actually wanted this only for commit objects, and we have no reason to waste space on it for other object types. So just move the structure member from the low-level "struct object" into the "struct commit". This leaves the commit object the same size, and removes one unnecessary pointer from all other object allocations. This shrinks memory usage (still at a fairly hefty half-gig, admittedly) of "git-rev-list --all --objects" on the mozilla repo by another 5% in my tests. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Shrink "struct object" a bitLibravatar Linus Torvalds21-96/+113
This shrinks "struct object" by a small amount, by getting rid of the "struct type *" pointer and replacing it with a 3-bit bitfield instead. In addition, we merge the bitfields and the "flags" field, which incidentally should also remove a useless 4-byte padding from the object when in 64-bit mode. Now, our "struct object" is still too damn large, but it's now less obviously bloated, and of the remaining fields, only the "util" (which is not used by most things) is clearly something that should be eventually discarded. This shrinks the "git-rev-list --all" memory use by about 2.5% on the kernel archive (and, perhaps more importantly, on the larger mozilla archive). That may not sound like much, but I suspect it's more on a 64-bit platform. There are other remaining inefficiencies (the parent lists, for example, probably have horrible malloc overhead), but this was pretty obvious. Most of the patch is just changing the comparison of the "type" pointer from one of the constant string pointers to the appropriate new TYPE_xxx small integer constant. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Merge early part of branch 'jc/fetchupload'Libravatar Junio C Hamano1-0/+16
2006-06-17Merge branch 'jc/rw-prefix'Libravatar Junio C Hamano7-13/+141
* jc/rw-prefix: read-tree: reorganize bind_merge code. write-tree: --prefix=<path> read-tree: --prefix=<path>/ option.
2006-06-17Merge branch 'pe/date'Libravatar Junio C Hamano1-1/+1
* pe/date: date.c: improve guess between timezone offset and year.
2006-06-17mailinfo: ignore blanks after in-body headers.Libravatar Junio C Hamano1-8/+14
[jc: this is based on Eric's patch but also fixes up the parsed subject headers]. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Don't parse any headers in the real body of an email message.Libravatar Eric W. Biederman1-0/+2
It was pointed out that the current behaviour might mispart a patch comment so remove this behaviour for now. [jc: this fixes "From: line in the middle" check in t5100 test.] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17t5100: mailinfo and mailsplit tests.Libravatar Junio C Hamano17-0/+626
Currently the test passes with 1.3.3 but not with the tip of "master". This is to verify the fixes from Eric W Biedermann. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Make t4101-apply-nonl bring along its patchesLibravatar Dennis Stosberg13-5/+89
Some versions of "diff" (e.g. on FreeBSD and older Linux systems) do not support the "\ No newline at end of file" remark and are not able to generate the patches needed for this test. This lets the test fail, although git-apply is working perfectly. This patch adds the pre-generated patches to t/t4100/ and makes the test use them. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17Update gitweb README: gitweb is now included with gitLibravatar Jakub Narebski1-8/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-17git-cvsexportcommit.perl: fix typoLibravatar Sven Verdoolaege1-1/+1
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16gitweb.cgi history not shownLibravatar Linus Torvalds3-1/+8
This does: - add a "rev.simplify_history" flag which defaults to on - it turns it off for "git whatchanged" (which thus now has real semantics outside of "git log") - it adds a command line flag ("--full-history") to turn it off for others (ie you can make "git log" and "gitk" etc get the semantics if you want to. Now, just as an example of _why_ you really really really want to simplify history by default, apply this patch, install it, and try these two command lines: gitk --full-history -- git.c gitk -- git.c and compare the output. So with this, you can also now do git whatchanged -p -- gitweb.cgi git log -p --full-history -- gitweb.cgi and it will show the old history of gitweb.cgi, even though it's not relevant to the _current_ state of the name "gitweb.cgi" NOTE NOTE NOTE! It will still actually simplify away merges that didn't change anything at all into either child. That creates these bogus strange discontinuities if you look at it with "gitk" (look at the --full-history gitk output for git.c, and you'll see a few strange cases). So the whole "--parent" thing ends up somewhat bogus with --full-history because of this, but I'm not sure it's worth even worrying about. I don't think you'd ever want to really use "--full-history" with the graphical representation, I just give it as an example exactly to show _why_ doing so would be insane. I think this is trivial enough and useful enough to be worth merging into the stable branch. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16Implement safe_strncpy() as strlcpy() and use it more.Libravatar Peter Eriksen9-27/+28
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16gitweb: Make the `blame' interface in gitweb optional.Libravatar Florian Forster1-2/+25
Since `git-annotate' is an expensive operation to run it may be desirable to deactivate this functionality. This patch introduces the `gitweb.blame' option to git-repo-config and disables the blame support by default. Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16gitweb: Adding a `blame' interface.Libravatar Florian Forster1-1/+107
This patch adds an interface for `git-blame' to `gitweb.cgi'. Links to it are placed in `git_blob'. Internally the code uses `git-annotate' because `git-blame's output differs for files that have been renamed in the past. However, I like the term `blame' better. [jc: blame can be told to produce the compatible format btw...] Signed-off-by: Florian Forster <octo@verplant.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16cvsimport: keep one index per branch during importLibravatar Martin Langhoff1-7/+30
With this patch we have a speedup and much lower IO when importing trees with many branches. Instead of forcing index re-population for each branch switch, we keep many index files around, one per branch. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16cvsimport: complete the cvsps run before starting the importLibravatar Martin Langhoff1-14/+28
We now capture the output of cvsps to a tempfile, and then read it in. cvsps 2.1 works quite a bit "in memory", and only prints its patchset info once it has finished talking with cvs, but apparently retaining all that memory allocation. With this patch, cvsps is finished and reaped before cvsimport start working (and growing). So the footprint of the whole process is much lower. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16cvsimport: ignore CVSPS_NO_BRANCH and impossible branchesLibravatar Martin Langhoff1-1/+16
cvsps output often contains references to CVSPS_NO_BRANCH, commits that it could not trace to a branch. Ignore that branch. Additionally, cvsps will sometimes draw circular relationships between branches -- where two branches are recorded as opening from the other. In those cases, and where the ancestor branch hasn't been seen, ignore it. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16blame: Add --time to produce raw timestampsLibravatar Fredrik Kuivinen2-5/+24
fix the usage string and clean up the docs while we are at it Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16fix git aliasLibravatar Junio C Hamano1-3/+3
When extra command line arguments are given to a command that was alias-expanded, the code generated a wrong argument list, leaving the original alias in the result, and forgetting to terminate the new argv list. Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-16Add a "--notags" option for git-p4import.Libravatar Sean2-5/+12
P4import currently creates a git tag for every commit it imports. When importing from a large repository too many tags can be created for git to manage, so this provides an option to shut that feature off if necessary. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>
2006-06-16Merge git://git.bogomips.org/git-svnLibravatar Junio C Hamano5-297/+2150
* git://git.bogomips.org/git-svn: (25 commits) git-svn: rebuild convenience and bugfixes git-svn: svn (command-line) 1.0.x compatibility git-svn: tests no longer fail if LC_ALL is not a UTF-8 locale git-svn: bugfix and optimize the 'log' command git-svn: Eliminate temp file usage in libsvn_get_file() git-svn: fix several small bugs, enable branch optimization git-svn: avoid creating some small files git-svn: make the $GIT_DIR/svn/*/revs directory obsolete git-svn: add support for Perl SVN::* libraries git-svn: add 'log' command, a facsimile of basic `svn log' git-svn: add UTF-8 message test git-svn: add some functionality to better support branches in svn git-svn: add --shared and --template= options to pass to init-db git-svn: add --repack and --repack-flags= options git-svn: minor cleanups, extra error-checking git-svn: Move all git-svn-related paths into $GIT_DIR/svn git-svn: support manually placed initial trees from fetch git-svn: optimize --branch and --branch-all-ref git-svn: --branch-all-refs / -B support git-svn: support -C<num> passing to git-diff-tree ...
2006-06-16git-svn: rebuild convenience and bugfixesLibravatar Eric Wong1-2/+19
We will now automatically fetch the refs/remotes/git-svn ref from origin and store a Pull: line for it. --remote=<origin> may be passed if your remote is named something other than 'origin' Also, remember to make GIT_SVN_DIR whenever we need to create .rev_db Signed-off-by: Eric Wong <normalperson@yhbt.net>