{"thread":{"id":"54240","subject":"Bug Report: git-p4 unshelve failed","startedAt":"2020-09-15T01:09:19Z","lastAt":"2020-09-16T20:50:00Z","messageCount":2,"participants":["Liu, Xuhui (Jackson)","Luke Diamand"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"405544","messageId":"DM6PR12MB3194C9B3A462968FA5A05B4CFA200@DM6PR12MB3194.namprd12.prod.outlook.com","threadId":"54240","inReplyTo":null,"subject":"Bug Report: git-p4 unshelve failed","fromName":"Liu, Xuhui (Jackson)","fromEmail":"xuhui.liu@amd.com","sentAt":"2020-09-15T01:09:07Z","receivedAt":"2020-09-15T01:09:19Z","isPatch":false,"sender":{"key":"xuhui.liu@amd.com","avatar":null},"body":"Hi Git,\n            When I use \"git p4 unshelve 4495953\", it failed.\n\tI have fixed this issue locally. You can check the attached for details.\n\nWhat have I done to fix this:\n            It's because the line#4240 in function \"findLastP4Revision\" of git-p4.py:\n                        log = extractLogMessageFromGitCommit(\"{0}^{1}\".format(starting_point, parent))\nI think it should be:\n            log = extractLogMessageFromGitCommit(\"{0}~{1}\".format(starting_point, parent))\n\nBest Regards,\nJackson(Xuhui) Liu\n\n-------------------------------------------------------------------------------------\n1-14F, Tower 1, Candor Plaza No.669 Huanke Rd., Pudong District, Shanghai 201210, China\nFacebook |  Twitter |  amd.com  \n \n\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\ngit p4 unshelve -v 4495953\nWhat did you expect to happen? (Expected behavior)\nI want to get shelved changelist 4495953.\nWhat happened instead? (Actual behavior)\nIt failed.\nHere is the output log:\nReading pipe: ['git', '--git-dir', '/mnt/c/workSpace/project/git4perforce/ispDevelop/stg_3_0/.git', 'rev-parse', '--git-dir']\nReading pipe: ['git', '--git-dir', '/mnt/c/workSpace/project/git4perforce/ispDevelop/stg_3_0/.git', 'rev-parse', '--git-dir']\nReading pipe: ['git', 'config', 'git-p4.largeFileSystem']\nReading pipe: ['git', 'config', 'git-p4.syncFromOrigin']\nReading pipe: ['git', 'cat-file', 'commit', 'HEAD^0']\nReading pipe: ['git', 'cat-file', 'commit', 'HEAD^1']\nReading pipe: ['git', 'cat-file', 'commit', 'HEAD^2']\nfatal: Not a valid object name HEAD^2\nTraceback (most recent call last):\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 4438, in <module>\n    main()\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 4432, in main\n    if not cmd.run(args):\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 4295, in run\n    settings = self.findLastP4Revision(self.origin)\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 4240, in findLastP4Revision\n    log = extractLogMessageFromGitCommit(\"{0}^{1}\".format(starting_point, parent))\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 875, in extractLogMessageFromGitCommit\n    for log in read_pipe_lines([\"git\", \"cat-file\", \"commit\", commit]):\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 349, in read_pipe_lines\n    die('Command failed: %s' % str(c))\n  File \"/home/xuhuiliu/gitp4/git-p4.py\", line 156, in die\n    raise Exception(msg)\nException: Command failed: ['git', 'cat-file', 'commit', 'HEAD^2']\n\nWhat's different between what you expected and what actually happened?\nI want it to sync 4495953, but it failed.\nAnything else you want to add:\nI have fixed it locally.\nIt's because the line#4240 in function \"findLastP4Revision\" of git-p4.py:\n     log = extractLogMessageFromGitCommit(\"{0}^{1}\".format(starting_point, parent))\nI think it should be:\n     log = extractLogMessageFromGitCommit(\"{0}~{1}\".format(starting_point, parent))\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.28.0\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 x86_64\ncompiler info: gnuc: 9.3\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\n"},{"id":"405688","messageId":"CAE5ih79z8z+rmg-ncT6=RLaySr8GjxS5B33+yDh6bNC4TkUQDA@mail.gmail.com","threadId":"54240","inReplyTo":"DM6PR12MB3194C9B3A462968FA5A05B4CFA200@DM6PR12MB3194.namprd12.prod.outlook.com","subject":"Re: Bug Report: git-p4 unshelve failed","fromName":"Luke Diamand","fromEmail":"luke@diamand.org","sentAt":"2020-09-16T12:59:59Z","receivedAt":"2020-09-16T20:50:00Z","isPatch":false,"sender":{"key":"luke@diamand.org","avatar":"https://avatars.githubusercontent.com/u/5330967?v=4"},"body":"On Tue, 15 Sep 2020 at 02:09, Liu, Xuhui (Jackson) <Xuhui.Liu@amd.com> wrote:\n>\n> Hi Git,\n>             When I use \"git p4 unshelve 4495953\", it failed.\n>         I have fixed this issue locally. You can check the attached for details.\n>\n> What have I done to fix this:\n>             It's because the line#4240 in function \"findLastP4Revision\" of git-p4.py:\n>                         log = extractLogMessageFromGitCommit(\"{0}^{1}\".format(starting_point, parent))\n> I think it should be:\n>             log = extractLogMessageFromGitCommit(\"{0}~{1}\".format(starting_point, parent))\n>\n> Best Regards,\n> Jackson(Xuhui) Liu\n\nThis is indeed a bug. I will see if I can put together a patch.\n\nThanks\nLuke\n"}]}