aboutsummaryrefslogtreecommitdiff
path: root/mktree.c
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-08-09 02:38:16 -0400
committerJunio C Hamano <gitster@pobox.com>2007-08-10 01:00:25 -0700
commitcabead982b7cf40f8930e6e38327fc396b7fef81 (patch)
tree7294d68a5b4ad3a926f9a294f23c20be3f29af44 /mktree.c
parentd47eed3272311acf16f136c49b0bb341c9a6e39c (diff)
downloadgit-cabead982b7cf40f8930e6e38327fc396b7fef81.tar.gz
git-cabead982b7cf40f8930e6e38327fc396b7fef81.tar.xz
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>
Diffstat (limited to 'mktree.c')
0 files changed, 0 insertions, 0 deletions