Git -p4 sends a crash with "Invalid object name HEAD ~ 261"

I have a git repository that I would like to reflect in the Perforce repository. I downloaded the git -p4 script (a later version that does not give warnings about obsolescence), and worked with that. I figured out how to pull changes from Perforce, but I get an error when I try to sync changes from git repository. Here is what I have done so far:

git clone git@github.com:asdf/qwerty.git
git-p4 sync //depot/path/to/querty
git merge remotes/p4/master     (there was a single README file...)

So, I copied the source into a clean, new director, getting a beautiful collapsed file tree, and it git statusshows that I have been updated. But:

> git-p4 submit
fatal: Not a valid object name HEAD~261
Command failed: git cat-file commit HEAD~261

This thread on the git mailing list seems relevant, but I can't figure out what they do with all A, B and Cs. Can someone clarify what “Invalid object name” means and what can I do to fix this problem? All I want to do is periodically lower the initial / initial value in Perforce; full story is not required. Thank.

+3
source share
2 answers
fatal: Not a valid object name

should mean that somehow the remote HEAD points to the wrong link.
In other words, when you import P4 into a git repository, there is no way to send git from this repository to P4 due to an incorrect SHA1. What for? I dont know.

This is why the user in the thread you mentioned is:

  • P4 B --import-local ( " refs/heads/, refs/remotes" ),
  • B ( git p4 repo) ( , )
  • HEAD of B, p4, B

  • B C, - ( , )

B .

C ( SHA1):

  • git-p4 sync ( C remotes/p4/master remotes/origin/*)
  • git-p4 submit
0

9 Git 2.23 (Q3 2019)

. c3f2358 (28 2019 .) (mdymike).
( Junio C Hamano - gitster - add59c4, 17 2019 .)

p4 unshelve: " Not a valid object name HEAD0 " Windows

git p4 unshelve :

fatal: Not a valid object name HEAD0
Command failed: git cat-file commit HEAD^0

(git version 2.21.0.windows.1, python 2.7.16)

pOpen git-p4 git .
, . (Https://docs.python.org/2/library/subprocess.html)
extractLogMessageFromGitCommit extractLogMessageFromGitCommit , (^) HEAD^ 0 Windows.
escape-, git HEAD0.

, ECHO HEAD^0 command-, HEAD0.

, fOpen, .

0

Source: https://habr.com/ru/post/1742319/


All Articles