aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* [PATCH] Add --pickaxe-all to diff-* brothers.Junio C Hamano2005-05-29
| | | | | | | | | | When --pickaxe-all is given in addition to -S, pickaxe shows the entire diffs contained in the changeset, not just the diffs for the filepair that touched the sought-after string. This is useful to see the changes in context. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Remove a function not used anymore.Junio C Hamano2005-05-29
| | | | | | | | | | Earlier rename/copy detection left unmodified filepair in the output and forced downstream to keep them even when they are filtering, and the diff_needs_to_stay() function was used for the logic. It is not used anymore, so remove it. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Clean up diff_setup() to make it more extensible.Junio C Hamano2005-05-29
| | | | | | | | | This changes the argument of diff_setup() from an integer that says if we are feeding reversed diff to a bitmask, so that later global options can be added more easily. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Remove final newline from the value of xfrm_msg variable.Junio C Hamano2005-05-29
| | | | | | | | This change makes the implementation of git-external-diff-script cleaner. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Do not expose internal scaling to diff-helper.Junio C Hamano2005-05-29
| | | | | | | | Instead we can normalize what diff-raw records at the diffcore side. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Remove unused rank field from diff_core structure.Junio C Hamano2005-05-29
| | | | | | | | This removes a field that is no longer used from diff_score structure. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Make pathspec only care about the detination tree.Junio C Hamano2005-05-29
| | | | | | | | | | | Earlier it had a misguided attempt to include paths that matches either source tree or destination tree after the rename/copy detection. The new semantics will be that pathspec defines a narrowed down world the diffcore operates in, so it should not even look at where in the source tree the path came from. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Introduce diff_free_filepair() funcion.Junio C Hamano2005-05-29
| | | | | | | | This introduces a new function to free a common data structure, and plugs some leaks. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix math thinko in similarity estimator.Junio C Hamano2005-05-29
| | | | | | | The math to reject delta that is too big was confused. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Document the --root switch of git-diff-treeThomas Glanzmann2005-05-29
| | | | | Signed-off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] check_file_directory_conflict path fixDavid Meybohm2005-05-27
| | | | | | | | | | | | | | | | | | | check_file_directory_conflict can give the wrong answers. This is because the wrong length is passed to cache_name_pos. The length passed should be the length of the whole path from the root, not the length of each path subcomponent. $ git-init-db defaulting to local storage area $ mkdir path && touch path/file $ git-update-cache --add path/file $ rm path/file $ mkdir path/file && touch path/file/f $ git-update-cache --add path/file/f <-- Conflict ignored $ Signed-off-by: David Meybohm <dmeybohmlkml@bellsouth.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-diff-tree: simplify header output with '-z'Linus Torvalds2005-05-27
| | | | | | | No need to make them multiple lines, in fact we explicitly don't want that. This also fixes a 64-bit problem pointed out by Markus F.X.J. Oberhumer, where we gave "%.*s" a "ptrdiff_t" length argument instead of an "int".
* [PATCH] allow pathspec to end with a slashJunio C Hamano2005-05-26
| | | | | | | | | | | | The recent rewrite broke "git-whatchanged -v -p drivers/usb/" but "git-whatchanged -v -p drivers/usb" still works. Just strip out the trailing slashes internally to make it work again. It uses compare-thing-with-number comparison order instead of visual comparison order ;-). Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-diff-tree: don't use diffcore_pathspec()Linus Torvalds2005-05-26
| | | | | | | diff-tree does the culling of uninteresting paths internally, and fundamentally has to do so for performance reasons. So there's no point in calling the separate pathname culling logic here, especially as it seems slightly broken.
* [PATCH] fix and testcase for git-commit-tree optionRene Scharfe2005-05-26
| | | | | | | | | | | Actually use GIT_COMMITTER_DATE in git-commit-tree. (It used to mistakenly re-use the author date) Add test-case for it. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Make ls-* output consistent with diff-* output format.Junio C Hamano2005-05-26
| | | | | | | | | Use SP as the column separator except the ones before path which uses TAB, to make the output format consistent across ls-* and diff-* commands. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] ls-tree matching multiple pathsJason McMullan2005-05-26
| | | | | | | | | | | Enhance git-ls-tree to allow optional 'match paths' that restricts the output of git-ls-tree. This is useful to retrieve a single file's SHA1 out of a tree without creating an index. [JC: I added the test case] Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Add git-external-diff-scriptJunio C Hamano2005-05-26
| | | | | | | | | | | | | | | | This is a demonstration of GIT_EXTERNAL_DIFF mechanism, and a testbed for tweaking and enhancing what the built-in diff should do. This script is designed to output exactly the same output as what the built-in diff driver produces when used as the GIT_EXTERNAL_DIFF command. I've run this and updated built-in diff on the entire history of linux-2.6 git repository, and JG's udev.git repository which has interesting symlink cases to make sure it is equivalent to the built-in diff driver. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Diff updates to express type changesJunio C Hamano2005-05-26
| | | | | | | | | | | | | | | | | | | | With the introduction of type 'T' in the diff-raw output, and the "apply-patch" program Linus has been quietly working on without much advertisement, it started to make sense to emit usable information in the "diff --git" patch output format as well. Earlier built-in diff driver punted and did not say anything about a symbolic link changing into a file or vice versa, but this version represents it as a pair of deletion and creation. It also fixes a minor problem dealing with old archive created with ancient git. The earlier code was reporting file mode change between 100664 and 100644 (we shouldn't). The linux-2.6 git tree has a good example that exposes this problem. A good test case is commit ce1dc02f76432a46db149241e015a4f782974623. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-apply: add "--check" option to check that the diff makes senseLinus Torvalds2005-05-26
| | | | | It currently only verifies the index against the working directory, it doesn't actually verify the diff fragments themselves yet.
* git-apply: when validating default names, check the final EOLN tooLinus Torvalds2005-05-26
| | | | | This means that filenames are totally unambiguous even if they have spaces or tabs in them.
* git-apply: pick up default filenames from "diff --git" header lineLinus Torvalds2005-05-26
| | | | | Pure mode changes, and deletes or creates of empty files won't have this information anywhere else.
* git-apply: make the diffstat output happen for "--stat" only.Linus Torvalds2005-05-26
| | | | | | Slowly this is takign the form of a program that we'd actually use. Now "git-apply --stat" basically ends up being a perfectly useful diffstat.
* git-apply: implement "diffstat" outputLinus Torvalds2005-05-26
| | | | | Hey, it's almost free by now, and it's a good way to see that we parse the patches correctly.
* git-apply: parse the whole list of patches into memory firstLinus Torvalds2005-05-26
| | | | | | | | | | Make it a clear two-phase thing: first a read-only parse of the patch itself (which is independent of any current index information), and then the second phase actually uses the patch. The second phase might not be a real apply, it could be just a diffstat, for example. Which is trivial to do once the patch is parsed.
* [PATCH] Test case portability fix.Mark Allen2005-05-25
| | | | | | | | | | | | This is the remainder of testcase fix by Mark Allen to make them work on his Darwin box. I was using "xargs -r" (GNU) where it was not needed, sed -ne '/^\(author\|committer\)/s|>.*|>|p' where some sed does not know what to do with '\|', and also "cmp - file" to compare standard input with a file, which his cmp does not support. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Make "parse_object()" also fill in commit message buffer data.Linus Torvalds2005-05-25
| | | | And teach fsck to free it to save memory.
* git-rev-list: add "end" commit and "--header" flagLinus Torvalds2005-05-25
| | | | | | | | | | The "end" commit is just faking it right now, it's sorting things purely by date, so this is _not_ a reachability analysis. Some day. The "--header" flag causes the commit message to be printed out, with a NUL character separator after it for parseability. This allows you to do things like use "grep -z" to grep for certain authors etc.
* commit: save the commit buffer off when parsing a commitLinus Torvalds2005-05-25
| | | | | | | | | | | | | object. A fair number of the users potentially want to look at the commit objects more closely, and if you worry about memory leaking in certain applications, you can always do a free(commit->buffer); commit->buffer = NULL; by hand after parsing them.
* unpack_sha1_file: zero-pad the unpacked object.Linus Torvalds2005-05-25
| | | | | | This makes them easier to parse without having to worry about running off the end, and allows us to treat commits as normal strings.
* [PATCH] Mode only changes from diff.Junio C Hamano2005-05-25
| | | | | | | | | | | | This fixes another bug. - Mode-only changes were pruned incorrectly from the output. - Added test to catch the above problem. - Normalize rename/copy similarity score in the diff-raw output to per-cent, no matter what scale we internally use. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Fix type-change handling when assigning the status code to filepairs.Junio C Hamano2005-05-25
| | | | | | | | | | | | | | | The interim single-liner '?' fix resulted delete entries that should not have emitted coming out in the output as an unintended side effect; I caught this with the "rename" test in the test suite. This patch instead fixes the code that assigns the status code to each filepair. I verified this does not break the testcase in udev.git tree Kay Sievers gave us, by running git-diff-tree on that tree which showed 21 file to symlink changes. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Adjust show-files test for dotfiles.Junio C Hamano2005-05-25
| | | | | | | | | | | | The earlier test was relying on the fact that dotfiles do not appear in the output to prepare expected test results, which inevitably got broken when we started handling dotfiles. Change the test to be honest about what "--other" file it creates. The problem was originally pointed out by Mark Allen. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-pull-script: pretty-print the merge head informationLinus Torvalds2005-05-25
| | | | | | This also drops the common ".git" part from the end of the repo name, and if a non-default head reference is given, makes a nicer commit message about it.
* [PATCH] optimize git-resolve-scriptJeff Garzik2005-05-25
| | | | | This change was suggested for my git-switch-tree script, and the same issues apply to core git's git-resolve-script as well.
* diff.c: don't silently ignore unknown state changes in diffs.Linus Torvalds2005-05-25
| | | | Give them an "unknown" status, ie '?'.
* [PATCH] show changed tree objects with recursive git-diff-treeJunio C Hamano2005-05-25
| | | | | | | | | | | This adds a "-t" flag to tell the raw diff output to include the tree objects in the output when doing a recursive diff. Since that's how the non-recursive output already handles trees and the flag thus doesn't make sense without "-r", I made "-t" imply "-r". Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Use pathspec array correctlyJunio C Hamano2005-05-25
| | | | | | | | | | | | | Oh, I am an idiot. Repeating the same check against the first element of pathspec array as many times as the pathspec array has elements in it would not do us any good. This patch allows you to specify more than one pathspec to diff-tree family and have them actually used. Signed-off-by: Junio C Hamano <junkio@cox.net> ;) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-rev-tree: teach it about tag referencesLinus Torvalds2005-05-24
| | | | And various cleanups that makes it able to not care.
* [PATCH] Allow dot files in ls-files as well (take #2).Junio C Hamano2005-05-24
| | | | | | | | This attempts to match "the directory '.git' anywhere in the tree is ignored" approach taken in update-cache. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-diff-cache: fix argument parsingLinus Torvalds2005-05-24
| | | | And make the code more readable while at it.
* [PATCH] Update rename/copy similarity estimator.Junio C Hamano2005-05-24
| | | | | | | | | | | The second round similarity estimator simply used the size of the xdelta itself to estimate the extent of damage. This patch keeps that logic to detect big insertions to terminate the check early, but otherwise looks at the generated delta in order to estimate the extent of edit more accurately. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Squelch compiler warningJunio C Hamano2005-05-24
| | | | | | | Not important but I am a bit annoyed by gcc complaining about the control falling out of the function without returning value. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Allow symlinks in the leading path in checkout-cache --prefix=Junio C Hamano2005-05-24
| | | | | | | | | | | | This is what Linus wrote, improving what David Greaves originally submitted. I just added a test case and verified the patch works. Author: David Greaves <david@dgreaves.com> Author: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] Use DIFF_FORMAT_NO_OUTPUT to implement diff-tree -s option.Junio C Hamano2005-05-24
| | | | | | | | | Instead of checking silent flag all over the place, simply use the NO_OUTPUT option diffcore provides to suppress the diff output. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-update-cache: allow dot-filesLinus Torvalds2005-05-24
| | | | | | | We still refuse to add ".", ".." and ".git". In theory, you could track another git-repository by allowing ".git", but the potential for confusion is just too high.
* git-commit-tree: allow overriding of commit dateLinus Torvalds2005-05-24
| | | | Using GIT_COMMITTER_DATE, of course..
* [PATCH] Redo rename/copy detection logic.Junio C Hamano2005-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier implementation had a major screw-up in the memory management area. Rename/copy logic sometimes borrowed a pointer to a structure without any provision for downstream to determine which pointer is shared and which is not. This resulted in the later clean-up code to sometimes double free such structure, resulting in a segfault. This made -M and -C useless. Another problem the earlier implementation had was that it reordered the patches, and forced the logic to differentiate renames and copies to depend on that particular order. This problem was fixed by teaching rename/copy detection logic not to do any reordering, and rename-copy differentiator not to depend on the order of the patches. The diffs will leave rename/copy detector in the same destination path order as the patch that was fed into it. Some test vectors have been reordered to accommodate this change. It also adds a sanity check logic to the human-readable diff-raw output to detect paths with embedded TAB and LF characters, which cannot be expressed with that format. This idea came up during a discussion with Chris Wedgwood. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* git-apply: more consistency checks on gitdiff filenamesLinus Torvalds2005-05-23
| | | | | | There's some duplication of filenames when doing filename operations (creates, deletes, renames and copies), and this makes us verify that the pathnames match when they should.
* [PATCH] adjust git-deltafy-script to the new diff-tree output formatNicolas Pitre2005-05-23
| | | | | | | | Also prevent 'sort' from sorting on the sha1 which was screwing the history listing. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>