Skip to content

Commit

Permalink
improved git chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasLukasczyk committed Jun 26, 2024
1 parent 1decc5d commit beb94ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/renderer/src/views/GitCommitView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ const trackChanges = async () => {
for(let i=0; i<b.length; i++){
string += ' "'+b[i]+"'";
if(string.length>string_limit){
chunks.push(i);
chunks.push(i===0 || i===chunks[chunks.length-1] ? i+1 : i);
string = a+' ';
}
}
chunks.push(b.length);
if(chunks[chunks.length-1]!==b.length)
chunks.push(b.length);
for(let i=0; i<chunks.length-1; i++){
const args = a.concat(b.slice(chunks[i],chunks[i+1]).map(x=>'"'+x+'"'));
Expand Down

0 comments on commit beb94ce

Please sign in to comment.