Merge branch 'tr/http-push-ref-status'
authorJunio C Hamano <gitster@pobox.com>
Wed, 20 Jan 2010 22:39:48 +0000 (14:39 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 20 Jan 2010 22:39:48 +0000 (14:39 -0800)
* tr/http-push-ref-status:
  transport-helper.c::push_refs(): emit "no refs" error message
  transport-helper.c::push_refs(): ignore helper-reported status if ref is not to be pushed
  transport.c::transport_push(): make ref status affect return value
  refactor ref status logic for pushing
  t5541-http-push.sh: add test for unmatched, non-fast-forwarded refs
  t5541-http-push.sh: add tests for non-fast-forward pushes

Conflicts:
transport-helper.c

1  2 
transport-helper.c
transport.c

index ca8fa92e638e2589e2b6b8ffbe21ac824b5274a5,8c0b575f322c56c701448adc7acc976575e1ad98..fdf22562201d12d1321baae9157a0ca70053a7cb
@@@ -523,13 -321,11 +523,16 @@@ static int push_refs(struct transport *
        struct child_process *helper;
        struct ref *ref;
  
-       if (!remote_refs)
 +      if (process_connect(transport, 1)) {
 +              do_take_over(transport);
 +              return transport->push_refs(transport, remote_refs, flags);
 +      }
 +
+       if (!remote_refs) {
+               fprintf(stderr, "No refs in common and none specified; doing nothing.\n"
+                       "Perhaps you should specify a branch such as 'master'.\n");
                return 0;
+       }
  
        helper = get_helper(transport);
        if (!data->push)
diff --cc transport.c
Simple merge