)]}'
{
  "commit": "0da0e49ba12225684b75e86a4c9344ad121652cb",
  "tree": "d067e52acdec5b2a7d0b6933e9d72f7aecb20f6f",
  "parents": [
    "957e2ad28290076fffe3bf28ae8609c637cf8151"
  ],
  "author": {
    "name": "Jonathan Nieder",
    "email": "jrnieder@gmail.com",
    "time": "Mon Nov 20 13:30:04 2017 -0800"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Tue Nov 21 14:01:03 2017 +0900"
  },
  "message": "ssh: \u0027auto\u0027 variant to select between \u0027ssh\u0027 and \u0027simple\u0027\n\nAndroid\u0027s \"repo\" tool is a tool for managing a large codebase\nconsisting of multiple smaller repositories, similar to Git\u0027s\nsubmodule feature.  Starting with Git 94b8ae5a (ssh: introduce a\n\u0027simple\u0027 ssh variant, 2017-10-16), users noticed that it stopped\nhandling the port in ssh:// URLs.\n\nThe cause: when it encounters ssh:// URLs, repo pre-connects to the\nserver and sets GIT_SSH to a helper \".repo/repo/git_ssh\" that reuses\nthat connection.  Before 94b8ae5a, the helper was assumed to support\nOpenSSH options for lack of a better guess and got passed a -p option\nto set the port.  After that patch, it uses the new default of a\nsimple helper that does not accept an option to set the port.\n\nThe next release of \"repo\" will set GIT_SSH_VARIANT to \"ssh\" to avoid\nthat.  But users of old versions and of other similar GIT_SSH\nimplementations would not get the benefit of that fix.\n\nSo update the default to use OpenSSH options again, with a twist.  As\nobserved in 94b8ae5a, we cannot assume that $GIT_SSH always handles\nOpenSSH options: common helpers such as travis-ci\u0027s dpl[*] are\nconfigured using GIT_SSH and do not accept OpenSSH options.  So make\nthe default a new variant \"auto\", with the following behavior:\n\n 1. First, check for a recognized basename, like today.\n\n 2. If the basename is not recognized, check whether $GIT_SSH supports\n    OpenSSH options by running\n\n\t$GIT_SSH -G \u003coptions\u003e \u003chost\u003e\n\n    This returns status 0 and prints configuration in OpenSSH if it\n    recognizes all \u003coptions\u003e and returns status 255 if it encounters\n    an unrecognized option.  A wrapper script like\n\n\texec ssh -- \"$@\"\n\n    would fail with\n\n\tssh: Could not resolve hostname -g: Name or service not known\n\n    , correctly reflecting that it does not support OpenSSH options.\n    The command is run with stdin, stdout, and stderr redirected to\n    /dev/null so even a command that expects a terminal would exit\n    immediately.\n\n 3. Based on the result from step (2), behave like \"ssh\" (if it\n    succeeded) or \"simple\" (if it failed).\n\nThis way, the default ssh variant for unrecognized commands can handle\nboth the repo and dpl cases as intended.\n\nThis autodetection has been running on Google workstations since\n2017-10-23 with no reported negative effects.\n\n[*] https://github.com/travis-ci/dpl/blob/6c3fddfda1f2a85944c544446b068bac0a77c049/lib/dpl/provider.rb#L215\n\nReported-by: William Yan \u003cwyan@google.com\u003e\nImproved-by: Jonathan Tan \u003cjonathantanmy@google.com\u003e\nSigned-off-by: Jonathan Nieder \u003cjrnieder@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0460af37e2617d0ab7ab8f33c3d9d745237da606",
      "old_mode": 33188,
      "old_path": "Documentation/config.txt",
      "new_id": "0c371ad7863841a265eebf1a267dd6fcc79a2a0d",
      "new_mode": 33188,
      "new_path": "Documentation/config.txt"
    },
    {
      "type": "modify",
      "old_id": "f3370510a6dbb63049d3f6171d7c534ac366777e",
      "old_mode": 33188,
      "old_path": "connect.c",
      "new_id": "a939323d05afe2df3ff123512dc73d84d2fcf5a3",
      "new_mode": 33188,
      "new_path": "connect.c"
    },
    {
      "type": "modify",
      "old_id": "4a16a0b7ddd8ef9a9e9f241c0843178fbdf549d7",
      "old_mode": 33261,
      "old_path": "t/t5601-clone.sh",
      "new_id": "d96b8e737999aeb411bd99b892ef9bc2d36d5e65",
      "new_mode": 33261,
      "new_path": "t/t5601-clone.sh"
    }
  ]
}
