author | Vitor Antunes <vitor.hda@gmail.com> | |
Wed, 25 Jan 2012 23:48:22 +0000 (23:48 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Jan 2012 19:34:40 +0000 (11:34 -0800) | ||
commit | fed23693ba1a1ea7beb851cd385d458136e91664 | |
tree | 5063848b6da4bc2269807dad2e67a4b56d5089c4 | tree | snapshot |
parent | a080558ed77952b2394499531edc324eb2885d67 | commit | diff |
git-p4: Search for parent commit on branch creation
To find out which is its parent the commit of the new branch is compared
sequentially to each blob of the parent branch from the newest to the
oldest. The first blob which results in a zero diff is considered the
parent commit. If none is found, then the commit is applied to the top
of the parent branch.
A fast-import "checkpoint" call is required because diff-tree is only
able to work with blobs on disk. But most of these commits will not be
part of the final imported tree, making fast-import fail. To avoid this,
the temporary branches are tracked and then removed at the end of the
import process.
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
To find out which is its parent the commit of the new branch is compared
sequentially to each blob of the parent branch from the newest to the
oldest. The first blob which results in a zero diff is considered the
parent commit. If none is found, then the commit is applied to the top
of the parent branch.
A fast-import "checkpoint" call is required because diff-tree is only
able to work with blobs on disk. But most of these commits will not be
part of the final imported tree, making fast-import fail. To avoid this,
the temporary branches are tracked and then removed at the end of the
import process.
Signed-off-by: Vitor Antunes <vitor.hda@gmail.com>
Acked-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/git-p4 | diff | blob | history |