There's not much to do when marks are not available, except pushing
everything, so let's do so by avoiding the negative refs (e.g.
^refs/testgit/origin/master).

Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---
 t/t5801-remote-helpers.sh | 2 +-
 transport-helper.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t5801-remote-helpers.sh b/t/t5801-remote-helpers.sh
index 9c7871b..456303b 100755
--- a/t/t5801-remote-helpers.sh
+++ b/t/t5801-remote-helpers.sh
@@ -141,7 +141,7 @@ test_expect_success 'pulling without marks' '
        compare_refs local2 HEAD server HEAD
 '
 
-test_expect_failure 'pushing without marks' '
+test_expect_success 'pushing without marks' '
        test_when_finished "(cd local2 && git reset --hard origin)" &&
        (cd local2 &&
        echo content >>file &&
diff --git a/transport-helper.c b/transport-helper.c
index 6dbb72e..78e4e82 100644
--- a/transport-helper.c
+++ b/transport-helper.c
@@ -781,7 +781,7 @@ static int push_refs_with_export(struct transport 
*transport,
                if (ref->peer_ref)
                        string_list_append(&revlist_args, ref->peer_ref->name);
 
-               if (!data->refspecs)
+               if (!data->refspecs || !data->import_marks)
                        continue;
                private = apply_refspecs(data->refspecs, data->refspec_nr, 
ref->name);
                if (private && strcmp(private, ref->name) && !get_sha1(private, 
sha1)) {
-- 
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to