Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/gh-pages
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ program
.option('-o, --remote <name>', 'The name of the remote', 'origin')
.option('-m, --message <message>', 'commit message', 'Updates')
.option('-g, --tag <tag>', 'add tag to commit')
.option('-p, --depth <depth>', 'depth for clone', 1)
.option('-t, --dotfiles', 'Include dotfiles')
.option('-a, --add', 'Only add, and never remove existing files.')
.option(
Expand Down
7 changes: 3 additions & 4 deletions lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ exports.clone = function clone(repo, dir, branch, options) {
branch,
'--single-branch',
'--origin',
options.remote
options.remote,
'--depth',
options.depth
];
if (options.depth) {
args.push('--depth', options.depth);
}
return spawn(git, args).catch(function(err) {
// try again without banch options
return spawn(git, ['clone', repo, dir, '--origin', options.remote]);
Expand Down
1 change: 1 addition & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ exports.publish = function publish(basePath, config, callback) {
add: false,
git: 'git',
clone: getCacheDir(),
depth: 1,
dotfiles: false,
branch: 'gh-pages',
remote: 'origin',
Expand Down