VCS comparison table
Andy Whitcroft
apw at shadowen.org
Fri Oct 20 11:45:04 BST 2006
Matthieu Moy wrote:
> Jakub Narebski <jnareb at gmail.com> writes:
>
>> Huh? If you want what changes have been introduced by commit
>> c3424aebbf722c1f204931bf1c843e8a103ee143, you just do
>>
>> # git diff c3424aebbf722c1f204931bf1c843e8a103ee143
>
> How does git chose which ancestor to use if this revision has more
> than one in this case?
Well if there is more than one parent, then there are more than one
diff. For instance this is a merge commit which I asked to 'see'.
This gets shown in the combined diff format, showing the results of the
conflict resolution.
diff --cc this
index fbbafbf,10c8337..43b7af0
--- a/this
+++ b/this
@@@ -1,3 -1,3 +1,4 @@@
1
+ 2a
+2b
3
If you want to know each individual diff in a more 'standard' form you
can ask about the parents specifically.
apw at pinky$ git diff HEAD^1..
diff --git a/this b/this
index fbbafbf..43b7af0 100644
--- a/this
+++ b/this
@@ -1,3 +1,4 @@
1
+2a
2b
3
apw at pinky$ git diff HEAD^2..
diff --git a/bar b/bar
new file mode 100644
index 0000000..8dc5f23
--- /dev/null
+++ b/bar
@@ -0,0 +1 @@
+this that other
diff --git a/this b/this
index 10c8337..43b7af0 100644
--- a/this
+++ b/this
@@ -1,3 +1,4 @@
1
2a
+2b
3
More information about the bazaar
mailing list