Commit graph

9 commits

Author SHA1 Message Date
Junio C Hamano f3219fbbba try_to_simplify_commit(): do not skip inspecting tree change at boundary.
When git-rev-list (and git-log) collapsed ancestry chain to
commits that touch specified paths, we failed to inspect and
notice tree changes when we are about to hit uninteresting
parent.  This resulted in "git rev-list since.. -- file" to
always show the child commit after the lower bound, even if it
does not touch the file.  This commit fixes it.

Thanks for Catalin for reporting this.

See also:
	461cf59f89

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-10 21:59:37 -08:00
Matthias Urlichs d2c4af7373 Don't recurse into parents marked uninteresting.
revision.c:make_parents_uninteresting() is exponential with the number
of merges in the tree. That's fine -- unless some other part of git
already has pulled the whole commit tree into memory ...

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-09 01:49:07 -08:00
Linus Torvalds ea5ed3abce get_revision(): do not dig deeper when we know we are at the end.
This resurrects the special casing for "rev-list -n 1" which
avoided reading parents unnecessarily.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-05 13:35:41 -08:00
Junio C Hamano 64bc6e3db5 setup_revisions(): handle -n<n> and -<n> internally.
This moves the handling of max-count shorthand from the internal
implementation of "git log" to setup_revisions() so other users
of setup_revisions() can use it.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-02 15:24:01 -08:00
Junio C Hamano fd751667a2 git-log (internal): add approxidate.
Next will be the pretty-print format.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 03:16:34 -08:00
Linus Torvalds 765ac8ec46 Rip out merge-order and make "git log <paths>..." work again.
Well, assuming breaking --merge-order is fine, here's a patch (on top of
the other ones) that makes

	git log <filename>

actually work, as far as I can tell.

I didn't add the logic for --before/--after flags, but that should be
pretty trivial, and is independent of this anyway.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 01:45:50 -08:00
Linus Torvalds a4a88b2bab git-rev-list libification: rev-list walking
This actually moves the "meat" of the revision walking from rev-list.c
to the new library code in revision.h. It introduces the new functions

	void prepare_revision_walk(struct rev_info *revs);
	struct commit *get_revision(struct rev_info *revs);

to prepare and then walk the revisions that we have.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-28 14:49:29 -08:00
Linus Torvalds d9a83684c4 Splitting rev-list into revisions lib, end of beginning.
This makes the rewrite easier to validate in that revision flag
parsing and warlking part are now all in rev_info structure.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-27 11:10:16 -08:00
Linus Torvalds ae563542bf First cut at libifying revlist generation
This really just splits things up partially, and creates the
interface to set things up by parsing the command line.

No real code changes so far, although the parsing of filenames is a bit
stricter. In particular, if there is a "--", then we do not accept any
filenames before it, and if there isn't any "--", then we check that _all_
paths listed are valid, not just the first one.

The new argument parsing automatically also gives us "--default" and
"--not" handling as in git-rev-parse.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-26 15:33:27 -08:00