سؤال

Latest git-p4 script (https://github.com/ermshiperete/git-p4) has a "shelve" but no "unshelve" command. How do I unshelve changes using it?

هل كانت مفيدة؟

المحلول

Doesn't look like you can, though git p4, instead you'll need to do it through Perforce.

نصائح أخرى

Since Git 2.18 (Q2 2018), there is a git p4 unshelve command

Unshelving will take a shelved P4 changelist, and produce the equivalent git commit in the branch refs/remotes/p4/unshelved/<changelist>.

But it was flawed:

The "unshelve" subcommand of "git p4(man)" used incorrectly used commit^N where it meant to say commit~N to name the Nth generation ancestor, which has been corrected with Git 2.29 (Q4 2020).

See commit 0acbf59, commit 677fa8d (19 Sep 2020) by Luke Diamand (ldiamand42).
(Merged by Junio C Hamano -- gitster -- in commit 9f4588d, 25 Sep 2020)

git-p4 unshelve: adding a commit breaks git-p4 unshelve

Signed-off-by: Luke Diamand

git-p4 unshelve uses HEAD^$n to find the parent commit, which fails if there is an additional commit.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top