{"thread":{"id":"50642","subject":"worth enhancing \"man git-rebase\" to show non-HEAD examples?","startedAt":"2019-03-04T15:01:38Z","lastAt":"2019-03-05T13:16:54Z","messageCount":3,"participants":["Robert P. J. Day","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"370607","messageId":"alpine.LFD.2.21.1903040955540.16666@localhost.localdomain","threadId":"50642","inReplyTo":null,"subject":"worth enhancing \"man git-rebase\" to show non-HEAD examples?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2019-03-04T15:01:32Z","receivedAt":"2019-03-04T15:01:38Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"\n  one of the things i've noticed about the examples in \"man\ngit-rebase\" is that they invariably show rebasing relative to a\nbranch point that has not moved. for example, there's this example:\n\n       o---o---o---o---o  master\n            \\\n             o---o---o---o---o  next\n                              \\\n                               o---o---o  topic\n\nwith subsequent sample command:\n\n  $ git rebase --onto master next topic\n\nsure, that works, but there seem to be no examples that show that this\nis a valid starting point as well:\n\n       o---o---o---o---o  master\n            \\\n             o---o---o---o---o  next\n                      \\\n                       o---o---o  topic\n\nas in, the examples in that man page could potentially suggest to an\ninexperienced reader that the *only* valid situations are rebasing as\nlong as the other branch has not developed any further. (yes, i\nrealize that, if you read carefully, it *should* make it clear, but i\nthink it would be helpful to at least graphically show that\nhappening.)\n\n  thoughts?\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n\n"},{"id":"370707","messageId":"xmqqef7lv53z.fsf@gitster-ct.c.googlers.com","threadId":"50642","inReplyTo":"alpine.LFD.2.21.1903040955540.16666@localhost.localdomain","subject":"Re: worth enhancing \"man git-rebase\" to show non-HEAD examples?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2019-03-05T13:10:56Z","receivedAt":"2019-03-05T13:11:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n\n>   one of the things i've noticed about the examples in \"man\n> git-rebase\" is that they invariably show rebasing relative to a\n> branch point that has not moved. for example, there's this example:\n>\n>        o---o---o---o---o  master\n>             \\\n>              o---o---o---o---o  next\n>                               \\\n>                                o---o---o  topic\n>\n> with subsequent sample command:\n>\n>   $ git rebase --onto master next topic\n>\n> sure, that works, but there seem to be no examples that show that this\n> is a valid starting point as well:\n>\n>\n>        o---o---o---o---o  master\n>             \\\n>              o---o---o---o---o  next\n>                       \\\n>                        o---o---o  topic\n\nYou mean that the 'topic' forked from 'next', and it is OK for 'next'\nto acquire further commits since 'topic' forked from it, for you to\nrebase 'topic' on another history?\n\nThe very first example in Documentation/git-rebase.txt shows a\n3-commit topic A-B-C, forked from the master branch at E in 4-commit\nD-E-F-G sequence, gets rebased.  Those F and G are in the same place\nas those rightmost two commits you have on 'next' in the above\npicture.\n\n> as in, the examples in that man page could potentially suggest to an\n> inexperienced reader that the *only* valid situations are rebasing as\n> long as the other branch has not developed any further. (yes, i\n> realize that, if you read carefully, it *should* make it clear, but i\n> think it would be helpful to at least graphically show that\n> happening.)\n>\n>   thoughts?\n\nSo, we have both pictures, and I do not see there is much to add.\n\nBy the way, I sense a mis-perception that led you to say \"... has\nnot developed any further\".  In the topology in your second\nillustration, there is nothing to say that the rightmost two commits\non the 'next' branch were created _after_ topic has forked from\n'next'.  It is not just possible but also often is sensible to fork\na topic closer to what it needs to build on top of, limiting its\ndependency as small as possible, so the 'topic' could have been\nforked from the middle of 'next' branch when it was originally\ncreated.\n\n"},{"id":"370708","messageId":"alpine.LFD.2.21.1903050816130.28986@localhost.localdomain","threadId":"50642","inReplyTo":"xmqqef7lv53z.fsf@gitster-ct.c.googlers.com","subject":"Re: worth enhancing \"man git-rebase\" to show non-HEAD examples?","fromName":"Robert P. J. Day","fromEmail":"rpjday@crashcourse.ca","sentAt":"2019-03-05T13:16:48Z","receivedAt":"2019-03-05T13:16:54Z","isPatch":false,"sender":{"key":"rpjday@crashcourse.ca","avatar":"https://avatars.githubusercontent.com/u/226084077?v=4"},"body":"On Tue, 5 Mar 2019, Junio C Hamano wrote:\n\n> \"Robert P. J. Day\" <rpjday@crashcourse.ca> writes:\n>\n> >   one of the things i've noticed about the examples in \"man\n> > git-rebase\" is that they invariably show rebasing relative to a\n> > branch point that has not moved. for example, there's this example:\n> >\n> >        o---o---o---o---o  master\n> >             \\\n> >              o---o---o---o---o  next\n> >                               \\\n> >                                o---o---o  topic\n> >\n> > with subsequent sample command:\n> >\n> >   $ git rebase --onto master next topic\n> >\n> > sure, that works, but there seem to be no examples that show that this\n> > is a valid starting point as well:\n> >\n> >\n> >        o---o---o---o---o  master\n> >             \\\n> >              o---o---o---o---o  next\n> >                       \\\n> >                        o---o---o  topic\n>\n> You mean that the 'topic' forked from 'next', and it is OK for 'next'\n> to acquire further commits since 'topic' forked from it, for you to\n> rebase 'topic' on another history?\n>\n> The very first example in Documentation/git-rebase.txt shows a\n> 3-commit topic A-B-C, forked from the master branch at E in 4-commit\n> D-E-F-G sequence, gets rebased.  Those F and G are in the same place\n> as those rightmost two commits you have on 'next' in the above\n> picture.\n>\n> > as in, the examples in that man page could potentially suggest to an\n> > inexperienced reader that the *only* valid situations are rebasing as\n> > long as the other branch has not developed any further. (yes, i\n> > realize that, if you read carefully, it *should* make it clear, but i\n> > think it would be helpful to at least graphically show that\n> > happening.)\n> >\n> >   thoughts?\n>\n> So, we have both pictures, and I do not see there is much to add.\n>\n> By the way, I sense a mis-perception that led you to say \"... has\n> not developed any further\".  In the topology in your second\n> illustration, there is nothing to say that the rightmost two commits\n> on the 'next' branch were created _after_ topic has forked from\n> 'next'.  It is not just possible but also often is sensible to fork\n> a topic closer to what it needs to build on top of, limiting its\n> dependency as small as possible, so the 'topic' could have been\n> forked from the middle of 'next' branch when it was originally\n> created.\n\n  yes, i see your point.\n\nrday\n\n-- \n\n========================================================================\nRobert P. J. Day                                 Ottawa, Ontario, CANADA\n                  http://crashcourse.ca/dokuwiki\n\nTwitter:                                       http://twitter.com/rpjday\nLinkedIn:                               http://ca.linkedin.com/in/rpjday\n========================================================================\n"}]}