t9350: point out that refs are not updated correctly

This happens only when the corresponding commits are not exported in
the current fast-export run. This can happen either when the relevant
commit is already marked, or when the commit is explicitly marked
as UNINTERESTING with a negative ref by another argument.

This breaks fast-export basec remote helpers.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
fast-export: do not refer to non-existing marks

When calling `git fast-export a..a b` when a and b refer to the same
commit, nothing would be exported, and an incorrect reset line would
be printed for b ('from :0').

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
setup_revisions: remember whether a ref was positive or not

This will be required by fast-export, when no commits were
exported, but the refs should be set, of course.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
fast-export: do not export negative refs

When calling `git fast-export master..next` we want to export
refs/heads/next, but not refs/heads/master.

Currently this is not a problem, because negative refs' commits
are never shown. In the next commit this will be changed in order
to make sure that 'master..master' does export master. I.e. even
refs whose commits are not shown are exported.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
setup_revisions: remember whether a ref was positive or not

This will be required by fast-export, when no commits were
exported, but the refs should be set, of course.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
t5800: test pushing a new branch with old content

This works now that fast-export has been fixed to properly handle
refs that point to a commit that was not exported during the current
fast-export run.
t5800: point out that deleting branches does not work

This test actually breaks the repositories involved somehow, so it is
not enabled by default.
transport-helper: add trailing --
remote-helper: check helper status after import/export

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
remote-testgit: factor out RemoteHelper class

Facilitate writing import-export based helpers in python by
refactoring common code to a base class.

Signed-off-by: Sverre Rabbelier <srabbelier@gmail.com>
git-remote-testgit: make local a function

Other helpers (such as git-remote-hg) require that 'self.local' is a
function, rather than a variable.
git_remote_helpers: add fastimport library
git-remote-hg: add hgimport, an hg-fast-import equivalent

This class will be used by git-remote-hg to do the heavy lifting.
git-remote-hg: add GitHg, a helper class for converting hg commits to git

This class will be used by HgExport.
git-remote-hg: add hgexport, an hg-fast-export equivalent

This class will be used by git-remote-hg to do the heavy lifting.
git-remote-hg: add GitExporter/GitImporter/NonLocalGit

This is inftrastructure required to implement git-remote-hg.
git-remote-hg: add the helper

The helper uses the previously added infrastructure.
git-remote-hg: add tests
t5800: clarify skip message

The skip message takes about remote-hg while the tests are about the
general remote helper framework (and don't require hg). Correct the
message.
t5801: skip without hg

The tests for remote-hg require hg, so skip them all when there is no
hg available.