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

[PATCH] git-p4: explicitly specify that HEAD is a revision

From
VDVlad Dogaru <vdogaru@ixiacom.com>
Date
Apr 7, 2014, 13:19 UTC
Message-ID
<20140407131911.GB17654@ixro-vdogaru.ixiacom.com>

'git p4 rebase' fails with the following message if there is a file named HEAD in the current directory:

	fatal: ambiguous argument 'HEAD': both revision and filename
	Use '--' to separate paths from revisions, like this:
	'git <command> [<revision>...] -- [<file>...]'

Take the suggestion above and explicitly state that HEAD should be treated as a revision.

Signed-off-by: Vlad Dogaru <vdogaru@ixiacom.com>
---
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-p4.py b/git-p4.py
index cdfa2df..8d11b25 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -3086,7 +3086,7 @@ class P4Rebase(Command):
         print "Rebasing the current branch onto %s" % upstream
         oldHead = read_pipe("git rev-parse HEAD").strip()
         system("git rebase %s" % upstream)
-        system("git diff-tree --stat --summary -M %s HEAD" % oldHead)
+        system("git diff-tree --stat --summary -M %s HEAD --" % oldHead)
         return True
 
 class P4Clone(P4Sync):
-- 
1.8.5.2
Next: Pete Wyckoff
Message 1 of 3 in “git-p4: explicitly specify that HEAD is a revision”
  1. git-p4: explicitly specify that HEAD is a revisionVlad Dogaru, Apr 7, 2014
  2. Pete WyckoffApr 7, 2014
  3. Junio C HamanoApr 7, 2014

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.