I'm in the process of writing an application to move commits back and forth between Git and ClearCase repositories.
Git version is: 1.8.3.msysgit.0
The code is written in Python (2.7.5) and I'm getting a wierd error. The behaviour on the command line and the behaviour of the same command in the application are not the same:
From my application's log, I get this::
[git diff --name-status -M -z --ignore-submodules 4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac^..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac --] exit code: 128
Command output for [git diff --name-status -M -z --ignore-submodules 4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac^..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac --]:
stderr >> fatal: bad revision '4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac^..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac'
However from the same Windows command line, no results, but no error either:
C:\Temp\gitcc_test>git diff --name-status -M -z --ignore-submodules 4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac^..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac --
C:\Temp\gitcc_test>
On a similar note, if I run this command line (showing the diffs, not just renamed files), I get output:
C:\Temp\gitcc_test>git diff --ignore-submodules 6a4db18a0048db2dfe0e6639cabcdf10e265a1b6..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac --
diff --git a/hello.txt b/hello.txt
index 3eecb7d..da588dd 100644
--- a/hello.txt
+++ b/hello.txt
@@ -1 +1 @@
-Bonjour!
+Hello!
C:\Temp\gitcc_test>
But this command returns nothing:
C:\Temp\gitcc_test>git diff --ignore-submodules 4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac^..4dc7ad29d69ee2385802b262bfb9a4f1e28f10ac --
C:\Temp\gitcc_test>
The parent commit of 4dc7... is 6a4d..., so why doesn't 4dc7...^ give me any results?
Thanks in advance!