Commit graph

33229 commits

Author SHA1 Message Date
Felipe Contreras 9ed920a680 remote-hg: don't push fake 'master' bookmark
We skip it locally, but not for the remote, so let's do so.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:40:59 -07:00
Felipe Contreras 06f4213355 remote-hg: disable forced push by default
In certain situations we might end up pushing garbage revisions
(e.g. in a rebase), and the patches to deal with that haven't been
merged yet.  So let's disable forced pushes by default.

We are essentially reverting back to the old v1.8.2 behavior, to
minimize the possibility of regressions, but in a way the user can
configure.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:40:16 -07:00
Felipe Contreras 637333673a remote-hg: fix new branch creation
When a user creates a new branch with git:

 % git checkout -b branches/devel

and then pushes this branch

 % git push origin branches/devel

which is the way to push new mercurial branches, we do want to
create a branch, but the command would fail without newbranch=True.

This only matters when force_push=False, but setting newbranch=True
unconditionally does not hurt.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:35:51 -07:00
Felipe Contreras 760ee1c70a remote-hg: add new get_config_bool() helper
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:33:39 -07:00
Felipe Contreras 679e87c02b remote-hg: enable track-branches in hg-git mode
The user can turn this off.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:33:15 -07:00
Felipe Contreras 557399e9bd remote-hg: get rid of unused exception checks
Remove try/except check because we are no longer calling
check_output(), which may throw an exception.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:31:54 -07:00
Felipe Contreras eb7976e7dd remote-hg: trivial cleanups
Drop unused "global", and remove redundant comparison of two files.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:30:36 -07:00
Felipe Contreras 6a3ac18ba3 remote-bzr: update old organization
If a clone exists with the old organization (v1.8.2) it will prevent
the new shared bzr repository organization from working, so let's
remove this repository, which is not used any more.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-14 15:51:00 -07:00
Junio C Hamano ab84621754 Git 1.8.3-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-13 11:09:42 -07:00
Junio C Hamano f74455ab21 Merge git://ozlabs.org/~paulus/gitk
* git://ozlabs.org/~paulus/gitk:
  gitk: On OSX, bring the gitk window to front
  gitk: Add support for -G'regex' pickaxe variant
  gitk: Add menu item for reverting commits
  gitk: Simplify file filtering
  gitk: Display the date of a tag in a human-friendly way
  gitk: Improve behaviour of drop-down lists
  gitk: Move hard-coded colors to .gitk
2013-05-13 07:51:41 -07:00
Tair Sabirgaliev 76bf6ff93e gitk: On OSX, bring the gitk window to front
On OSX, Tcl/Tk application windows are created behind all
the applications down the stack of windows.  This is very
annoying, because once a gitk window appears, it's the
downmost window and switching to it is pain.

The patch is: if we are on OSX, use osascript to
bring the current Wish process window to front.

Signed-off-by: Tair Sabirgaliev <tair.sabirgaliev@gmail.com>
Thanks-to: Stefan Haller <lists@haller-berlin.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-13 21:29:43 +10:00
Martin Langhoff c33cb9083e gitk: Add support for -G'regex' pickaxe variant
git log -G'regex' is a very useful alternative to the classic
pickaxe.  Minimal patch to make it usable from gitk.

[zj: reword message]
[paulus@samba.org: reword droplist item]
Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-13 21:29:40 +10:00
Torsten Bögershausen 8d97506e4b test-bzr: do not use unportable sed '\+'
Using sed -e '/[0-9]\+//' to find "one or more digits" is not
portable.

Use the Basic Regular Expression '/[0-9][0-9]*//' instead.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-11 12:51:19 -07:00
Junio C Hamano 9249175291 Merge git://git.bogomips.org/git-svn
* git://git.bogomips.org/git-svn:
  git-svn: added an --include-path flag
  Git::SVN::*: add missing "NAME" section to perldoc
  git-svn: avoid self-referencing mergeinfo
2013-05-11 11:09:00 -07:00
Knut Franke 8f3ff9339f gitk: Add menu item for reverting commits
Sometimes it's helpful (at least psychologically) to have this feature
easily accessible.  Code borrows heavily from cherrypick.

