aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* gitweb: Test if $from_id and $to_id are defined before comparisonJakub Narebski2007-05-12
| | | | | | | | | | | | | | | | Get rid of "Use of uninitialized value in string eq at gitweb/gitweb.perl line 2320" warning caused by the fact that "empty" patches, consisting only of extended git diff header and with patch body empty, such as patch for pure rename, does not have "index" line in extended diff header. For such patches $from_id and $to_id, filled from parsing extended diff header, are undefined. But such patches cannot be continuation patches. Test if $from_id and $to_id are defined before comparing them with $diffinfo. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* git-add: allow path limiting with -uJeff King2007-05-12
| | | | | | | | Rather than updating all working tree paths, we limit ourselves to paths listed on the command line. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
* read-tree -m -u: avoid getting confused by intermediate symlinks.Junio C Hamano2007-05-11
| | | | | | | | | | | | | | | | | | | | When switching from a branch with both x86_64/boot/Makefile and i386/boot/Makefile to another branch that has x86_64/boot as a symlink pointing at ../i386/boot, the code incorrectly removed i386/boot/Makefile. This was because we first removed everything under x86_64/boot to make room to create a symbolic link x86_64/boot, then removed x86_64/boot/Makefile which no longer exists but now is pointing at i386/boot/Makefile, thanks to the symlink we just created. This fixes it by using the has_symlink_leading_path() function introduced previously for git-apply in the checkout codepath. Earlier, "git checkout" was broken in t4122 test due to this bug, and the test had an extra "git reset --hard" as a workaround, which is removed because it is not needed anymore. Signed-off-by: Junio C Hamano <junkio@cox.net>
* apply: do not get confused by symlinks in the middleJunio C Hamano2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | HPA noticed that git-rebase fails when changes involve symlinks in the middle of the hierarchy. Consider: * The tree state before the patch is applied has arch/x86_64/boot as a symlink pointing at ../i386/boot/ * The patch tries to remove arch/x86_64/boot symlink, and create bunch of files there: .gitignore, Makefile, etc. git-apply tries to be careful while applying patches; it never touches the working tree until it is convinced that the patch would apply cleanly. One of the check it does is that when it knows a path is going to be created by the patch, it runs lstat() on the path to make sure it does not exist. This leads to a false alarm. Because we do not touch the working tree before all the check passes, when we try to make sure that arch/x86_64/boot/.gitignore does not exist yet, we haven't removed the arch/x86_64/boot symlink. The lstat() check ends up seeing arch/i386/boot/.gitignore through the yet-to-be-removed symlink, and says "Hey, you already have a file there, but what you fed me is a patch to create a new file. I am not going to clobber what you have in the working tree." We have similar checks to see a file we are going to modify does exist and match the preimage of the diff, which is done by directly opening and reading the file. For a file we are going to delete, we make sure that it does exist and matches what is going to be removed (a removal patch records the full preimage, so we check what you have in your working tree matches it in full -- otherwise we would risk losing your local changes), which again is done by directly opening and reading the file. These checks need to be adjusted so that they are not fooled by symlinks in the middle. - To make sure something does not exist, first lstat(). If it does not exist, it does not, so be happy. If it _does_, we might be getting fooled by a symlink in the middle, so break leading paths and see if there are symlinks involved. When we are checking for a path a/b/c/d, if any of a, a/b, a/b/c is a symlink, then a/b/c/d does _NOT_ exist, for the purpose of our test. This would fix this particular case you saw, and would not add extra overhead in the usual case. - To make sure something already exists, first lstat(). If it does not exist, barf (up to this, we already do). Even if it does seem to exist, we might be getting fooled by a symlink in the middle, so make sure leading paths are not symlinks. This would make the normal codepath much more expensive for deep trees, which is a bit worrisome. This patch implements the first side of the check "making sure it does not exist". The latter "making sure it exists" check is not done yet, so applying the patch in reverse would still fail, but we have to start from somewhere. Signed-off-by: Junio C Hamano <junkio@cox.net>
* Add has_symlink_leading_path() function.Junio C Hamano2007-05-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we are applying a patch that creates a blob at a path, or when we are switching from a branch that does not have a blob at the path to another branch that has one, we need to make sure that there is nothing at the path in the working tree, as such a file is a local modification made by the user that would be lost by the operation. Normally, lstat() on the path and making sure ENOENT is returned is good enough for that purpose. However there is a twist. We may be creating a regular file arch/x86_64/boot/Makefile, while removing an existing symbolic link at arch/x86_64/boot that points at existing ../i386/boot directory that has Makefile in it. We always first check without touching filesystem and then perform the actual operation, so when we verify the new file, arch/x86_64/boot/Makefile, does not exist, we haven't removed the symbolic link arc/x86_64/boot symbolic link yet. lstat() on the file sees through the symbolic link and reports the file is there, which is not what we want. The function has_symlink_leading_path() function takes a path, and sees if any of the leading directory component is a symbolic link. When files in a new directory are created, we tend to process them together because both index and tree are sorted. The function takes advantage of this and allows the caller to cache and reuse which symbolic link on the filesystem caused the function to return true. The calling sequence would be: char last_symlink[PATH_MAX]; *last_symlink = '\0'; for each index entry { if (!lose) continue; if (lstat(it)) if (errno == ENOENT) ; /* happy */ else error; else if (has_symlink_leading_path(it, last_symlink)) ; /* happy */ else error; /* would lose local changes */ unlink_entry(it, last_symlink); } Signed-off-by: Junio C Hamano <junkio@cox.net>
* Minor copyediting on Release Notes for 1.5.2Junio C Hamano2007-05-10
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* GIT v1.5.2-rc3v1.5.2-rc3Junio C Hamano2007-05-10
| | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* Document 'git-log --decorate'Michael Hendricks2007-05-10
| | | | | Signed-off-by: Michael Hendricks <michael@ndrix.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Correct error message in revert/cherry-pickShawn O. Pearce2007-05-10
| | | | | | | | We now write to MERGE_MSG, not .msg. I missed this earlier when I changed the target we write to. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* Merge branch 'master' of git://repo.or.cz/git-guiJunio C Hamano2007-05-10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://repo.or.cz/git-gui: git gui 0.7.0 git-gui: Paperbag fix blame in subdirectory git-gui: Format author/committer times in ISO format git-gui: Cleanup minor nits in blame code git-gui: Generate blame on uncommitted working tree file git-gui: Smarter command line parsing for browser, blame git-gui: Use prefix if blame is run in a subdirectory git-gui: Convert blame to the "class" way of doing things git-gui: Don't attempt to inline array reads in methods git-gui: Convert browser, console to "class" format git-gui: Define a simple class/method system git-gui: Allow shift-{k,j} to select a range of branches to merge git-gui: Call changes "Staged" and "Unstaged" in file list titles.
| * git gui 0.7.0gitgui-0.7.0Shawn O. Pearce2007-05-10
| | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Paperbag fix blame in subdirectoryShawn O. Pearce2007-05-10
| | | | | | | | Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Format author/committer times in ISO formatShawn O. Pearce2007-05-09
| | | | | | | | | | | | This is a simple change to match what gitk does when it shows a commit; we format using ISO dates (yyyy-mm-dd HH:MM:SS). Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Cleanup minor nits in blame codeShawn O. Pearce2007-05-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use [list ...] rather than "", especially when we are talking about values as then they are properly escaped if necessary. Small nit, but probably not a huge deal as the only data being inlined here is Tk paths. Some of the lines in the parser code were longer than 80 characters wide, and they actually were all the same value on the end part of the line. Rather than keeping the mess copied-and-pasted around we can set the last argument into a local variable and reuse it many times. The commit display code was also rather difficult to read on an 80 character wide terminal, so I'm moving it all into a double quoted string that is easier to read. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Generate blame on uncommitted working tree fileShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | If the user doesn't give us a revision parameter to our blame subcommand then we can generate blame against the working tree file by passing the file path off to blame with the --contents argument. In this case we cannot obtain the contents of the file from the ODB; instead we must obtain the contents by reading the working directory file as-is. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Smarter command line parsing for browser, blameShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The browser subcommand now optionally accepts a single revision argument; if no revision argument is supplied then we use the current branch as the tree to browse. This is very common, so its a nice option. Our blame subcommand now tries to perform the same assumptions as the command line git-blame; both the revision and the file are optional. We assume the argument is a filename if the file exists in the working directory, otherwise we assume the argument is a revision name. A -- can be supplied between the two to force parsing, or before the filename to force it to be a filename. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Use prefix if blame is run in a subdirectoryShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | I think it was Andy Parkins who pointed out that git gui blame HEAD f does not work if f is in a subdirectory and we are currently running git-gui within that subdirectory. This is happening because we did not take the user's prefix into account when we computed the file path in the repository. We now assume the prefix as returned by rev-parse --show-prefix is valid and we use that during the command line blame subcommand when we apply the parameters. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Convert blame to the "class" way of doing thingsShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our blame viewer code has historically been a mess simply because the data for multiple viewers was all crammed into a single pair of Tcl arrays. This made the code hard to read and even harder to maintain. Now that we have a slightly better way of tracking the data for our "meta-widgets" we can make use of it here in the blame viewer to cleanup the code and make it easier to work with long term. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Don't attempt to inline array reads in methodsShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | | | If a variable reference to a field is to an array, and it is the only reference to that field in that method we cannot make it an inlined [set foo] call as the regexp was converting the Tcl code wrong. We were producing "[set foo](x)" for "$foo(x)", and that isn't valid Tcl when foo is an array. So we just punt if the only occurance has a ( after it. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Convert browser, console to "class" formatShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | Now that we have a slightly easier method of working with per-widget data we should make use of that technique in our browser and console meta-widgets, as both have a decent amount of information that they store on a per-widget basis and our current approach of handling it is difficult to follow. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Define a simple class/method systemShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As most of the git-gui interface is based upon "meta-widgets" that need to carry around a good deal of state (e.g. console windows, browser windows, blame viewer) we have a good deal of messy code that tries to store this meta-widget state in global arrays, where keys into the array are formed from a union of a unique "object instance id" and the field name. This is a simple class system for Tcl that allows us to hide much of that mess by making Tcl do what it does best; process strings to manipulate its own code during startup. Each object instance is placed into its own namespace. The namespace is created when the object instance is created and the namespace is destroyed when the object instance is removed from the system. Within that namespace we place variables for each field within the class; these variables can themselves be scalar values or full-blown Tcl arrays. A simple class might be defined as: class map { field data field size 0 constructor {} { return $this } method set {name value} { set data($name) $value incr size } method size {} { return $size } ifdeleted { return 0 } } All fields must be declared before any constructors or methods. This allows our class to generate a list of the fields so it can properly alter the definition of the constructor and method bodies prior to passing them off to Tcl for definition with proc. A field may optionally be given a default/initial value. This can only be done for non-array type fields. Constructors are given full access to all fields of the class, so they can initialize the data values. The default values of fields (if any) are set before the constructor runs, and the implicit local variable $this is initialized to the instance identifier. Methods are given access to fields they actually use in their body. Every method has an implicit "this" argument inserted as its first parameter; callers of methods must be sure they supply this value. Some basic optimization tricks are performed (but not much). We try to only upvar (locally bind) fields that are accessed within a method, but we err on the side of caution and may upvar more than we need to. If a variable is accessed only once within a method and that access is by $foo (read) we avoid the upvar and instead use [set foo] to obtain the value. This is slightly faster as Tcl does not need to lookup the variable twice. We also offer some small syntatic sugar for interacting with Tk and the fileevent callback system in Tcl. If a field (say "foo") is used as "@foo" we insert instead the true global variable name of that variable into the body of the constructor or method. This allows easy binding to Tk textvariable options, e.g.: label $w.title -textvariable @title Proper namespace callbacks can also be setup with the special cb proc that is defined in each namespace. [cb _foo a] will invoke the method _foo in the current namespace, passing it $this as the first (implied) parameter and a as the second parameter. This makes it very simple to connect an object instance to a -command option for a Tk widget or to a fileevent readable or writable for a file channel. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * git-gui: Allow shift-{k,j} to select a range of branches to mergeShawn O. Pearce2007-05-08
| | | | | | | | | | | | | | | | I found it useful to be able to use j/k (vi-like keys) to move up and down the list of branches to merge and shift-j/k to do the selection, much as shift-up/down (arrow keys) would alter the selection. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| * Merge branch 'maint'Shawn O. Pearce2007-05-08
| |\ | | | | | | | | | * maint: git-gui: Call changes "Staged" and "Unstaged" in file list titles.
| | * git-gui: Call changes "Staged" and "Unstaged" in file list titles.Johannes Sixt2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | All menu entries talk about "staging" and "unstaging" changes, but the titles of the file lists use different wording, which may confuse newcomers. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | Merge branch 'maint'Junio C Hamano2007-05-10
|\ \ \ | | | | | | | | | | | | | | | | | | | | * maint: Fix documentation of tag in git-fast-import.txt Properly handle '0' filenames in import-tars
| * \ \ Merge branch 'maint' of git://repo.or.cz/git/fastimport into maintJunio C Hamano2007-05-10
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * 'maint' of git://repo.or.cz/git/fastimport: Fix documentation of tag in git-fast-import.txt Properly handle '0' filenames in import-tars
| | * | | Fix documentation of tag in git-fast-import.txtRichard P. Curnow2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tag command does not take a trailing LF. Signed-off-by: Richard P. Curnow <rc@rc0.org.uk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
| | * | | Merge branch 'gfi-maint' into maintShawn O. Pearce2007-05-10
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * gfi-maint: Properly handle '0' filenames in import-tars
| | | * | | Properly handle '0' filenames in import-tarsShawn O. Pearce2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Randal L. Schwartz pointed out multiple times that we should be testing the length of the name string here, not if it is "true". The problem is the string '0' is actually false in Perl when we try to evaluate it in this context, as '0' is 0 numerically and the number 0 is treated as a false value. This would cause us to break out of the import loop early if anyone had a file or directory named "0". Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | | | | | gitweb: Do not use absolute font sizesPetr Baudis2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid specifying font sizes in pixels, since that is just pure evil. Pointed out by Chris Riddoch. Note that this is pretty much just a proposal; I didn't test if everything fits perfectly right, but things seem to be pretty much okay. repo.or.cz uses it now as a test drive - if you find any visual quirks, please point them out, with a patch if possible since I'm total CSS noob and debugging CSS is an extremely painful experience for me. Note that this patch actually does change visual look of gitweb in Firefox with my resolution and default settings - everything is bigger and I can't explain the joy of actually seeing gitweb text that is in _readable_ size; also, my horizontal screen real estate feels better used now. But judging from the look of most modern webpages on the 'net, most people prefer reading the web with strained eyes and/or a magnifying glass (I wonder what species of scientists should look into this mystifying phenomenon) - so, please tell us what you think. Maybe we might want to get rid of absolute sizes other than font sizes in the CSS file too in the long term. Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | Git.pm: config_boolean() -> config_bool()Petr Baudis2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch renames config_boolean() to config_bool() for consistency with the commandline interface and because it is shorter but still obvious. ;-) It also changes the return value from some obscure string to real Perl boolean, allowing for clean user code. Signed-off-by: Petr Baudis <pasky@suse.cz>
* | | | | | Merge branch 'maint'Junio C Hamano2007-05-10
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: .mailmap: add some aliases SPECIFYING RANGES typo fix: it it => it is git-clone: don't get fooled by $PWD Fix documentation of tag in git-fast-import.txt
| * | | | | .mailmap: add some aliasesJunio C Hamano2007-05-10
| | | | | |
| * | | | | SPECIFYING RANGES typo fix: it it => it isJari Aalto2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | git-clone: don't get fooled by $PWDJunio C Hamano2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have /home/me/git symlink pointing at /pub/git/mine, trying to clone from /pub/git/his/ using relative path would not work as expected: $ cd /home/me $ cd git $ ls ../ his mine $ git clone -l -s -n ../his/stuff.git This is because "cd ../his/stuff.git" done inside git-clone to check if the repository is local is confused by $PWD, which is set to /home/me, and tries to go to /home/his/stuff.git which is different from /pub/git/his/stuff.git. We could probably say "set -P" (or "cd -P") instead, if we know the shell is POSIX, but the way the patch is coded is probably more portable. [jc: this is updated with Andy Whitcroft's improvements] Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | Fix documentation of tag in git-fast-import.txtRichard P. Curnow2007-05-09
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tag command does not take a trailing LF. Signed-off-by: Richard P. Curnow <rc@rc0.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | gitweb: choose appropriate view for file type if a= parameter missingGerrit Pape2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gitweb URLs use the a= parameter for the view to use on the given path, such as "blob" or "tree". Currently, if a gitweb URL omits the a= parameter, gitweb just shows the top-level repository summary, regardless of the path given. gitweb could instead choose an appropriate view based on the file type: blob for blobs (files), tree for trees (directories), and summary if no path given (the URL included no f= parameter, or an empty f= parameter). Apart from making gitweb more robust and supporting URL editing more easily, this change would aid the creation of shortcuts to git repositories using simple substitution, such as: http://example.org/git/?p=path/to/repo.git;hb=HEAD;f=%s With this patch, if given the hash through the h= parameter, or the hash base (hb=) and a filename (f=), gitweb uses cat-file -t to automatically set the a= parameter. This feature was requested by Josh Triplett through http://bugs.debian.org/410465 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Added new git-gui library files to rpm specQuy Tonthat2007-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "make rpm" breaks without these files. Signed-off-by: Quy Tonthat <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | t9400: skip cvsserver test if Perl SQLite interface is unavailableJunio C Hamano2007-05-09
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | Merge branch 'fl/cvsserver'Junio C Hamano2007-05-09
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * fl/cvsserver: cvsserver: Add test cases for git-cvsserver
| * | | | | cvsserver: Add test cases for git-cvsserverFrank Lichtenheld2007-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the :fork: access method to force cvs to call "$CVS_SERVER server" even when accessing a local repository. Add a basic test for checkout and some tests for update. Signed-off-by: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | Merge branch 'jc/diffopt'Junio C Hamano2007-05-09
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/diffopt: diff -S: release the image after looking for needle in it diff -M: release the preimage candidate blobs after rename detection. diff.c: do not use a separate "size cache". diff: release blobs after generating textual diff.
| * | | | | | diff -S: release the image after looking for needle in itJunio C Hamano2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | diff -M: release the preimage candidate blobs after rename detection.Junio C Hamano2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We released the postimage candidate blobs after we are done to reduce memory pressure. Do the same for preimage candidate blobs. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | diff.c: do not use a separate "size cache".Junio C Hamano2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diff_filespec has a slot to record the size of the data already, so make use of it instead of a separate size cache. Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | diff: release blobs after generating textual diff.Junio C Hamano2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reduces the memory pressure when dealing with many paths. An unscientific test of running "diff-tree --stat --summary -M" between v2.6.19 and v2.6.20-rc1 in the linux kernel repository indicates that the number of minor faults are reduced by 2/3. Signed-off-by: Junio C Hamano <junkio@cox.net>
* | | | | | | Merge branch 'jn/gitweb'Junio C Hamano2007-05-09
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/gitweb: gitweb: Show combined diff for merge commits in 'commit' view gitweb: Show combined diff for merge commits in 'commitdiff' view gitweb: Make it possible to use pre-parsed info in git_difftree_body gitweb: Add combined diff support to git_patchset_body gitweb: Add combined diff support to git_difftree_body gitweb: Add parsing of raw combined diff format to parse_difftree_raw_line
| * | | | | | gitweb: Show combined diff for merge commits in 'commit' viewJakub Narebski2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commit shown is a merge commit (has more than one parent), display combined difftree output (result of git-diff-tree -c). Earlier (since commit 549ab4a30703012ff3a12b5455d319216805a8db) difftree output (against first parent) was not printed for merges. Examples of non-trivial merges: 5bac4a671907604b5fb4e24ff682d5b0e8431931 (includes rename) addafaf92eeb86033da91323d0d3ad7a496dae83 (five parents) 95f97567c1887d77f3a46b42d8622c76414d964d (evil merge) Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | gitweb: Show combined diff for merge commits in 'commitdiff' viewJakub Narebski2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When 'commitdiff' action is requested without 'hp' (hash parent) parameter, and commit given by 'h' (hash) parameter is merge commit, show merge as combined diff. Earlier for merge commits without 'hp' parameter diff to first parent was shown. Note that in compact combined (--cc) format 'uninteresting' hunks omission mechanism can make that there is no patch corresponding to line in raw format (difftree) output. That is why (at least for now) we use --combined and not --cc format for showing commitdiff for merge commits. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
| * | | | | | gitweb: Make it possible to use pre-parsed info in git_difftree_bodyJakub Narebski2007-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to use pre-parsed, or generated by hand, difftree info in git_difftree_body, similarly to how was and is it done in git_patchset_body. Use just introduced feature in git_commitdiff to parse difftree info (raw diff output) only once: difftree info is now parsed in git_commitdiff directly, and parsed information is passed to both git_difftree_body and git_patchset_body. (Till now only git_blobdiff made use of git_patchset_body ability to use pre-parsed or hand generated info.) Additionally this makes rename info for combined diff with renames (or copies) calculated only once in git_difftree_body; the $difftree is modified and git_patchset_body makes use of added info. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>