File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -eu -o pipefail
33
4+ git init embedded-repository
5+ (cd embedded-repository
6+ echo content > file && git add file && git commit -m " init"
7+ )
8+
49git init -q
510echo content > file
611ln -s file link
712
813echo binary > exe && chmod +x exe
914mkfifo fifo
15+
16+ git submodule add ./embedded-repository submodule
Original file line number Diff line number Diff line change @@ -40,6 +40,15 @@ fn pipeline_worktree_file_to_object() -> crate::Result {
4040 t. map ( |t| ( t. 0 , t. 1 ) )
4141 }
4242
43+ let submodule_id = hex_to_id ( "a047f8183ba2bb7eb00ef89e60050c5fde740483" ) ;
44+ assert_eq ! (
45+ take_two( pipe. worktree_file_to_object( "embedded-repository" . into( ) , & index) ?) ,
46+ Some ( ( submodule_id, gix:: object:: tree:: EntryKind :: Commit ) )
47+ ) ;
48+ assert_eq ! (
49+ take_two( pipe. worktree_file_to_object( "submodule" . into( ) , & index) ?) ,
50+ Some ( ( submodule_id, gix:: object:: tree:: EntryKind :: Commit ) )
51+ ) ;
4352 assert_eq ! (
4453 take_two( pipe. worktree_file_to_object( "file" . into( ) , & index) ?) ,
4554 Some ( (
You can’t perform that action at this time.
0 commit comments