| Commit message (Collapse) | Author | Age |
... | |
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See
git-debrebase: Prep for avoid read-tree in walk when not rewriting
for the motivation.
Here we try to check that the commit we would make, if we were
actually calling read-tree, write-tree and hash-object, would be
identical to the one we are reusing.
In particular, we check that the upstream files, and the debian/
directory, have the contents we would feed to read-tree. And we check
that the parent list is the same.
With these checks this new algorithm is, I think, safe enough to just
use always. So set $opt_careful to 0. We will abolish this
variable in a moment.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are ways to avoid calling git-diff-tree, which is very slow even
with --name-only --no-renames and without recursion. I think it is
doing all the work to make nice actual diffs, and then throwing them
away.
Two calls to git-ls-tree is about 20x faster than git-diff-tree
on the Linux kernel, for example.
No functional change in this commit, since no callers yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the git index is a flat list of files, not a directory
hierarchy, git-read-tree can be very slow. We want to avoid it
if possible.
Introduce a new way of working, where we defer calls to read-tree.
In detail:
* $read_tree_upstream and $read_tree_debian, which are the only ways
that walk invokes read-tree, simply record their argument;
* The actual read-tree is done just before the write-tree and
commit generation. read_tree_upstream, conveniently, does both
halves, if it gets both arguments.
* Put all of the read-tree and commit regeneration in a branch
triggered if we are rewriting or "trying to be careful".
Right now we are always careful, but I have tested this with a hack
setting $opt_careful to 0, and the performance on the example branch
in #905995 is much improved: 3.4s rather than 77s for `git-debrebase'.
This is not suitable for enabling in its current form. I want to
actuallly abolish the $opt_careful, and, instead, check with
get_differs or git-cat-file that the tree segments, and the parent
lists, are identical.
When we do that we won't be checking any more that the commit
generation can generate identical commits when not rewriting. But it
doesn't really matter much any more provided the commits are
well-formed and right, and the test suite will check that.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
We are going to make these do something more efficient, sometimes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
This is a really horrible way to do things. We need a better
way to let the user help resolve this kind of merge.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
And, destroy it on scrap.
Nothing consumes this yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
We use @deferred_updates to see if we actually did anything for
--noop-ok purposes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We are going to want this for git-debrebase merge resolutions.
NFC other than the usual change to literal `git'.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We're going to want these for the reflog cache functions.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC other than the usual change to literal `git'.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
Right now this seems to be able to generate some commit, but
it doesn't know how to record it.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We're about to reuse this.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We are going to want this in a moment.
No overall functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
We are going to want this in a moment.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
| |
We are going to make some of this into its own sub, and copying the
convenience functions seems annoying, so do this.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
git-update-ref hates us if we delete a ref and reintroduce it, in the
same transaction. In this case we don't mind doing it in two goes.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
And use this in merge_series.
NFC.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
If we print STDERR in advance, there is a newline beforehand, which is
undesirable.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
Introduce $attempt_cmd for this purpose.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
| |
That would be dangerous because we're in the wrong directory and other
things may be wrong. For example, if we continue we might overwrite
wreckage with other wreckage.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
We should change to $maindir before exiting.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
There is no point configuring this. We tidy it up again soon enough.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
We are going to make this nonconfigurable.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
Whenever we do a final ref update, discard any wreckage. The wreckage
can be autoregenerated, so it is not very important.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
And call it from $nomerge in walk. Now we produce a sane error
message.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
|
|
|
|
| |
Add the missing commitish for the -patchqueue wrecknote.
Defend against undef (or too few) args to mwrecknote.
(The way we end up calling it means perl doesn't notice.)
In walk, ensure that we initialise $cl->{MergeWreckNotes}.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
NFC
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
|
| |
I don't think this makes any difference with the current error
messages.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
| |
And sort out the section comments.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
| |
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|