{"action":"created","issue":{"url":"https://api.github.com/repos/ipfs/notes/issues/23","labels_url":"https://api.github.com/repos/ipfs/notes/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/ipfs/notes/issues/23/comments","events_url":"https://api.github.com/repos/ipfs/notes/issues/23/events","html_url":"https://github.com/ipfs/notes/issues/23","id":92570173,"number":23,"title":"Commit + Repo Datastructures","user":{"login":"jbenet","id":138401,"avatar_url":"https://avatars.githubusercontent.com/u/138401?v=3","gravatar_id":"","url":"https://api.github.com/users/jbenet","html_url":"https://github.com/jbenet","followers_url":"https://api.github.com/users/jbenet/followers","following_url":"https://api.github.com/users/jbenet/following{/other_user}","gists_url":"https://api.github.com/users/jbenet/gists{/gist_id}","starred_url":"https://api.github.com/users/jbenet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbenet/subscriptions","organizations_url":"https://api.github.com/users/jbenet/orgs","repos_url":"https://api.github.com/users/jbenet/repos","events_url":"https://api.github.com/users/jbenet/events{/privacy}","received_events_url":"https://api.github.com/users/jbenet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-02T07:31:33Z","updated_at":"2015-09-22T18:59:25Z","closed_at":null,"body":"Versioning has been a long time coming.\r\n\r\nWe need to construct the necessary data types before we start making any tooling around it. The types \r\n\r\n**The SYNTAX of the \"merkldag DSL\" is still TBD (#22), but for now using go-like**\r\n\r\n### first, some types we need\r\n\r\n```go\r\n// Any is any merkledag Node\r\n\r\ntype Identity struct {\r\n  Key SigningKey // link to a signing key\r\n\r\n  Data struct {\r\n    Name string // the \"name\" of the identity\r\n  }\r\n}\r\n\r\ntype Authorship struct {\r\n  Author Identity\r\n\r\n  Data struct {\r\n    Date string // ISO timestamp in UTC?\r\n  }\r\n}\r\n\r\ntype Signature struct {\r\n  Object Any        // link to the signed object\r\n  Key    SigningKey // link to the signing key\r\n\r\n  Data struct {\r\n    Signature []byte // the signature bytes\r\n  }\r\n}\r\n\r\n// generic type that terminates in a certain other leaf type\r\ntype Tree<LEAF_TYPE> struct {\r\n  NAME Link<Tree | LEAF_TYPE>\r\n  ...\r\n}\r\n```\r\n\r\n### the versioning data types\r\n\r\n```go\r\ntype Commit struct {\r\n  Parents   []Commit     // \"parent0\" ... \"parentN\"\r\n  Author    Authorship   // link to an Authorship\r\n  Committer Authorship   // link to an Authorship\r\n  Object    Any          // what we version (\"tree\" in git)\r\n\r\n  Data struct {\r\n    Comment String // describes the commit\r\n  }\r\n}\r\n\r\ntype VersionRepository struct {\r\n  Refs Tree<Commit> // hierarchy of {branches, tags, heads, remotes, ... }\r\n  Logs Tree<File>   // reflogs, etc... (maybe should be other than files...)\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/ipfs/notes/issues/comments/142386009","html_url":"https://github.com/ipfs/notes/issues/23#issuecomment-142386009","issue_url":"https://api.github.com/repos/ipfs/notes/issues/23","id":142386009,"user":{"login":"ion1","id":39660,"avatar_url":"https://avatars.githubusercontent.com/u/39660?v=3","gravatar_id":"","url":"https://api.github.com/users/ion1","html_url":"https://github.com/ion1","followers_url":"https://api.github.com/users/ion1/followers","following_url":"https://api.github.com/users/ion1/following{/other_user}","gists_url":"https://api.github.com/users/ion1/gists{/gist_id}","starred_url":"https://api.github.com/users/ion1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ion1/subscriptions","organizations_url":"https://api.github.com/users/ion1/orgs","repos_url":"https://api.github.com/users/ion1/repos","events_url":"https://api.github.com/users/ion1/events{/privacy}","received_events_url":"https://api.github.com/users/ion1/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T18:59:25Z","updated_at":"2015-09-22T18:59:25Z","body":"Please consider adding a variant of a merge commit whose meaning is history rewriting.\r\n\r\nThe first parent will point to the new history. User interfaces are supposed to act as if it was the only parent unless the user requests otherwise. Where possible, the rewrite commit could be rendered as something like an unobtrusive collapsed bar between commit messages.\r\n\r\nThe hidden secondary parent will point to the history that was “rewritten”.\r\n\r\nThis would alleviate much of the need Git has for forced pushes in development branches to keep the commit history clean. It would also let one view what changed in the “rewrite” unlike with Git rewrites."}}