{"thread":{"id":"57134","subject":"[BUG] Submodule Pull","startedAt":"2021-12-22T02:40:40Z","lastAt":"2021-12-22T02:40:40Z","messageCount":1,"participants":["rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"444693","messageId":"00f001d7f6dd$4d278580$e7769080$@nexbridge.com","threadId":"57134","inReplyTo":null,"subject":"[BUG] Submodule Pull","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-12-22T02:40:31Z","receivedAt":"2021-12-22T02:40:40Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Hi All,\n\nI have been working with a submodule, with a single local change. Trying to\n(accidentally) pull the submodule to pick up changes from upstream resulted\nin the change disappearing but blocking the pull/merge. The only way I was\nable to recover the situation was to restore the file that was in the pull\nerror - fortunately, I know what the change was. I should know better, but\nthis situation escapes me. git version is 2.34.1 on NonStop x86.\n\nWhat I expected was that the uncommitted change could be stashed\nsuccessfully or at least the diff would should up. My suspicion was that the\nmerge state prevented my ability to view what was going on. I probably\nshould have done a git merge --abort, which I expect would have cleared the\nsituation, but it is not intuitive. The log follows - and the user and repo\nnames are fake. The master branch is being changed to main, but we did not\nfinish the conversion on this submodule.\n\n--Randall\n\n$: git pull\nPassword for 'https://bobttester@bitbucket.org':\n\nremote: Enumerating objects: 11, done.\nremote: Counting objects: 100% (11/11), done.\nremote: Compressing objects: 100% (6/6), done.\nremote: Total 6 (delta 4), reused 0 (delta 0), pack-reused 0\nUnpacking objects: 100% (6/6), 1.58 KiB | 12.00 KiB/s, done.\nFrom https://bitbucket.org/main/submodule\n   ca2d4d3..0bb118a  mybranch -> origin/mybranch\nUpdating ca2d4d3..0bb118a\nerror: Your local changes to the following files would be overwritten by\nmerge:\n        Makefile.common\nPlease commit your changes or stash them before you merge.\nAborting\n$ git diff\n$ git status\nOn branch mybranch\nYour branch is behind 'origin/mybranch ' by 1 commit, and can be\nfast-forwarded.\n  (use \"git pull\" to update your local branch)\n\nnothing to commit, working tree clean\n$ git diff --cached\n$ git pull\nPassword for 'https://bobttester@bitbucket.org':\n\nUpdating ca2d4d3..0bb118a\nerror: Your local changes to the following files would be overwritten by\nmerge:\n        Makefile.common\nPlease commit your changes or stash them before you merge.\nAborting\n$ git stash push\nNo local changes to save\n$ git log --oneline --decorate --graph --simplify-by-decoration\n* 0bb118a (origin/mybranch) Support for measurement gathering\n* ca2d4d3 (HEAD -> mybranch) Corrected usage of VMATCH\n* 1739739 (origin/main, main) nsmt.c: Corrected CPU computation\n| * ec45c8d (origin/master, origin/HEAD) Reduced the time to beginning of\ntime\n| * bae1662 (master) Add beginning of time check\n|/\n* 6be05d2 README.md created online with Bitbucket\n$ git merge origin/mybranch\nUpdating ca2d4d3..0bb118a\nerror: Your local changes to the following files would be overwritten by\nmerge:\n        Makefile.common\nPlease commit your changes or stash them before you merge.\nAborting\n$ git commit -a\nOn branch mybranch\nYour branch is behind 'origin/mybranch' by 1 commit, and can be\nfast-forwarded.\n  (use \"git pull\" to update your local branch)\n\nnothing to commit, working tree clean\n$ git restore -- Makefile.common\n$ git status\nOn branch mybranch\nYour branch is behind 'origin/mybranch' by 1 commit, and can be\nfast-forwarded.\n  (use \"git pull\" to update your local branch)\n\nnothing to commit, working tree clean\n$ git pull\nPassword for 'https://bobttester@bitbucket.org':\n\nUpdating ca2d4d3..0bb118a\nFast-forward\n Makefile.common |  2 +-\n metra.c         |  6 +++++-\n metra.h         | 30 ++++++++++++++++++++++++------\n nsmt.c          | 32 +++++++++++++++++++++++++++-----\n 4 files changed, 57 insertions(+), 13 deletions(-)\n\n"}]}