Skip to content

monadosquito/traverse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Traverse git repositories using a command.

traverse
    [--amending-prefix <amending_prefix>]
    [-h | --help]
    [-k | --keep <revision>]
    [-p | --prefix <prefix>]
    [-q | --quiet]
    [-v | --verbose]
    <amended_repository_path>
    -- {<amending_repository_path>...}
    -- <command>

Features

  • at each <amended_repository_path> commit that has a <prefix><body> subject to check out each <amending_repository_path> commit whose subject contains a <body> substring, execute a <command> command, and amend the former

Installation flow

Follow the unpath tool installation flow.

Usage flow

  1. Set up an environment.
  2. Traverse git repositories.

Set up

    • Enter the nix shell using the nix-shell command.
    • Enter <amended_repository_path> and <amending_repository_paths> repositories using the cd command.
  1. Select <amended_repository_path> and <amending_repository_paths> revisions to traverse using the git checkout command.

Notes

  • The nix-shell command must be executed either from a dependee root directory or with a path to either it or the shell.nix file supplied.

Traverse

Execute the traverse <amended_repository_path> -- {<amending_repository_path>...} -- <command> command.

Notes

  • The git tool must be available in the nix shell in which the command is executed.

Convention

This tool follows the convention followed by the bem library.


Table 1

the flag and option descriptions

Flag or option Default value Description
--amending-prefix feat.*: a subject pattern to select <amending_repository_paths> commits by
-h, --help 0 whether to print the help message and then exit
-k, --keep <root> a parent revision up to which to traverse a currently checked out revision
-p, --prefix feat.*: a subject pattern to select <amended_repository_path> commits by
-q, --quiet 0 whether to suppress output
-v, --verbose 0 whether to execute the git diff command at each iteration