git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/1] p4: fix "Not a valid object name HEAD0" when unshelving

From
MGMike Mueller via GitGitGadget <gitgitgadget@gmail.com>
Date
May 10, 2019, 15:33 UTC
Message-ID
<pull.183.git.gitgitgadget@gmail.com>

git p4 unshelve was failing with "fatal: Not a valid object name HEAD0" and "Command failed: git cat-file commit HEAD^0" on certain systems e.g. git version 2.21.0.windows.1 + python 2.7.16

It seems that certain python pOpen implementations drop the ^ character when invoked using a string instead of an array as first argument, which is what is done by extractLogMessageFromGitCommit.

Solution is to use the array format of passing the command to fOpen, which is preferred (see https://docs.python.org/2/library/subprocess.html) and is used in other parts of this code anyway.

Mike Mueller (1):
  p4 unshelve: fix "Not a valid object name HEAD0"
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: aeb582a98374c094361cba1bd756dc6307432c42
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-183%2Fmdymike%2Fmaint-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-183/mdymike/maint-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/183
-- 
gitgitgadget
Next: Mike Mueller via GitGitGadget
Message 1 of 7 in “p4: fix "Not a valid object name HEAD0" when unshelving”
  1. 0/1 p4: fix "Not a valid object name HEAD0" when unshelvingMike Mueller via GitGitGadget, May 10, 2019
  2. 1/1 p4 unshelve: fix "Not a valid object name HEAD0"Mike Mueller via GitGitGadget, May 10, 2019
  3. Junio C HamanoMay 15, 2019
  4. 0/1 p4: fix "Not a valid object name HEAD0" when unshelvingMike Mueller via GitGitGadget, May 28, 2019
  5. 1/1 p4 unshelve: fix "Not a valid object name HEAD0" on WindowsMike Mueller via GitGitGadget, May 28, 2019
  6. Junio C HamanoMay 28, 2019
  7. Johannes SchindelinMay 29, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.