File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/chrono/src/use-cases Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ export default class CommitUseCase {
84
84
85
85
for await ( const directory of directories ) {
86
86
const treeEntries = await this . findTreeEntries ( entries , directory )
87
+
87
88
const tree = ChronoObjectTree . fromEntries ( treeEntries )
88
89
const { objectHash } = await this . objectRepository . save ( tree )
89
90
@@ -94,7 +95,11 @@ export default class CommitUseCase {
94
95
} )
95
96
}
96
97
97
- return result
98
+ return result . map ( ( item ) => {
99
+ item . path = HelperService . basename ( item . path )
100
+
101
+ return item
102
+ } )
98
103
}
99
104
100
105
async execute ( { message } : Params ) {
@@ -105,9 +110,7 @@ export default class CommitUseCase {
105
110
// get stage
106
111
const entries = await this . entryRepository . findAll ( )
107
112
108
- // const entriesAdded = entries.filter((item) => item.status === IndexEntryStatus.Added)
109
-
110
- const rootEntries = entries
113
+ const rootEntries : ChronoObjectTree [ 'entries' ] = entries
111
114
. filter ( ( item ) => ! item . path . includes ( '/' ) )
112
115
. map ( ( i ) => ( {
113
116
path : i . path ,
You can’t perform that action at this time.
0 commit comments