Skip to content

tomas-bareikis/gitstorical

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitstorical

Run commands on different git repo versions.

gitstorical is a command-line tool that allows you to run a command on different versions (tags) of a git repository. It provides a way to analyze or compare the output of the same command across various points in the repository's history.

Installation

go install github.com/tomas-bareikis/gitstorical@latest

Usage

List all files in the repository on each tag:

gitstorical --gitURL https://github.com/go-git/go-git \
  --command ls tags

Print the output in jsonl format:

gitstorical --gitURL https://github.com/go-git/go-git \
  --command ls \
  --outputFormat jsonl tags

Run only on tags newer than v5:

gitstorical --gitURL https://github.com/go-git/go-git \
  --command ls \
  --outputFormat jsonl tags \
  --tagFilter '>v5.0.0'

Checkout git repository to specific location. If a git repo already exists in the that location, it will not be overwritten.

gitstorical --checkoutDir /tmp/gitstorical/go-git \
   --gitURL https://github.com/go-git/go-git \
   --command ls \
   --outputFormat jsonl \
   tags --tagFilter '>v5.0.0'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages