This makes things that include revision.h build again.
Blame is also built, but I am not sure how well it works (or how
well it worked to begin with) -- it was relying on tree-diff to
be using whatever pathspec was used the last time, which smells
a bit suspicious.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Without this flag, "git log -p paths..." shows commits that
touch the specified paths, and diffs about the same specified
paths. With this, the full diff is shown for commits that touch
the specified paths.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The way tree-diff was set up assumed we would use only one set
of pathspec during the entire life of the program. Move the
pathspec related static variables out to diff_options structure
so that we can filter commits with one set of paths while show
the actual diffs using different set of paths.
I suspect this breaks blame.c, and makes "git log paths..." to
default to the --full-diff, the latter of which is dealt with
the next commit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Nobody except diff-stages used it -- the callers instead filtered
the input to diffcore themselves. Make diff-stages do that as
well and retire diffcore-pathspec.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This tries to clarify the -c/-cc documentation and clean up the style and
grammar.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
And this makes "git log" to take common diff-tree options, so
that it can be used as "git whatchanged".
The recent revision walker updates by Linus to make path
limiting low-latency helps this quite a bit.
Signed-off-by: Junio C Hamano <junkio@cox.net>
This separates out the part that deals with one-commit diff-tree
(and --stdin form) into a separate log-tree module.
There are two goals with this. The more important one is to be
able to make this part available to "git log --diff", so that we
can have a native "git whatchanged" command. Another is to
simplify the commit log generation part simpler.
Signed-off-by: Junio C Hamano <junkio@cox.net>
The parent rewriting feature caused us to create the whole history in one
go, and then simplify it later, because of how rewrite_parents() had been
written. However, with a little tweaking, it's perfectly possible to do
even that one incrementally.
Right now, this doesn't really much matter, because every user of
"--parents" will probably generally _also_ use "--topo-order", which will
cause the old non-incremental behaviour anyway. However, I'm hopeful that
we could make even the topological sort incremental, or at least
_partially_ so (for example, make it incremental up to the first merge).
In the meantime, this at least moves things in the right direction, and
removes a strange special case.
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Compiling this module gave the following warnings (some double dutch!):
xdiff/xdiffi.c: In functie 'xdl_recs_cmp':
xdiff/xdiffi.c:298: let op: 'spl.i1' may be used uninitialized in this function
xdiff/xdiffi.c:298: let op: 'spl.i2' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'fbest1' may be used uninitialized in this function
xdiff/xdiffi.c:219: let op: 'bbest1' may be used uninitialized in this function
A superficial tracking of their usage, without deeper knowledge about the
algorithm, indeed confirms that there are code paths on which these
variables will be used uninitialized. In practice these code paths might never
be reached, but then these fixes will not change the algorithm. If these
code paths are ever reached we now at least have a predictable outcome. And
should the very small performance impact of these initializations be
noticeable, then they should at least be replaced by comments why certain
code paths will never be reached.
Some extra initializations in this patch now fix the warnings.
When a broken pair is matched up by rename detector to be merged
back, we do not want to say it is "dissimilar" with the
similarity index. The output should just say they were changed,
taking the break score left by the earlier diffcore-break run if
any.
Signed-off-by: Junio C Hamano <junkio@cox.net>
* jc/blame:
blame -S <ancestry-file>
Match ofs/cnt types in diff interface.
blame: use built-in xdiff
combine-diff: move the code to parse hunk-header into common library.
combine-diff: refactor built-in xdiff interface.
combine-diff: use built-in xdiff.
* master:
gitk: Fix incorrect invocation of getmergediffline
[PATCH] gitk: Fix searching for filenames in gitk
count-delta: match get_delta_hdr_size() changes.
check patch_delta bounds more carefully
Don't assume that a file that SVN claims was copied from somewhere
else is bit-for-bit identical with its parent, since SVN allows
changes to copied files before they are committed.
Without this fix, such copy-modify-commit operations causes the
imported file to lack the "modify" part -- that is, we get subtle data
corruption.
Signed-off-by: Karl Hasselström <kha@treskal.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This should make --pretty=oneline a whole lot more readable for
people using 80-column terminals. Originally from Eric Wong.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Jens Axboe noticed that recent "git push" has become very slow
since we made --thin transfer the default.
Thin pack generation to push a handful revisions that touch
relatively small number of paths out of huge tree was stupid; it
registered _everything_ from the excluded revisions. As a
result, "Counting objects" phase was unnecessarily expensive.
This changes the logic to register the blobs and trees from
excluded revisions only for paths we are actually going to send
to the other end.
Signed-off-by: Junio C Hamano <junkio@cox.net>
- don't re-read refs when switching views, it's too slow; just do
it if the user did File->Update
- make the view menu use the uifont
- if we have a graph line selected, unselect it before changing the view
- if a row is selected and appears in the new view, but we have to
read in the new view, select that row when we come across it
- if no row was previously selected, or if we don't find the previously
selected row in the new view, select the first row
Signed-off-by: Paul Mackerras <paulus@samba.org>
Recent revision.c updates completely broken the assignment of
blames by not rewriting commit->parents field unless explicitly
asked to by the caller. The caller needs to set revs.parents.
Signed-off-by: Junio C Hamano <junkio@cox.net>
If a view is selected it will now just update that view.
Also fixed a few other things - if you switch away from a view while
gitk is still reading it in, then switch back, gitk will re-read it
from scratch. We now re-read the references when switching views.
If something was selected before a view change, and we need to read
in the new view, we now select the previously-selected commit when
we come across it.
Fixed a bug in setting of rowrangelist plus a couple of other minor
things.
Signed-off-by: Paul Mackerras <paulus@samba.org>
* jc/date:
date parsing: be friendlier to our European friends.
Tweaks to make asciidoc play nice.
git-commit: document --amend
Avoid a crash if realloc returns a different pointer.
Avoid a divide by zero if there's no messages to send.
[PATCH] Provide configurable UI font for gitk
[PATCH] gitk: Use git wrapper to run git-ls-remote.
[PATCH] gitk: add key bindings for selecting first and last commit
gitk: Add a help menu item to display key bindings
[PATCH] gitk: allow goto heads
gitk: replace parent and children arrays with lists