Skip to content

Commit

Permalink
git-p4: explicitly specify that HEAD is a revision
Browse files Browse the repository at this point in the history
'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>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
ddvlad authored and gitster committed Apr 7, 2014
1 parent e4eef26 commit 4e49d95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-p4.py
Original file line number Diff line number Diff line change
Expand Up @@ -3086,7 +3086,7 @@ def rebase(self):
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):
Expand Down

0 comments on commit 4e49d95

Please sign in to comment.