{"thread":{"id":"35009","subject":"git rebase is confused about commits w/o textual changes (e.g. chmod's)","startedAt":"2013-09-24T19:56:48Z","lastAt":"2013-10-04T20:45:30Z","messageCount":5,"participants":["Paul Sokolovsky","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"228173","messageId":"20130924225648.48af3f4e@x34f","threadId":"35009","inReplyTo":null,"subject":"git rebase is confused about commits w/o textual changes (e.g. chmod's)","fromName":"Paul Sokolovsky","fromEmail":"pmiscml@gmail.com","sentAt":"2013-09-24T19:56:48Z","receivedAt":"2013-09-24T19:56:48Z","isPatch":false,"sender":{"key":"pmiscml@gmail.com","avatar":null},"body":"Hello,\n\ngit rebase is confused about commits like\nhttps://github.com/pfalcon/civetweb/commit/ce8493837bf7676c6d824cdcb1d5e3a7ed476fe1\n- it stops, telling user to just run rebase --continue. I remember like\nfew years ago rebase was confused like that oftentimes, which is in turn\nconfused novices trying rebase-based workflow. There's big progress\nover years, and it would be nice to make it just perfect.\n\nThe exact messages are:\n\n+ git rebase --preserve-merges --onto upstream-master e61d4efbe4d34d64e6be50ad5009045e4ff06764 HEAD\nThe previous cherry-pick is now empty, possibly due to conflict resolution.\nIf you wish to commit it anyway, use:\n\n    git commit --allow-empty\n\nOtherwise, please use 'git reset'\n# rebase in progress; onto a0b43ae\n# You are currently rebasing.\n#   (all conflicts fixed: run \"git rebase --continue\")\n#\nnothing to commit, working directory clean\nCould not pick 5831bf1affad12bfa3146c37b8b622ba4e584ca3\n\n\n-- \nBest regards,\n Paul                          mailto:pmiscml@gmail.com\n"},{"id":"228335","messageId":"20130927222807.GA18384@vauxhall.crustytoothpaste.net","threadId":"35009","inReplyTo":"20130924225648.48af3f4e@x34f","subject":"Re: git rebase is confused about commits w/o textual changes (e.g. chmod's)","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2013-09-27T22:28:07Z","receivedAt":"2013-09-27T22:28:07Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Tue, Sep 24, 2013 at 10:56:48PM +0300, Paul Sokolovsky wrote:\n> Hello,\n> \n> git rebase is confused about commits like\n> https://github.com/pfalcon/civetweb/commit/ce8493837bf7676c6d824cdcb1d5e3a7ed476fe1\n> - it stops, telling user to just run rebase --continue. I remember like\n> few years ago rebase was confused like that oftentimes, which is in turn\n> confused novices trying rebase-based workflow. There's big progress\n> over years, and it would be nice to make it just perfect.\n> \n> The exact messages are:\n> \n> + git rebase --preserve-merges --onto upstream-master e61d4efbe4d34d64e6be50ad5009045e4ff06764 HEAD\n> The previous cherry-pick is now empty, possibly due to conflict resolution.\n> If you wish to commit it anyway, use:\n> \n>     git commit --allow-empty\n> \n> Otherwise, please use 'git reset'\n> # rebase in progress; onto a0b43ae\n> # You are currently rebasing.\n> #   (all conflicts fixed: run \"git rebase --continue\")\n> #\n> nothing to commit, working directory clean\n> Could not pick 5831bf1affad12bfa3146c37b8b622ba4e584ca3\n\nI'm interested in solving this, but I can't seem to reproduce it with\nthe following script.  Can you provide more information about which\nbranches specifically you were using (as well as which git version) so I\ncan reproduce the problem and look into fixing it?\n\n  git checkout -b test-base\n  printf \"line 1\\n\" >example\n  git add example\n  git commit -m \"add line 1\"\n\n  git checkout -b to-rebase\n  chmod 755 example\n  git add example\n  git commit -m \"change permissions\"\n\n  git checkout test-base\n  printf \"line 2\\n\" >>example\n  git add example\n  git commit -m \"add line\"\n\n  git checkout to-rebase\n  git rebase test-base\n  test -x example\n\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"},{"id":"228336","messageId":"20130928023244.1ce16dc5@x34f","threadId":"35009","inReplyTo":"20130927222807.GA18384@vauxhall.crustytoothpaste.net","subject":"Re: git rebase is confused about commits w/o textual changes (e.g. chmod's)","fromName":"Paul Sokolovsky","fromEmail":"pmiscml@gmail.com","sentAt":"2013-09-27T23:32:44Z","receivedAt":"2013-09-27T23:32:44Z","isPatch":false,"sender":{"key":"pmiscml@gmail.com","avatar":null},"body":"Hello Brian,\n\nOn Fri, 27 Sep 2013 22:28:07 +0000\n\"brian m. carlson\" <sandals@crustytoothpaste.net> wrote:\n\n> On Tue, Sep 24, 2013 at 10:56:48PM +0300, Paul Sokolovsky wrote:\n> > Hello,\n> > \n> > git rebase is confused about commits like\n> > https://github.com/pfalcon/civetweb/commit/ce8493837bf7676c6d824cdcb1d5e3a7ed476fe1\n> > - it stops, telling user to just run rebase --continue. I remember\n[]\n\n> \n> I'm interested in solving this, but I can't seem to reproduce it with\n> the following script.  Can you provide more information about which\n> branches specifically you were using (as well as which git version)\n> so I can reproduce the problem and look into fixing it?\n\nThanks for your reply - I wondered if my message went thru (I'm not\nsubscribed to the list). I'm running:\n\n$ git --version\ngit version 1.8.4\n\nSpecifically from Ubuntu PPA:\nhttp://ppa.launchpad.net/git-core/ppa/ubuntu\n\n\nScript to reproduce the issue is:\nhttps://gist.github.com/pfalcon/6736632 , based on a real-world case of\nmerging histories of a fork created from a flat tree snapshot with\nthe original project it was created from.\n\n\nThanks,\n Paul                          mailto:pmiscml@gmail.com\n"},{"id":"228564","messageId":"20131004202853.GB4165@vauxhall.crustytoothpaste.net","threadId":"35009","inReplyTo":"20130928023244.1ce16dc5@x34f","subject":"Re: git rebase is confused about commits w/o textual changes (e.g. chmod's)","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2013-10-04T20:28:54Z","receivedAt":"2013-10-04T20:28:54Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On Sat, Sep 28, 2013 at 02:32:44AM +0300, Paul Sokolovsky wrote:\n> $ git --version\n> git version 1.8.4\n> \n> Specifically from Ubuntu PPA:\n> http://ppa.launchpad.net/git-core/ppa/ubuntu\n> \n> \n> Script to reproduce the issue is:\n> https://gist.github.com/pfalcon/6736632 , based on a real-world case of\n> merging histories of a fork created from a flat tree snapshot with\n> the original project it was created from.\n\nOkay, as I suspected, the rebase would have resulted in an empty commit.\nIn this particular case, the commit being rebased changed the permissions\non the files, but those permissions are already correct, so the commit\nreally is empty, even considering permissions.  It looks like git is\ndoing the right thing here.\n\n-- \nbrian m. carlson / brian with sandals: Houston, Texas, US\n+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only\nOpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187\n"},{"id":"228565","messageId":"20131004234530.3d3a54cc@x34f","threadId":"35009","inReplyTo":"20131004202853.GB4165@vauxhall.crustytoothpaste.net","subject":"Re: git rebase is confused about commits w/o textual changes (e.g. chmod's)","fromName":"Paul Sokolovsky","fromEmail":"pmiscml@gmail.com","sentAt":"2013-10-04T20:45:30Z","receivedAt":"2013-10-04T20:45:30Z","isPatch":false,"sender":{"key":"pmiscml@gmail.com","avatar":null},"body":"Hello,\n\nOn Fri, 4 Oct 2013 20:28:54 +0000\n\"brian m. carlson\" <sandals@crustytoothpaste.net> wrote:\n\n> On Sat, Sep 28, 2013 at 02:32:44AM +0300, Paul Sokolovsky wrote:\n> > $ git --version\n> > git version 1.8.4\n> > \n> > Specifically from Ubuntu PPA:\n> > http://ppa.launchpad.net/git-core/ppa/ubuntu\n> > \n> > \n> > Script to reproduce the issue is:\n> > https://gist.github.com/pfalcon/6736632 , based on a real-world\n> > case of merging histories of a fork created from a flat tree\n> > snapshot with the original project it was created from.\n> \n> Okay, as I suspected, the rebase would have resulted in an empty\n> commit. In this particular case, the commit being rebased changed the\n> permissions on the files, but those permissions are already correct,\n> so the commit really is empty, even considering permissions.  It\n> looks like git is doing the right thing here.\n\nHmm, ok, thanks for investigation!\n\nBut then, about this empty commit handling behavior by rebase.\nLow-level developer in me understands the current behavior - if we\nexpect changes, but there're none, then it as well may be something\nwrong, so let's not play smartass, but tell user outright what's\nhappening. But higher-level user in me knows that rebase is pretty\ntrusty nowadays, and real-world cause of empty commits during\nrebase is that the change is already upstream. So, can we have\nsomething like --skip-empty? Then some good time later, we can talk\nabout changing defaults ;-).\n\n\n-- \nBest regards,\n Paul                          mailto:pmiscml@gmail.com\n"}]}