{"thread":{"id":"550","subject":"Re: History messup","startedAt":"2005-05-09T16:59:31Z","lastAt":"2005-05-11T20:31:22Z","messageCount":11,"participants":["Thomas Glanzmann","Thomas Gleixner","David Woodhouse","H. Peter Anvin","Sean","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2888","messageId":"1115657971.19236.33.camel@tglx","threadId":"550","inReplyTo":null,"subject":"History messup","fromName":"Thomas Gleixner","fromEmail":"tglx@linutronix.de","sentAt":"2005-05-09T16:59:31Z","receivedAt":"2005-05-09T16:59:31Z","isPatch":false,"sender":{"key":"tglx@linutronix.de","avatar":null},"body":"Hi,\n\nI wrote a git repository tracker, which can track and coordinate\nmultiple git repositories. Before it goes public, I want to clarify a\nproblem which I encountered\n\nThe commit bfd4bda097f8758d28e632ff2035e25577f6b060 \nby David Woodhouse (Thu May 5 12:59:37 2005 +100)  \nMerge with\nmaster.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git \n\nbreaks the history.\n\nDavid merged from Linus repository . Linus synced later with David.\nLinus did not create a new commit for this update and just pointed his\n\"HEAD\" to Davids \"HEAD\", which means he forked Davids repository at this\npoint.\n\nDue to that the parent->parent history is not longer unique. This makes\nit impossible to do file revision graphs over the various repositories\nin the correct order.\n\nIs this a unique problem or is the omission of a commit in cases like\nthat usual practice ? In the latter case proper history tracking is\nalmost impossible.\n\ntglx\n\n\n"},{"id":"2887","messageId":"20050509170611.GJ24216@cip.informatik.uni-erlangen.de","threadId":"550","inReplyTo":"1115657971.19236.33.camel@tglx","subject":"Re: History messup","fromName":"Thomas Glanzmann","fromEmail":"sithglan@stud.uni-erlangen.de","sentAt":"2005-05-09T17:06:11Z","receivedAt":"2005-05-09T17:06:11Z","isPatch":false,"sender":{"key":"sithglan@stud.uni-erlangen.de","avatar":null},"body":"Hello,\nif merging with a repository just means to bring the head forward (e.g.\nno local development since the fork) there is no seperate commit object,\njust an update of the HEAD. Linus did explain this behaviour and the\nthoughts behind this decission on the ML:\n\nIf two repositories pull alternating from each other one has never the\nexact state the other has. They would play ping-pong and this is a bad\nthing. That was AFAIK the reason there is no COMMIT object introduced on\n'head forward' merges.\n\n\tThomas\n"},{"id":"2892","messageId":"1115659677.16187.393.camel@hades.cambridge.redhat.com","threadId":"550","inReplyTo":"1115657971.19236.33.camel@tglx","subject":"Re: History messup","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-05-09T17:27:57Z","receivedAt":"2005-05-09T17:27:57Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2005-05-09 at 16:59 +0000, Thomas Gleixner wrote:\n> David merged from Linus repository . Linus synced later with David.\n> Linus did not create a new commit for this update and just pointed his\n> \"HEAD\" to Davids \"HEAD\", which means he forked Davids repository at\n> this point.\n> \n> Due to that the parent->parent history is not longer unique. This\n> makes it impossible to do file revision graphs over the various\n> repositories in the correct order.\n> \n> Is this a unique problem or is the omission of a commit in cases like\n> that usual practice ? In the latter case proper history tracking is\n> almost impossible.\n\nIt's normal practice, and it _has_ to be the case. Otherwise the trees\nwould never stabilise -- every time Linus pulled from my tree he would\ncreate a merge-commit which I don't yet have, and vice versa.\n\nUnless a commit also carries a unique repo-id identifying the repository\nin which it originally occurred, you'll only ever be able to track\nhistory in the way people want by means of heuristics.\n\n-- \ndwmw2\n\n"},{"id":"2894","messageId":"1115660903.19236.39.camel@tglx","threadId":"550","inReplyTo":"1115659677.16187.393.camel@hades.cambridge.redhat.com","subject":"Re: History messup","fromName":"Thomas Gleixner","fromEmail":"tglx@linutronix.de","sentAt":"2005-05-09T17:48:23Z","receivedAt":"2005-05-09T17:48:23Z","isPatch":false,"sender":{"key":"tglx@linutronix.de","avatar":null},"body":"On Mon, 2005-05-09 at 18:27 +0100, David Woodhouse wrote:\n> On Mon, 2005-05-09 at 16:59 +0000, Thomas Gleixner wrote:\n\n> It's normal practice, and it _has_ to be the case. Otherwise the trees\n> would never stabilise -- every time Linus pulled from my tree he would\n> create a merge-commit which I don't yet have, and vice versa.\n\nSure\n\n> Unless a commit also carries a unique repo-id identifying the repository\n> in which it originally occurred, you'll only ever be able to track\n> history in the way people want by means of heuristics.\n\nThat would be really great. A line after \"parents\" like\n\nrepoid \"username/reponame\" \n\nwould be sufficient\n\ntglx\n\n\n"},{"id":"2897","messageId":"1115661954.19236.44.camel@tglx","threadId":"550","inReplyTo":"20050509170611.GJ24216@cip.informatik.uni-erlangen.de","subject":"Re: History messup","fromName":"Thomas Gleixner","fromEmail":"tglx@linutronix.de","sentAt":"2005-05-09T18:05:54Z","receivedAt":"2005-05-09T18:05:54Z","isPatch":false,"sender":{"key":"tglx@linutronix.de","avatar":null},"body":"On Mon, 2005-05-09 at 19:06 +0200, Thomas Glanzmann wrote:\n> If two repositories pull alternating from each other one has never the\n> exact state the other has. They would play ping-pong and this is a bad\n> thing. That was AFAIK the reason there is no COMMIT object introduced on\n> 'head forward' merges.\n\nThat makes totaly sense, but for history tracking it is a horror\nscenario, unless you dont have head history lists per repository or an\nunique repository identifier in the commit blob itself.\n\ntglx\n\n\n"},{"id":"2905","messageId":"427FB3A7.8050906@zytor.com","threadId":"550","inReplyTo":"1115660903.19236.39.camel@tglx","subject":"Re: History messup","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-09T19:01:59Z","receivedAt":"2005-05-09T19:01:59Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"Thomas Gleixner wrote:\n> \n> That would be really great. A line after \"parents\" like\n> \n> repoid \"username/reponame\" \n> \n> would be sufficient\n> \n\nSeems like a UUID or a SHA-1 identifier would be better.\n\nHowever, one can definitely argue that even the meaning of \"a \nrepository\" isn't well-defined in the context of git.\n\n\t-hpa\n"},{"id":"2906","messageId":"1115665598.12012.422.camel@baythorne.infradead.org","threadId":"550","inReplyTo":"427FB3A7.8050906@zytor.com","subject":"Re: History messup","fromName":"David Woodhouse","fromEmail":"dwmw2@infradead.org","sentAt":"2005-05-09T19:06:38Z","receivedAt":"2005-05-09T19:06:38Z","isPatch":false,"sender":{"key":"dwmw2@infradead.org","avatar":"https://gravatar.com/avatar/7afd4f07e0cf7d7e046ae2d23678296b37777c96488e6f3451e78a5514154ebd?d=mp&s=160"},"body":"On Mon, 2005-05-09 at 12:01 -0700, H. Peter Anvin wrote:\n> Seems like a UUID or a SHA-1 identifier would be better.\n> \n> However, one can definitely argue that even the meaning of \"a \n> repository\" isn't well-defined in the context of git.\n\nOf course it isn't. But neither is the meaning \"a committer\" or \n\"an author\" or even \"a date\".\n\nIncluding some kind of repo-specific identifier with each commit would\nhelp us to make sense of the history, just as those other fields do.\n\n-- \ndwmw2\n\n\n"},{"id":"2907","messageId":"427FBB53.1000801@zytor.com","threadId":"550","inReplyTo":"1115665598.12012.422.camel@baythorne.infradead.org","subject":"Re: History messup","fromName":"H. Peter Anvin","fromEmail":"hpa@zytor.com","sentAt":"2005-05-09T19:34:43Z","receivedAt":"2005-05-09T19:34:43Z","isPatch":false,"sender":{"key":"hpa@zytor.com","avatar":null},"body":"David Woodhouse wrote:\n> \n> Of course it isn't. But neither is the meaning \"a committer\" or \n> \"an author\" or even \"a date\".\n> \n> Including some kind of repo-specific identifier with each commit would\n> help us to make sense of the history, just as those other fields do.\n> \n\nI'm particularly thinking of when you copy and clone directories, you \nhave to define your semantics more specifically.  When do you want to \n*copy* this ID, and when do you want to make sure a new one is created?\n\nOne possible answer to that is to have .git/repoid and have it \nauto-created (from /dev/urandom) if it doesn't exist, but I also observe \nthat at least two people (davem and pavel) have managed to clone \"Linus' \nkernel tree\" as their description on http://www.kernel.org/git/ ...\n\n\t-hpa\n"},{"id":"2914","messageId":"3772.10.10.10.24.1115676539.squirrel@linux1","threadId":"550","inReplyTo":"427FBB53.1000801@zytor.com","subject":"Re: History messup","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-05-09T22:08:59Z","receivedAt":"2005-05-09T22:08:59Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Mon, May 9, 2005 3:34 pm, H. Peter Anvin said:\n> I'm particularly thinking of when you copy and clone directories, you\n> have to define your semantics more specifically.  When do you want to\n> *copy* this ID, and when do you want to make sure a new one is created?\n\nWhat question will a repoid let you answer?\n\nIsn't the real problem, where to store \"repoid\"?  Obviously it would be\nstored in each commit created in a repo, but that's not really the\nproblem.   The problem is identifying which repo each branch belongs to as\nyou traverse the history.  This lets you ask questions like, \"was this\ncommit created on this branch, or is it just a copy\".\n\nBut just as the committer information in each object doesn't help you\nidentify the branch, nor will having a repoid inside each commit.   The\nproblem is labelling the branch, not the commits found in it.  And there\nis no place to store the repoid for each branch.\n\nUsing the repoid of the first commit found on a branch is pretty close,\nbut fails because it might be a fast-forward HEAD rather than a genuine\nlocal commit of the source repository.  So there is no way to know as you\nembark down a branch its repoid, so you have nothing to compare against\nthe repoid inside each commit you find along its path.\n\nSeems the only solution is a full search of the history, unless there is\nsome clever way to label branches or detect fast forward heads.\n\n> One possible answer to that is to have .git/repoid and have it\n> auto-created (from /dev/urandom) if it doesn't exist, but I also observe\n> that at least two people (davem and pavel) have managed to clone \"Linus'\n> kernel tree\" as their description on http://www.kernel.org/git/ ...\n\n:o)\n\nsean\n\n\n"},{"id":"3053","messageId":"1115831345.22180.75.camel@tglx","threadId":"550","inReplyTo":"3772.10.10.10.24.1115676539.squirrel@linux1","subject":"Re: History messup","fromName":"Thomas Gleixner","fromEmail":"tglx@linutronix.de","sentAt":"2005-05-11T17:09:05Z","receivedAt":"2005-05-11T17:09:05Z","isPatch":false,"sender":{"key":"tglx@linutronix.de","avatar":null},"body":"On Mon, 2005-05-09 at 18:08 -0400, Sean wrote:\n> On Mon, May 9, 2005 3:34 pm, H. Peter Anvin said:\n> Seems the only solution is a full search of the history, unless there is\n> some clever way to label branches or detect fast forward heads.\n\nYou can apply some heuristic guessing to detect fast forward heads, but\nat the very end you will end up with manual selection puzzles.\n\nOn one hand we keep care to track the source of a change in the kernel\ncode by adding signed,acked but on the other hand we don't care about\nhistory correctness. If you look at some file revisions, which you read\nfrom the tree history then you just have patches applied in the wrong\norder. \n\nMaybe nobody cares, but for maintaining customer trees with a bugfix,\nstable and experimental branch it's necessary to keep track of\ninformation in a consistent way especially if you have to deal with the\nQA department.\n\nI know that there is no simple and fool proof solution for this problem,\nbut some band-aid to make the reconstruction of history simpler would be\nnot too bad. \n\ntglx\n\n\n"},{"id":"3061","messageId":"20050511203122.GD22686@pasky.ji.cz","threadId":"550","inReplyTo":"1115665598.12012.422.camel@baythorne.infradead.org","subject":"Re: History messup","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-11T20:31:22Z","receivedAt":"2005-05-11T20:31:22Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Mon, May 09, 2005 at 09:06:38PM CEST, I got a letter\nwhere David Woodhouse <dwmw2@infradead.org> told me that...\n> On Mon, 2005-05-09 at 12:01 -0700, H. Peter Anvin wrote:\n> > Seems like a UUID or a SHA-1 identifier would be better.\n> > \n> > However, one can definitely argue that even the meaning of \"a \n> > repository\" isn't well-defined in the context of git.\n> \n> Of course it isn't. But neither is the meaning \"a committer\" or \n> \"an author\" or even \"a date\".\n> \n> Including some kind of repo-specific identifier with each commit would\n> help us to make sense of the history, just as those other fields do.\n\nFWIW, I recently added .git/branch-name to Cogito, since I needed some\nidentifier through which to differentiate between the branches\n(repositories - it's all blurred in Cogito view) when sending commits\nto CIA.\n\nIt is strictly per-branch (never to be shared by multiple repositories),\noptional, informative and more of a temporary solution for now I had to\ncook together in a minute.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"}]}