Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range diff with ranges lacking dotdot #841

Closed

Commits on Jan 27, 2021

  1. range-diff/format-patch: refactor check for commit range

    Currently, when called with exactly two arguments, `git range-diff`
    tests for a literal `..` in each of the two. Likewise, the argument
    provided via `--range-diff` to `git format-patch` is checked in the same
    manner.
    
    However, `<commit>^!` is a perfectly valid commit range, equivalent to
    `<commit>^..<commit>` according to the `SPECIFYING RANGES` section of
    gitrevisions[7].
    
    In preparation for allowing more sophisticated ways to specify commit
    ranges, let's refactor the check into its own function.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Jan 27, 2021
    Configuration menu
    Copy the full SHA
    b98fa94 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2021

  1. range-diff/format-patch: handle commit ranges other than A..B

    In the `SPECIFYING RANGES` section of gitrevisions[7], two ways are
    described to specify commit ranges that `range-diff` does not yet
    accept: "<commit>^!" and "<commit>^-<n>".
    
    Let's accept them, by parsing them via the revision machinery and
    looking for at least one interesting and one uninteresting revision in
    the resulting `pending` array.
    
    This also finally lets us reject arguments that _do_ contain `..` but
    are not actually ranges, e.g. `HEAD^{/do.. match this}`.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    f8e6a1a View commit details
    Browse the repository at this point in the history
  2. range-diff(docs): explain how to specify commit ranges

    There are three forms, depending whether the user specifies one, two or
    three non-option arguments. We've never actually explained how this
    works in the manual, so let's explain it.
    
    Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
    dscho committed Feb 5, 2021
    Configuration menu
    Copy the full SHA
    08c5f87 View commit details
    Browse the repository at this point in the history