diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2013-09-06 07:10:54 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-06 13:25:21 -0700 |
commit | 160df71ef53b0ad645391ec7d5525eda33871d09 (patch) | |
tree | 7eafcafc57f330b3d022596943a48e26d9162f7d | |
parent | 277336a5e0341a5ae06fc330834dfeefe5e85cec (diff) | |
download | git-160df71ef53b0ad645391ec7d5525eda33871d09.tar.gz git-160df71ef53b0ad645391ec7d5525eda33871d09.tar.xz |
Documentation/replace: state that objects must be of the same type
A previous patch ensures that both the replaced and the replacement
objects passed to git replace must be of the same type, except if
-f option is used.
While at it state that there is no other restriction on both objects.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | Documentation/git-replace.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index e0b405797..d198006c5 100644 --- a/Documentation/git-replace.txt +++ b/Documentation/git-replace.txt @@ -20,8 +20,13 @@ The name of the 'replace' reference is the SHA-1 of the object that is replaced. The content of the 'replace' reference is the SHA-1 of the replacement object. +The replaced object and the replacement object must be of the same type. +This restriction can be bypassed using `-f`. + Unless `-f` is given, the 'replace' reference must not yet exist. +There is no other restriction on the replaced and replacement objects. + Replacement references will be used by default by all Git commands except those doing reachability traversal (prune, pack transfer and fsck). @@ -69,9 +74,7 @@ go back to a replaced commit will move the branch to the replacement commit instead of the replaced commit. There may be other problems when using 'git rev-list' related to -pending objects. And of course things may break if an object of one -type is replaced by an object of another type (for example a blob -replaced by a commit). +pending objects. SEE ALSO -------- |