)]}'
{
  "commit": "8dc6a373d201839859fe7924b63e57526ee2fc22",
  "tree": "bab104b288613f22fd0139fc11eb5fcf42f29fb5",
  "parents": [
    "046613c5465e4fc0611f93a5ef31d3815fb50c22"
  ],
  "author": {
    "name": "David Barr",
    "email": "david.barr@cordelta.com",
    "time": "Thu Dec 02 21:40:20 2010 +1100"
  },
  "committer": {
    "name": "Jonathan Nieder",
    "email": "jrnieder@gmail.com",
    "time": "Sat Feb 26 04:57:58 2011 -0600"
  },
  "message": "fast-import: add \u0027ls\u0027 command\n\nLazy fast-import frontend authors that want to rely on the backend to\nkeep track of the content of the imported trees _almost_ have what\nthey need in the \u0027cat-blob\u0027 command (v1.7.4-rc0~30^2~3, 2010-11-28).\nBut it is not quite enough, since\n\n (1) cat-blob can be used to retrieve the content of files, but\n     not their mode, and\n\n (2) using cat-blob requires the frontend to keep track of a name\n     (mark number or object id) for each blob to be retrieved\n\nIntroduce an \u0027ls\u0027 command to complement cat-blob and take care of the\nremaining needs.  The \u0027ls\u0027 command finds what is at a given path\nwithin a given tree-ish (tag, commit, or tree):\n\n\t\u0027ls\u0027 SP \u003cdataref\u003e SP \u003cpath\u003e LF\n\nor in fast-import\u0027s active commit:\n\n\t\u0027ls\u0027 SP \u003cpath\u003e LF\n\nThe response is a single line sent through the cat-blob channel,\nimitating ls-tree output.  So for example:\n\n\tFE\u003e ls :1 Documentation\n\tgfi\u003e 040000 tree 9e6c2b599341d28a2a375f8207507e0a2a627fe9\tDocumentation\n\tFE\u003e ls 9e6c2b599341d28a2a375f8207507e0a2a627fe9 git-fast-import.txt\n\tgfi\u003e 100644 blob 4f92954396e3f0f97e75b6838a5635b583708870\tgit-fast-import.txt\n\tFE\u003e ls :1 RelNotes\n\tgfi\u003e 120000 blob b942e499449d97aeb50c73ca2bdc1c6e6d528743\tRelNotes\n\tFE\u003e cat-blob b942e499449d97aeb50c73ca2bdc1c6e6d528743\n\tgfi\u003e b942e499449d97aeb50c73ca2bdc1c6e6d528743 blob 32\n\tgfi\u003e Documentation/RelNotes/1.7.4.txt\n\nThe most interesting parts of the reply are the first word, which is\na 6-digit octal mode (regular file, executable, symlink, directory,\nor submodule), and the part from the second space to the tab, which is\na \u003cdataref\u003e that can be used in later cat-blob, ls, and filemodify (M)\ncommands to refer to the content (blob, tree, or commit) at that path.\n\nIf there is nothing there, the response is \"missing some/path\".\n\nThe intent is for this command to be used to read files from the\nactive commit, so a frontend can apply patches to them, and to copy\nfiles and directories from previous revisions.\n\nFor example, proposed updates to svn-fe use this command in place of\nits internal representation of the repository directory structure.\nThis simplifies the frontend a great deal and means support for\nresuming an import in a separate fast-import run (i.e., incremental\nimport) is basically free.\n\nSigned-off-by: David Barr \u003cdavid.barr@cordelta.com\u003e\nSigned-off-by: Jonathan Nieder \u003cjrnieder@gmail.com\u003e\nImproved-by: Junio C Hamano \u003cgitster@pobox.com\u003e\nImproved-by: Sverre Rabbelier \u003csrabbelier@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c3a2766b206609bb5f313db3ff37a1ebb40f8261",
      "old_mode": 33188,
      "old_path": "Documentation/git-fast-import.txt",
      "new_id": "e1b7a0f9ec88deab1711d99293e23d4396a7bc0c",
      "new_mode": 33188,
      "new_path": "Documentation/git-fast-import.txt"
    },
    {
      "type": "modify",
      "old_id": "3886a1b46415ddbf66e5c2be401ad7fd2c012363",
      "old_mode": 33188,
      "old_path": "fast-import.c",
      "new_id": "6c37b8400a143db55e3e16c6a3af788aa0467322",
      "new_mode": 33188,
      "new_path": "fast-import.c"
    },
    {
      "type": "modify",
      "old_id": "52ac0e56dce12016ab03155bd16b2b66b062fca3",
      "old_mode": 33261,
      "old_path": "t/t9300-fast-import.sh",
      "new_id": "6b1ba6c858562b7c085951fb1d69d4d2371e866c",
      "new_mode": 33261,
      "new_path": "t/t9300-fast-import.sh"
    }
  ]
}