Signed-off-by: Knut Franke <Knut.Franke@gmx.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-11 18:31:50 +10:00
Felipe Contreras 2c8cd905d1 gitk: Simplify file filtering
git diff is perfectly able to do this with '-- files', no need for
manual filtering.  This makes gettreediffs consistent with getblobdiffs.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-11 17:37:08 +10:00
Anand Kumria 685316c419 gitk: Display the date of a tag in a human-friendly way
By selecting a tag within gitk you can display information about it.
This information is output by using the command

 'git cat-file tag <tagid>'

This outputs the *raw* information from the tag, amongst which is the
time - in seconds since the epoch. As useful as that value is, I find it
a lot easier to read and process time which it is something like:

 "Mon Dec 31 14:26:11 2012 -0800"

This change will modify the display of tags in gitk like so:

  @@ -1,7 +1,7 @@
   object 5d417842ef
   type commit
   tag v1.8.1
  -tagger Junio C Hamano <gitster@pobox.com> 1356992771 -0800
  +tagger Junio C Hamano <gitster@pobox.com> Mon Dec 31 14:26:11 2012 -0800

   Git 1.8.1
   -----BEGIN PGP SIGNATURE-----

Signed-off-by: Anand Kumria <wildfire@progsoc.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-11 17:09:27 +10:00
Paul Mackerras 39c126914b gitk: Improve behaviour of drop-down lists
The drop-down lists used for things like the criteria for finding
commits (containing/touching paths/etc.) use a combobox if we are
using the ttk widgets.  By default the combobox exports its value
as the selection when it is changed, which is unnecessary, and sometimes
the combobox wouldn't release the selection, which is annoying.

