NoSuchCommitException#getCommitId retains caret prefix when missing commit is an exclude

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 4.8.0
    • Affects Version/s: 3.11.6, 4.0.8, 4.1.6, 4.2.3, 4.3.3, 4.4.2, 4.5.2, 4.6.3, 4.7.1
    • Component/s: None
    • None

      When a git rev-list is run that excludes a non-existent ref the caret (^) character is included in the git output

      $ git rev-list --all master ^foo
      fatal: bad revision '^foo'
      

      The caret prefix is then included in the
      NoSuchCommitException#getCommitId which violated the contract for this method. The contract for NoSuchCommitException#getCommitId id defined as

      Retrieves the ID for which no matching commit was found. If a path was supplied when 
      attempting retrieve the commit, this is the ID of the starting commit
      

            Assignee:
            Unassigned
            Reporter:
            rikf
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: