• Vivien Didelot's avatar
    tools: add Gerrit/Redmine utilities for Git · f93a5ffb
    Vivien Didelot authored
    This commit adds two dev scripts, intended to be used with Git. They
    allow easy interaction with Gerrit (using the commit change ID) and
    Redmine (using the issue reference).
    
    Usage examples:
    
        # Copy Gerrit change URL of HEAD, for later pasting
        git gerrit url | xclip
    
        # Open Gerrit in a web browser for the parent commit
        git gerrit open HEAD^
    
        # Fetch the last version corresponding to a commit
        git gerrit fetch 2460d160
    
        # Open Redmine issue related to the current commit
        git redmine open
    
    These scripts may be used directly:
    
        ./tools/git-gerrit
    
    or installed as a Git subcommand (recommended):
    
        git config alias.gerrit '!tools/git-gerrit'
        git config alias.redmine '!tools/git-redmine'
    
    The configuration is managed through git config. Running these scripts
    with missing configuration (e.g. host, port) will prompt the setup.
    
    Note on global usage: optionally, you can specify the global path of
    these scripts, or add them to your $PATH, in order to use them in any
    repo, and eventually have global settings, like:
    
        git config --global redmine.url https://...
    
    Change-Id: Ie8530fd03e00452075ab045b278923d03d0ead20
    f93a5ffb
git-redmine 1.22 KB