Skip to content

Commit c5859a1

Browse files
committed
Initialize config files, autocompletion and documentation of tag options.
1 parent 788fe26 commit c5859a1

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ OPTIONS:
4949
-u | --user Your username (for private repos).
5050
5151
-b | --branch Branch to be fetched.
52+
-v | --tag Tag of the version to be fetched.
5253
-d | --depth Number of commits to be fetched.
5354
```
5455

@@ -112,6 +113,11 @@ Fill in the config file ([`template.conf`](./template.conf)) with the informatio
112113
- `BRANCH`:
113114
- The branch to be fetched.
114115
- Omit it to pull all of the branches and switch to the default one.
116+
- Overrided by `TAG_NAME`.
117+
- `TAG_NAME`:(tag | t)
118+
- Tag of the version to be fetched.
119+
- Omit it to fetch the latest commit.
120+
- Takes precedence over `BRANCH`.
115121
- `COMMIT_DEPTH`:
116122
- Number of commits you want to fetch (useful for deployment purposes).
117123
- Omit it to fetch the entire remote history.

completion-rules.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ _git-partial-clone()
4040
return
4141
;;
4242
--owner | -o | --repo | -r | --subdir | -s | \
43-
--user | -u | --branch | -b | --depth | -d )
43+
--user | -u | --branch | -b | --depth | -d | \
44+
--tag | -v)
4445
# Suggest nothing :P
4546
return
4647
;;

example.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ TOKEN_PATH=
1616
GIT_USER=
1717

1818
BRANCH=master
19+
TAG_NAME=
1920
COMMIT_DEPTH=3
2021

2122
PARENT_DIR=tmp

git-partial-clone.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ main() {
2929
echo -e " -t | --token Path to your access token (for private repos)."
3030
echo -e " -u | --user Your username (for private repos).\n"
3131
echo -e " -b | --branch Branch to be fetched."
32+
echo -e " -v | --tag Tag of the version to be fetched."
3233
echo -e " -d | --depth Number of commits to be fetched.\n"
3334
}
3435
case $# in

template.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ TOKEN_PATH=
1616
GIT_USER=
1717

1818
BRANCH=
19+
TAG_NAME=
1920
COMMIT_DEPTH=
2021

2122
PARENT_DIR=

0 commit comments

Comments
 (0)