Merge pull request #2 from zinglax/shallow-fetch
Adding --depth=1 to fetchs to save time for large repos
This commit is contained in:
@@ -52,7 +52,7 @@ export async function setupBranch(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Check out the base branch and let Claude create branches as needed
|
// Check out the base branch and let Claude create branches as needed
|
||||||
await $`git fetch origin ${sourceBranch}`;
|
await $`git fetch origin --depth=1 ${sourceBranch}`;
|
||||||
await $`git checkout ${sourceBranch}`;
|
await $`git checkout ${sourceBranch}`;
|
||||||
await $`git pull origin ${sourceBranch}`;
|
await $`git pull origin ${sourceBranch}`;
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ export async function setupBranch(
|
|||||||
|
|
||||||
// Ensure we have the latest version of the source branch
|
// Ensure we have the latest version of the source branch
|
||||||
console.log(`Fetching latest ${sourceBranch}...`);
|
console.log(`Fetching latest ${sourceBranch}...`);
|
||||||
await $`git fetch origin ${sourceBranch}`;
|
await $`git fetch origin --depth=1 ${sourceBranch}`;
|
||||||
|
|
||||||
// Checkout the source branch
|
// Checkout the source branch
|
||||||
console.log(`Checking out ${sourceBranch}...`);
|
console.log(`Checking out ${sourceBranch}...`);
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ export async function branchHasChanges(
|
|||||||
*/
|
*/
|
||||||
export async function fetchBranch(branchName: string): Promise<boolean> {
|
export async function fetchBranch(branchName: string): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
await $`git fetch origin ${branchName}`;
|
await $`git fetch origin --depth=1 ${branchName}`;
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
Reference in New Issue
Block a user