Tool for advanced/.custom git operations
pip install -Ue <path-to-package>Show the main help message
dl-git --help
dl-git --hThe --help (-h) option can also be used for any command:
dl-git <command> --helpOptional. Specify custom repository path
dl-git --repo-path <path> <command> <args>
By default CWD is used. The tool first looks for the repository at the given path, and then, if not found, it starts a recursive search upwards, toward the path root. If no repository is found, an error is raised. If the path is inside a submodule, then the submodule is considered to be the root repo.
List files that have changed between two given revisions including the changes in all submodules
dl-git range-diff-paths --base <base> --head <head>
dl-git range-diff-paths --base <base> --head <head> --absolute
dl-git range-diff-paths --base <base> --head <head> --only-added-commitsHere base and head can be a commit ID, branch name, HEAD~3 or any similar notation
that is usually accepted by git.
These arguments are optional. By default head is HEAD and base is HEAD~1.
Thgis means you can use the following command to see the diff of the last commit in the current branch:
dl-git range-diff-pathsThe --absolute option makes the tool print absolute paths.
By default they are printed relative to the repository root.
The --only-added-commits option makes the tool inspect only commits
that have been added in the head version.
Show the main help message
dl-git --help
dl-git --hThe --help (-h) option can also be used for any command:
dl-git <command> --helpOptional. Specify custom repository path
dl-cherry-farmer --repo-path <command> <args>
By default CWD is used. The tool first looks for the repository at the given path, and then, if not found, it starts a recursive search upwards, toward the path root. If no repository is found, an error is raised. If the path is inside a submodule, then the submodule is considered to be the root repo.
Optional. Specify path to cherry-farmer's state file
dl-cherry-farmer --state-file <path> <command> <args>
By default ./cherry_farmer.json is used.
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch>
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --new
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --ignored
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --picked
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --allHere --src-branch and --dst-branch are the names of the branches that you want to compare
Several options control which commits to show:
--new: new (not picked and not ignored commits) will be shown.--picked: picked commits will be shown.--ignored: ignored commits will be shown.-aor--all: all commits will be shown.
If none of these is specified, then --new is assumed.
Iterate over all commits in diff and pick or ignore them interactively
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch>
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --new
dl-cherry-farmer show --src-branch <branch> --dst-branch <branch> --oneAccepts the same options as does the show command, but has some additional ones:
--one: instead of iterating over all commits show just one and quit after it is handled.
The tool will ask for a new state and message for each commit. If the message is not specified, a default one will be generated.
To skip an un-picked commit (and not mark it as ignored or picked) use the state new.
Non-interactive command for marking commits.
dl-cherry-farmer mark --commit <commit> --state <state>
dl-cherry-farmer mark --commit <commit> --state <state> -m <message>
dl-cherry-farmer mark --commit <commit> --state <state> --message <message>Here commit should be a valid commit ID, and state is the state to be set for this commit.
If --state new is specified, then the info about this commit is simply deleted from the saved state.
Use -m or --message to specify a pick message (will be saved in the state file).
If the message is not specified, a default one will be generated.