Skip to content

Commit 8a70b3d

Browse files
Joshua GrossoJoshua Grosso
authored andcommitted
Remove unnecessary branchName option from the pull command
`git-lfs-pull`'s manpage says "Download all Git LFS files for current ref & checkout", and I don't see any options to pull a specific branch's files. My guess is that this code was copy-and-pasted from the `fetch` command, explaining the extraneous argument. Also, this commit has test stubs for the `fetch` and `pull` commands.
1 parent f132bd7 commit 8a70b3d

3 files changed

Lines changed: 50 additions & 4 deletions

File tree

src/commands/pull.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,12 @@ function pull(repo, options) {
6363
const args = [];
6464
const {
6565
remoteName,
66-
branchName,
6766
callback
6867
} = (options || {});
6968

7069
if (remoteName) {
7170
args.push(remoteName);
7271
}
73-
if (branchName) {
74-
args.push(branchName);
75-
}
7672
const argsString = R.join(' ', args);
7773

7874
return core.pull(argsString, { cwd: repo.workdir(), shell: true }, callback)

test/tests/commands/fetch.spec.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import {
2+
todo
3+
} from '../../utils';
4+
5+
describe('fetch', () => {
6+
describe('the default export', () => {
7+
it('runs fetch in the provided repo', todo);
8+
9+
describe('when a remote name is provided', () => {
10+
it('adds the provided remote name to the arguments', todo);
11+
});
12+
13+
describe('when a remote name and a branch name are provided', () => {
14+
it('adds the provided remote name and branch name to the arguments', todo);
15+
});
16+
17+
describe('when a callback is provided', () => {
18+
it('passes the provided callback to `spawn`', todo);
19+
});
20+
21+
describe('when fetch returns invalid output', () => {
22+
it('returns an error response', todo);
23+
});
24+
25+
it('handles errors', todo);
26+
});
27+
});

test/tests/commands/pull.spec.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import {
2+
todo
3+
} from '../../utils';
4+
5+
describe('pull', () => {
6+
describe('the default export', () => {
7+
it('runs pull in the provided repo', todo);
8+
9+
describe('when a remote name is provided', () => {
10+
it('adds the provided remote name to the arguments', todo);
11+
});
12+
13+
describe('when a callback is provided', () => {
14+
it('passes the provided callback to `spawn`', todo);
15+
});
16+
17+
describe('when fetch returns invalid output', () => {
18+
it('returns an error response', todo);
19+
});
20+
21+
it('handles errors', todo);
22+
});
23+
});

0 commit comments

Comments
 (0)