{"thread":{"id":"1582","subject":"[Not A Patch] Octopus demo","startedAt":"2005-08-19T01:05:07Z","lastAt":"2005-08-19T01:05:07Z","messageCount":1,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"7538","messageId":"7vy86yd9do.fsf@assigned-by-dhcp.cox.net","threadId":"1582","inReplyTo":null,"subject":"[Not A Patch] Octopus demo","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-19T01:05:07Z","receivedAt":"2005-08-19T01:05:07Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Create an empty directory and running this script in there would\nlet you see the original Octopus in action.\n\n\n---\n#!/bin/sh\n\ntest -d .saved-git || {\n    U=http://www.kernel.org/pub/scm/git/git.git\n    GIT_DIR=.saved-git\n    export GIT_DIR\n    git-init-db\n    : >$GIT_DIR/FETCH_HEAD\n    h=0\n    while read SHA1\n    do\n\t    git-http-pull -a -v $SHA1 $U\n\t    h=$(expr $h + 1)\n\t    echo $SHA1 >$GIT_DIR/refs/heads/H$h\n\t    echo \"$SHA1\theads/H$h\" >>$GIT_DIR/FETCH_HEAD\n    done <<\\EOF\nfc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc\n9e30dd7c0ecc9f10372f31539d0122db97418353\nc4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a\n660265909fc178581ef327076716dfd3550e6e7b\nb28858bf65d4fd6d8bb070865518ec43817fe7f3\nEOF\n    echo ed4eeaf203d0f293bd5ffc2a0ad8711f052db1f3 >$GIT_DIR/HEAD\n}\n\nrm -fr testing\ngit clone -l ./.saved-git testing\ncp .saved-git/FETCH_HEAD testing/.git/.\n\ncd testing || exit\n\ngit show-branches\ngit checkout\n\ngit octopus || exit\n\ngit show-branches\ngit-rev-list --max-count=1 --pretty HEAD\n"}]}