{"thread":{"id":"36357","subject":"[PATCH] git-p4: explicitly specify that HEAD is a revision","startedAt":"2014-04-07T13:19:11Z","lastAt":"2014-04-07T22:37:27Z","messageCount":3,"participants":["Vlad Dogaru","Pete Wyckoff","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"238441","messageId":"20140407131911.GB17654@ixro-vdogaru.ixiacom.com","threadId":"36357","inReplyTo":null,"subject":"[PATCH] git-p4: explicitly specify that HEAD is a revision","fromName":"Vlad Dogaru","fromEmail":"vdogaru@ixiacom.com","sentAt":"2014-04-07T13:19:11Z","receivedAt":"2014-04-07T13:19:11Z","isPatch":true,"sender":{"key":"vdogaru@ixiacom.com","avatar":null},"body":"'git p4 rebase' fails with the following message if there is a file\nnamed HEAD in the current directory:\n\n\tfatal: ambiguous argument 'HEAD': both revision and filename\n\tUse '--' to separate paths from revisions, like this:\n\t'git <command> [<revision>...] -- [<file>...]'\n\nTake the suggestion above and explicitly state that HEAD should be\ntreated as a revision.\n\nSigned-off-by: Vlad Dogaru <vdogaru@ixiacom.com>\n---\n git-p4.py | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/git-p4.py b/git-p4.py\nindex cdfa2df..8d11b25 100755\n--- a/git-p4.py\n+++ b/git-p4.py\n@@ -3086,7 +3086,7 @@ class P4Rebase(Command):\n         print \"Rebasing the current branch onto %s\" % upstream\n         oldHead = read_pipe(\"git rev-parse HEAD\").strip()\n         system(\"git rebase %s\" % upstream)\n-        system(\"git diff-tree --stat --summary -M %s HEAD\" % oldHead)\n+        system(\"git diff-tree --stat --summary -M %s HEAD --\" % oldHead)\n         return True\n \n class P4Clone(P4Sync):\n-- \n1.8.5.2\n"},{"id":"238518","messageId":"20140407220916.GA3635@padd.com","threadId":"36357","inReplyTo":"20140407131911.GB17654@ixro-vdogaru.ixiacom.com","subject":"Re: [PATCH] git-p4: explicitly specify that HEAD is a revision","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2014-04-07T22:09:16Z","receivedAt":"2014-04-07T22:09:16Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"vdogaru@ixiacom.com wrote on Mon, 07 Apr 2014 16:19 +0300:\n> 'git p4 rebase' fails with the following message if there is a file\n> named HEAD in the current directory:\n> \n> \tfatal: ambiguous argument 'HEAD': both revision and filename\n> \tUse '--' to separate paths from revisions, like this:\n> \t'git <command> [<revision>...] -- [<file>...]'\n> \n> Take the suggestion above and explicitly state that HEAD should be\n> treated as a revision.\n> \n> Signed-off-by: Vlad Dogaru <vdogaru@ixiacom.com>\n\nThis looks obviously good to me, thanks!\n\nJunio, could you carry it into the next release?  As a trivial\nfixup.\n\nAcked-by: Pete Wyckoff <pw@padd.com>\n\n> ---\n>  git-p4.py | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/git-p4.py b/git-p4.py\n> index cdfa2df..8d11b25 100755\n> --- a/git-p4.py\n> +++ b/git-p4.py\n> @@ -3086,7 +3086,7 @@ class P4Rebase(Command):\n>          print \"Rebasing the current branch onto %s\" % upstream\n>          oldHead = read_pipe(\"git rev-parse HEAD\").strip()\n>          system(\"git rebase %s\" % upstream)\n> -        system(\"git diff-tree --stat --summary -M %s HEAD\" % oldHead)\n> +        system(\"git diff-tree --stat --summary -M %s HEAD --\" % oldHead)\n>          return True\n>  \n>  class P4Clone(P4Sync):\n> -- \n> 1.8.5.2\n> \n> \n"},{"id":"238519","messageId":"xmqqioqklqag.fsf@gitster.dls.corp.google.com","threadId":"36357","inReplyTo":"20140407220916.GA3635@padd.com","subject":"Re: [PATCH] git-p4: explicitly specify that HEAD is a revision","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-04-07T22:37:27Z","receivedAt":"2014-04-07T22:37:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pete Wyckoff <pw@padd.com> writes:\n\n> vdogaru@ixiacom.com wrote on Mon, 07 Apr 2014 16:19 +0300:\n>> 'git p4 rebase' fails with the following message if there is a file\n>> named HEAD in the current directory:\n>> \n>> \tfatal: ambiguous argument 'HEAD': both revision and filename\n>> \tUse '--' to separate paths from revisions, like this:\n>> \t'git <command> [<revision>...] -- [<file>...]'\n>> \n>> Take the suggestion above and explicitly state that HEAD should be\n>> treated as a revision.\n>> \n>> Signed-off-by: Vlad Dogaru <vdogaru@ixiacom.com>\n>\n> This looks obviously good to me, thanks!\n>\n> Junio, could you carry it into the next release?  As a trivial\n> fixup.\n>\n> Acked-by: Pete Wyckoff <pw@padd.com>\n\nThanks; will apply directly on 'master'.\n\n>\n>> ---\n>>  git-p4.py | 2 +-\n>>  1 file changed, 1 insertion(+), 1 deletion(-)\n>> \n>> diff --git a/git-p4.py b/git-p4.py\n>> index cdfa2df..8d11b25 100755\n>> --- a/git-p4.py\n>> +++ b/git-p4.py\n>> @@ -3086,7 +3086,7 @@ class P4Rebase(Command):\n>>          print \"Rebasing the current branch onto %s\" % upstream\n>>          oldHead = read_pipe(\"git rev-parse HEAD\").strip()\n>>          system(\"git rebase %s\" % upstream)\n>> -        system(\"git diff-tree --stat --summary -M %s HEAD\" % oldHead)\n>> +        system(\"git diff-tree --stat --summary -M %s HEAD --\" % oldHead)\n>>          return True\n>>  \n>>  class P4Clone(P4Sync):\n>> -- \n>> 1.8.5.2\n>> \n>> \n"}]}