Skip to content

Commit

Permalink
feat: add status flag for clone operation (#9)
Browse files Browse the repository at this point in the history
* feat: add status flag for clone operation

* Fix typo

* Fix typo

* Fix typo

* Fix typo

* Fix typo
  • Loading branch information
isindir authored Feb 9, 2022
1 parent 689b7e7 commit 91aca1f
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 42 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Custom
env
Gitfile
Gitfile.ignore
Gitfile*
bin/
chglog.tmp
gitlab_api_postman.json
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec
GO := GOPROXY=https://proxy.golang.org go

VERSION:="0.0.10"
VERSION:="0.0.11"
EXE:="git-get"
BUILD:=`git rev-parse --short HEAD`
TIME:=`date`
Expand Down
15 changes: 14 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var dryRun bool
var gitCloudProviderRootURL string
var targetClonePath string
var defaultMainBranch string
var status bool
var gitCloudProvider string

// Mirroring specific vars
Expand Down Expand Up @@ -83,7 +84,15 @@ git get -c 12 -f Gitfile`,
os.Exit(1)
}
initLogging(logLevel)
gitget.GetRepositories(cfgFile, ignoreFile, concurrencyLevel, stayOnRef, shallow, defaultMainBranch)
gitget.GetRepositories(
cfgFile,
ignoreFile,
concurrencyLevel,
stayOnRef,
shallow,
defaultMainBranch,
status,
)
},
}

Expand Down Expand Up @@ -139,6 +148,10 @@ func init() {
"s",
false,
"Shallow clone, can be used in CI to fetch dependencies by ref")
rootCmd.Flags().BoolVar(
&status, "status",
false,
"Print extra status information after clone is performed")
rootCmd.Flags().StringVarP(
&defaultMainBranch, "default-main-branch",
"b",
Expand Down
Loading

0 comments on commit 91aca1f

Please sign in to comment.