Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
cli
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

walker

A walker (looking for GIT repos to PULL) written in Go

Any usable stuff?

Meh, if you feel really brave and you have a big collection of GIT repos that you want to keep up to date and you are really too lazy to pull one by one, maybe you can try this embarrassing script:

walker -c pull -p ~/workspaces/

There is a dry run feature... using -d.

Version is easy:

walker -V

| Walker
version 0.0.3

Could be nice to dump a file with all the remotes... try

walker -c pull -p ~/workspaces/` -r

Available options, for a safe try is -c fetch ... please note that this script is totally untested, machine dependent and probably useful only to me.

This script is Golang powered: this means that spawn 10 goroutines to be super fast!

parallel

To change the degree of parallelism use the WORKERS_NUMBER environment variable (get the results with the verbose flag set):

WORKERS_NUMBER=1 walker -v

| Walker

running with this options:
&{Command:fetch DryRun:false Help:false Path:. Silent:false Remotes:false Verbose:true Version:false}

Start walking from /Users/user/something
Start fetching down into ..
Spawning 1 goroutines...
[worker_0] worker is born...

/Users/user/something/.git is a GIT dir (true)
 On scanning (001) ...[worker_0] worker picked up a job: fetching /Users/user/something
 - /Users/user/something:
---
Processed 1 repositories.
Bye

help menu

| Walker

Usage of walker:
  -c string
        The command you want to run in the repo [pull|fetch] (shorthand) (default "fetch")
  -command string
        The command you want to run in the repo [pull|fetch] (default "fetch")
  -d    To start a Dry run that does nothing. (shorthand)
  -dry
        To start a Dry run that does nothing.
  -h    Read this Help (shorthand)
  -help
        Read this Help
  -p string
        The path to traverse in search of GIT folders. (shorthand) (default ".")
  -path string
        The path to traverse in search of GIT folders. (default ".")
  -r    Dump only the remotes (shorthand)
  -remotes
        Dump only the remotes
  -s    Reduce the output (shorthand)
  -silent
        Reduce the output
  -v    Print useless stuff (shorthand)
  -verbose
        Print useless stuff
  -V    Display the version (shorthand)
  -version
        Display the version

Disclaimer

There is not yet neither an error handling feature... but right now it's not important.

Everything is missing:

  • error handling
  • final results
  • retry
  • filters

... could be a todo-ish list for the future needs.

About

A walker (traverse directories in parallel, looking for GIT repos to PULL) written in Go

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.