mirror of
https://github.com/git/git.git
synced 2024-11-17 22:44:49 +01:00
Merge branch 'jc/cache-tree' into next
* jc/cache-tree: commit-tree: allow generic object name for the tree as well. Makefile: remove and create xdiff library from scratch. t0000-basic: Add ls-tree recursive test back.
This commit is contained in:
commit
7608d4bf97
4 changed files with 24 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -580,7 +580,7 @@ $(LIB_FILE): $(LIB_OBJS)
|
|||
XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o
|
||||
|
||||
$(XDIFF_LIB): $(XDIFF_OBJS)
|
||||
$(AR) rcs $@ $(XDIFF_OBJS)
|
||||
rm -f $@ && $(AR) rcs $@ $(XDIFF_OBJS)
|
||||
|
||||
|
||||
doc:
|
||||
|
|
|
@ -92,7 +92,7 @@ int main(int argc, char **argv)
|
|||
|
||||
git_config(git_default_config);
|
||||
|
||||
if (argc < 2 || get_sha1_hex(argv[1], tree_sha1) < 0)
|
||||
if (argc < 2 || get_sha1(argv[1], tree_sha1) < 0)
|
||||
usage(commit_tree_usage);
|
||||
|
||||
check_valid(tree_sha1, tree_type);
|
||||
|
|
|
@ -174,6 +174,27 @@ test_expect_success \
|
|||
'git-ls-tree -r output for a known tree.' \
|
||||
'diff current expected'
|
||||
|
||||
# But with -r -t we can have both.
|
||||
test_expect_success \
|
||||
'showing tree with git-ls-tree -r -t' \
|
||||
'git-ls-tree -r -t $tree >current'
|
||||
cat >expected <<\EOF
|
||||
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
|
||||
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
|
||||
040000 tree 58a09c23e2ca152193f2786e06986b7b6712bdbe path2
|
||||
100644 blob 3feff949ed00a62d9f7af97c15cd8a30595e7ac7 path2/file2
|
||||
120000 blob d8ce161addc5173867a3c3c730924388daedbc38 path2/file2sym
|
||||
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
|
||||
100644 blob 0aa34cae68d0878578ad119c86ca2b5ed5b28376 path3/file3
|
||||
120000 blob 8599103969b43aff7e430efea79ca4636466794f path3/file3sym
|
||||
040000 tree 3c5e5399f3a333eddecce7a9b9465b63f65f51e2 path3/subp3
|
||||
100644 blob 00fb5908cb97c2564a9783c0c64087333b3b464f path3/subp3/file3
|
||||
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
|
||||
EOF
|
||||
test_expect_success \
|
||||
'git-ls-tree -r output for a known tree.' \
|
||||
'diff current expected'
|
||||
|
||||
################################################################
|
||||
rm .git/index
|
||||
test_expect_success \
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "cache.h"
|
||||
#include "strbuf.h"
|
||||
#include "quote.h"
|
||||
#include "cache-tree.h"
|
||||
#include "tree-walk.h"
|
||||
#include "cache-tree.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue