author | Shawn O. Pearce <spearce@spearce.org> | |
Thu, 9 Aug 2007 06:38:16 +0000 (02:38 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 10 Aug 2007 08:00:25 +0000 (01:00 -0700) | ||
commit | cabead982b7cf40f8930e6e38327fc396b7fef81 | |
tree | 7294d68a5b4ad3a926f9a294f23c20be3f29af44 | tree | snapshot |
parent | d47eed3272311acf16f136c49b0bb341c9a6e39c | commit | diff |
Use the empty tree for base diff in paranoid-update on new branches
We have to load a tree difference for the purpose of testing
file patterns. But if our branch is being created and there is no
specific base to difference against in the rule our base will be
'0'x40. This is (usually) not a valid tree-ish object in a Git
repository, so there's nothing to difference against.
Instead of creating the empty tree and running git-diff against
that we just take the output of `ls-tree -r --name-only` and mark
every returned pathname as an add.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
We have to load a tree difference for the purpose of testing
file patterns. But if our branch is being created and there is no
specific base to difference against in the rule our base will be
'0'x40. This is (usually) not a valid tree-ish object in a Git
repository, so there's nothing to difference against.
Instead of creating the empty tree and running git-diff against
that we just take the output of `ls-tree -r --name-only` and mark
every returned pathname as an add.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/hooks/update-paranoid | diff | blob | history |