Skip to content

Commit

Permalink
Use --is-shallow-repository
Browse files Browse the repository at this point in the history
  • Loading branch information
iterative-olivaw authored Apr 13, 2022
1 parent a02d32a commit 114ff9f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/cml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
const { execSync } = require('child_process');
const PATH = require('path');
const fse = require('fs-extra');
const gitUrlParse = require('git-url-parse');
const stripAuth = require('strip-url-auth');
const globby = require('globby');
Expand Down Expand Up @@ -342,8 +340,7 @@ class CML {
const command = await driver.updateGitConfig({ userName, userEmail });
await exec(command);
if (unshallow) {
const gitdir = await exec('git rev-parse --git-dir');
if (await fse.pathExists(PATH.join(gitdir, 'shallow'))) {
if ((await exec('git rev-parse --is-shallow-repository')) === 'true') {
await exec('git fetch --unshallow');
}
}
Expand Down

0 comments on commit 114ff9f

Please sign in to comment.