Merge branch 'fc/transport-helper-fixes'
authorJunio C Hamano <gitster@pobox.com>
Tue, 18 Mar 2014 20:49:32 +0000 (13:49 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Mar 2014 20:49:33 +0000 (13:49 -0700)
Updates transport-helper, fast-import and fast-export to allow the
ref mapping and ref deletion in a way similar to the natively
supported transports.

* fc/transport-helper-fixes:
remote-bzr: support the new 'force' option
test-hg.sh: tests are now expected to pass
transport-helper.c: do not overwrite forced bit
transport-helper: check for 'forced update' message
transport-helper: add 'force' to 'export' helpers
transport-helper: don't update refs in dry-run
transport-helper: mismerge fix

1  2 
Documentation/gitremote-helpers.txt
contrib/remote-helpers/git-remote-bzr
contrib/remote-helpers/test-bzr.sh
contrib/remote-helpers/test-hg.sh
transport-helper.c
index c2908db76317c91cf5502065e9c4bf1d97da19bd,e75699ce1f7177e2453d06506ed2d7586f00f6ab..64f7ad26b40085ced91e73fd806c11e90ad2eb9a
@@@ -437,13 -437,10 +437,17 @@@ set by Git if the remote helper has th
  'option check-connectivity' \{'true'|'false'\}::
        Request the helper to check connectivity of a clone.
  
+ 'option force' \{'true'|'false'\}::
+       Request the helper to perform a force update.  Defaults to
+       'false'.
 +'option cloning \{'true'|'false'\}::
 +      Notify the helper this is a clone request (i.e. the current
 +      repository is guaranteed empty).
 +
 +'option update-shallow \{'true'|'false'\}::
 +      Allow to extend .git/shallow if the new refs require it.
 +
  SEE ALSO
  --------
  linkgit:git-remote[1]
index 332aba784b8810120df8e1ddfafeb034a55337a3,f1ba477fb8f75eb646befd80feb9af08b10b8d35..5f4b2e3e160f60955e25f8b8fedf8c122dd5c73c
@@@ -882,17 -908,8 +907,18 @@@ def main(args)
      global is_tmp
      global branches, peers
      global transports
+     global force
  
 +    marks = None
 +    is_tmp = False
 +    gitdir = os.environ.get('GIT_DIR', None)
 +
 +    if len(args) < 3:
 +        die('Not enough arguments.')
 +
 +    if not gitdir:
 +        die('GIT_DIR not set')
 +
      alias = args[1]
      url = args[2]
  
Simple merge
Simple merge
index ad72fbd53cb7bfc7fc037d98288b0cc831ea949a,705dce7e049af441f706ea56b8c5ca82bf2b5482..86e1679c1e0e1e58ebe5297f4c5f48ca1a1f6418
@@@ -650,12 -643,12 +650,12 @@@ static int push_update_ref_status(struc
                                   struct ref *remote_refs)
  {
        char *refname, *msg;
-       int status;
+       int status, forced = 0;
  
 -      if (!prefixcmp(buf->buf, "ok ")) {
 +      if (starts_with(buf->buf, "ok ")) {
                status = REF_STATUS_OK;
                refname = buf->buf + 3;
 -      } else if (!prefixcmp(buf->buf, "error ")) {
 +      } else if (starts_with(buf->buf, "error ")) {
                status = REF_STATUS_REMOTE_REJECT;
                refname = buf->buf + 6;
        } else