To fix this, we make these comboboxes not export their selection,
and also clear their selection whenever they are changed.  This makes
them more like a simple selection of alternatives, improving the look
and feel of gitk.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2013-05-11 17:08:41 +10:00
Felipe Contreras 126aac5cf3 transport-helper: fix remote helper namespace regression
Commit 664059f (transport-helper: update remote helper namespace)
updates the namespace when the push succeeds or not; we should do it
only when it succeeded.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-10 13:28:31 -07:00
Dale Worley 48bc1755b6 CodingGuidelines: Documentation/*.txt are the sources
People not familiar with AsciiDoc may not realize they are
supposed to update *.txt files and not *.html/*.1 files when
preparing patches to the project.

Signed-off-by: Dale Worley <worley@ariadne.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-10 12:13:08 -07:00
Felipe Contreras d6ae7b2d36 test: remote-helper: add missing and
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-10 10:11:37 -07:00
Junio C Hamano b387c77b12 Sync with v1.8.2.3
* maint:
  Git 1.8.2.3
  t5004: avoid using tar for checking emptiness of archive
  t5004: ignore pax global header file
  mergetools/kdiff3: do not use --auto when diffing
  transport-helper: trivial style cleanup
2013-05-09 13:32:54 -07:00
Junio C Hamano 92758dd2a2 Git 1.8.2.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 13:31:17 -07:00
Junio C Hamano faf8fde514 Merge branch 'mv/sequencer-pick-error-diag'
Fix "git cherry-pick $annotated_tag", which was mistakenly rejected.

* mv/sequencer-pick-error-diag:
  cherry-pick: picking a tag that resolves to a commit is OK
2013-05-09 13:30:19 -07:00
Junio C Hamano 7c0b0d8dea cherry-pick: picking a tag that resolves to a commit is OK
Earlier, 21246dbb9e (cherry-pick: make sure all input objects are
commits, 2013-04-11) tried to catch an unlikely "git cherry-pick $blob"
as an error, but broke a more important use case to cherry-pick a
tag that points at a commit.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 13:29:53 -07:00
Junio C Hamano 07e03d4665 Merge branch 'tr/copy-revisions-from-stdin' into maint
* tr/copy-revisions-from-stdin:
  read_revisions_from_stdin: make copies for handle_revision_arg
2013-05-09 12:42:17 -07:00
René Scharfe ea2d20d4c2 t5004: avoid using tar for checking emptiness of archive
Test 2 of t5004 checks if a supposedly empty tar archive really
contains no files.  24676f02 (t5004: fix issue with empty archive test
and bsdtar) removed our commit hash to make it work with bsdtar, but
the test still fails on NetBSD and OpenBSD, which use their own tar
that considers a tar file containing only NULs as broken.

Here's what the different archivers do when asked to create a tar
file without entries:

	$ uname -v
	NetBSD 6.0.1 (GENERIC)
	$ gtar --version | head -1
	tar (GNU tar) 1.26
	$ bsdtar --version
	bsdtar 2.8.4 - libarchive 2.8.4

	$ : >zero.tar
	$ perl -e 'print "\0" x 10240' >tenk.tar
	$ sha1 zero.tar tenk.tar
	SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709
	SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

	$ : | tar cf - -T - | sha1
	da39a3ee5e6b4b0d3255bfef95601890afd80709
	$ : | gtar cf - -T - | sha1
	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
	$ : | bsdtar cf - -T - | sha1
	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

So NetBSD's native tar creates an empty file, while GNU tar and bsdtar
both give us 10KB of NULs -- just like git archive with an empty tree.
Now let's see how the archivers handle these two kinds of empty tar
files:

	$ tar tf zero.tar; echo $?
	tar: Unexpected EOF on archive file
	1
	$ gtar tf zero.tar; echo $?
	gtar: This does not look like a tar archive
	gtar: Exiting with failure status due to previous errors
	2
	$ bsdtar tf zero.tar; echo $?
	0

	$ tar tf tenk.tar; echo $?
	tar: Cannot identify format. Searching...
	tar: End of archive volume 1 reached
	tar: Sorry, unable to determine archive format.
	1
	$ gtar tf tenk.tar; echo $?
	0
	$ bsdtar tf tenk.tar; echo $?
	0

NetBSD's tar complains about both, bsdtar happily accepts any of them
and GNU tar doesn't like zero-length archive files.  So the safest
course of action is to stay with our block-of-NULs format which is
compatible with GNU tar and bsdtar, as we can't make NetBSD's native
tar happy anyway.

We can simplify our test, however, by taking tar out of the picture.
Instead of extracting the archive and checking for the non-presence of
files, check if the file has a size of 10KB and contains only NULs.
This makes t5004 pass on NetBSD and OpenBSD.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 12:41:31 -07:00
René Scharfe 56ee96572a t5004: resurrect original empty tar archive test
Add a test to verify the emptiness of an archive by extracting its
contents.  Don't run this test if the version of tar doesn't support
archives containing only a comment header, though.

The existing check 'tar archive of empty tree is empty' used to work
like that (minus the tar capability check) but was changed to depend
on the exact representation of empty tar files created by git archive
instead of on the behaviour of tar in order to avoid issues with
different tar versions.

The different approaches test different things: The existing one is
for empty trees, for which we know the exact expected output and thus
we can simply check it without extracting; the new one is for commits
with empty trees, whose archives include stamps and so the more
"natural" check by extraction is a better fit because it focuses on
the interesting aspect, namely the absence of any archive entries.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 12:22:31 -07:00
René Scharfe 71a19a3744 t5004: avoid using tar for checking emptiness of archive
Test 2 of t5004 checks if a supposedly empty tar archive really
contains no files.  24676f02 (t5004: fix issue with empty archive test
and bsdtar) removed our commit hash to make it work with bsdtar, but
the test still fails on NetBSD and OpenBSD, which use their own tar
that considers a tar file containing only NULs as broken.

Here's what the different archivers do when asked to create a tar
file without entries:

	$ uname -v
	NetBSD 6.0.1 (GENERIC)
	$ gtar --version | head -1
	tar (GNU tar) 1.26
	$ bsdtar --version
	bsdtar 2.8.4 - libarchive 2.8.4

	$ : >zero.tar
	$ perl -e 'print "\0" x 10240' >tenk.tar
	$ sha1 zero.tar tenk.tar
	SHA1 (zero.tar) = da39a3ee5e6b4b0d3255bfef95601890afd80709
	SHA1 (tenk.tar) = 34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

	$ : | tar cf - -T - | sha1
	da39a3ee5e6b4b0d3255bfef95601890afd80709
	$ : | gtar cf - -T - | sha1
	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c
	$ : | bsdtar cf - -T - | sha1
	34e163be8e43c5631d8b92e9c43ab0bf0fa62b9c

So NetBSD's native tar creates an empty file, while GNU tar and bsdtar
both give us 10KB of NULs -- just like git archive with an empty tree.
Now let's see how the archivers handle these two kinds of empty tar
files:

	$ tar tf zero.tar; echo $?
	tar: Unexpected EOF on archive file
	1
	$ gtar tf zero.tar; echo $?
	gtar: This does not look like a tar archive
	gtar: Exiting with failure status due to previous errors
	2
	$ bsdtar tf zero.tar; echo $?
	0

	$ tar tf tenk.tar; echo $?
	tar: Cannot identify format. Searching...
	tar: End of archive volume 1 reached
	tar: Sorry, unable to determine archive format.
	$ gtar tf tenk.tar; echo $?
	0
	$ bsdtar tf tenk.tar; echo $?
	0

NetBSD's tar complains about both, bsdtar happily accepts any of them
and GNU tar doesn't like zero-length archive files.  So the safest
course of action is to stay with our block-of-NULs format which is
compatible with GNU tar and bsdtar, as we can't make NetBSD's native
tar happy anyway.

We can simplify our test, however, by taking tar out of the picture.
Instead of extracting the archive and checking for the non-presence of
files, check if the file has a size of 10KB and contains only NULs.
This makes t5004 pass on NetBSD and OpenBSD.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 12:20:40 -07:00
René Scharfe abdb9b2e4f t5004: ignore pax global header file
Versions of tar that don't know pax headers -- like the ones in NetBSD 6
and OpenBSD 5.2 -- extract them as regular files.  Explicitly ignore the
file created for our global header when checking the list of extracted
files, as this is normal and harmless fall-back behaviour.  This fixes
test 3 of t5004 on these platforms.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 12:18:57 -07:00
David Aguilar e2161bc385 mergetools/kdiff3: do not use --auto when diffing
The `kdiff3 --auto` help message is, "No GUI if all conflicts are auto-
solvable."  This flag was carried over from the original mergetool
commands.  diff_cmd() is for two-way comparisons only so remove the
superfluous flag.

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 11:59:39 -07:00
Felipe Contreras b120ef3eac transport-helper: trivial style cleanup
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-09 11:33:01 -07:00
Paul Walmsley a7b102302a git-svn: added an --include-path flag
The SVN::Fetcher module is now able to filter for inclusion as well
as exclusion (as used by --ignore-path). Also added tests, documentation
changes and git completion script.

If you have an SVN repository with many top level directories and you
only want a git-svn clone of some of them then using --ignore-path is
difficult as it requires a very long regexp. In this case it's much
easier to filter for inclusion.

[ew: remove trailing whitespace]

Signed-off-by: Paul Walmsley <pjwhams@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-09 01:13:36 +00:00
Jonathan Nieder d301f18160 Git::SVN::*: add missing "NAME" section to perldoc
lexgrog(1) relies on the NAME section to find a manpage's subject's
name and description for easy access later using "man -k".  Add the
section it expects.

Noticed using lintian.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-09 01:07:58 +00:00
Michael Contreras e234ac9d47 git-svn: avoid self-referencing mergeinfo
When svn.pushmergeinfo is set, the target branch is included in the
mergeinfo if it was previously merged into one of the source branches.
SVN does not do this.

Remove merge target branch path from resulting mergeinfo when
svn.pushmergeinfo is set to better match the behavior of SVN. Update the
svn-mergeinfo-push test.

[ew: 80 columns]

Signed-off-by: Michael Contreras <michael@inetric.com>
Reported-by: Avishay Lavie <avishay.lavie@gmail.com>
Acked-by: Eric Wong <normalperson@yhbt.net>
2013-05-09 01:07:39 +00:00
Felipe Contreras 734b2f0532 completion: synchronize zsh wrapper
So it's closer to the full zsh wrapper.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-08 11:44:32 -07:00
Felipe Contreras 2bcf694b18 completion: cleanup zsh wrapper
There's no need for a separate function; we can call
'emulate -k ksh func'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-08 11:44:30 -07:00
Junio C Hamano 9b795193a6 Update draft release notes for 1.8.3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 22:50:05 -07:00
Felipe Contreras 0df860383e remote-helpers: trivial cleanup
The comment was copied from hg-fast-export, not used anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 22:42:20 -07:00
Felipe Contreras 435f39a3e8 remote-bzr: fix for disappeared revisions
It's possible that the previous tip goes away, we should not assume it's
always present. Fortunately we are only using it to calculate the
progress to display to the user, so only that needs to be fixed.

Also, add a test that triggers this issue.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 22:38:40 -07:00
Junio C Hamano 3b892dc828 Merge git://github.com/git-l10n/git-po
* git://github.com/git-l10n/git-po:
  l10n: zh_CN.po: translate 44 messages (2080t0f0u)
  l10n: de.po: translate 44 new messages
  l10n: Update Vietnamese translation (2080t0f0u)
  l10n: Update Swedish translation (2080t0f0u)
  l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)
2013-05-07 18:24:31 -07:00
Jiang Xin 4dcdc3d8cc l10n: zh_CN.po: translate 44 messages (2080t0f0u)
Translate 44 new messages came from git.pot update in c6bc7d4
(l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed))

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2013-05-08 08:13:32 +08:00
Felipe Contreras 45c5d4a56b fast-{import,export}: use get_sha1_hex() to read from marks file
It's wrong to call get_sha1() if they should be SHA-1s, plus
inefficient.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 16:20:40 -07:00
Ralf Thielow a09ab03a5b l10n: de.po: translate 44 new messages
Translate 44 new messages came from git.pot update in
c6bc7d4 (l10n: git.pot: v1.8.3 round 2 (44 new, 12 removed)).

Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Thomas Rast <trast@inf.ethz.ch>
2013-05-07 19:28:19 +02:00
Nguyễn Thái Ngọc Duy 60003340cd clone: allow cloning local paths with colons in them
Usually "foo:bar" is interpreted as an ssh url. This patch allows to
clone from such paths by putting at least one slash before the colon
(i.e. /path/to/foo:bar or just ./foo:bar).

file://foo:bar should also work, but local optimizations are off in
that case, which may be unwanted. While at there, warn the users about
--local being ignored in this case.

Reported-by: William Giokas <1007380@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 08:32:14 -07:00
Felipe Contreras 47bd9bf82d fast-export: don't parse commits while reading marks file
We don't need the parsed objects at this point, merely the
information that they have marks.

Seems to be three times faster in my setup with lots of objects.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 07:03:01 -07:00
Felipe Contreras e6812cfa9a fast-export: do not parse non-commit objects while reading marks file
We read from the marks file and keep only marked commits, but in
order to find the type of object, we are parsing the whole thing,
which is slow, specially in big repositories with lots of big files.

There's no need for that, we can query the object information with
sha1_object_info().

Before this, loading the objects of a fresh emacs import, with 260598
blobs took 14 minutes, after this patch, it takes 3 seconds.

This is the way fast-import does it. Also die if the object is not
found (like fast-import).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 07:03:01 -07:00
Junio C Hamano 423ecb0bb6 Merge branch 'jk/merge-tree-added-identically'
* jk/merge-tree-added-identically:
  merge-tree: handle directory/empty conflict correctly
2013-05-06 22:18:25 -07:00
John Keeping 94883b4302 merge-tree: handle directory/empty conflict correctly
git-merge-tree causes a null pointer dereference when a directory
entry exists in only one or two of the three trees being compared with
no corresponding entry in the other tree(s).

When this happens, we want to handle the entry as a directory and not
attempt to mark it as a file merge.  Do this by setting the entries bit
in the directory mask when the entry is missing or when it is a
directory, only performing the file comparison when we know that a file
entry exists.

Reported-by: Andreas Jacobsen <andreas@andreasjacobsen.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Tested-by: Andreas Jacobsen <andreas@andreasjacobsen.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-06 22:17:00 -07:00
Junio C Hamano bba5367183 Merge branch 'fc/remote-bzr'
* fc/remote-bzr:
  remote-bzr: avoid bad refs
  remote-bzr: convert all unicode keys to str
  remote-bzr: access branches only when needed
  remote-bzr: delay peer branch usage
  remote-bzr: iterate revisions properly
  remote-bzr: improve progress reporting
  remote-bzr: add option to specify branches
  remote-bzr: add custom method to find branches
  remote-bzr: improve author sanitazion
  remote-bzr: add support for shared repo
  remote-bzr: fix branch names
  remote-bzr: add support for bzr repos
  remote-bzr: use branch variable when appropriate
  remote-bzr: fix partially pushed merge
  remote-bzr: fixes for branch diverge
  remote-bzr: add support to push merges
  remote-bzr: always try to update the worktree
  remote-bzr: fix order of locking in CustomTree
  remote-bzr: delay blob fetching until the very end
  remote-bzr: cleanup CustomTree
2013-05-06 22:16:26 -07:00