GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - nodejs/branch-diff: A tool to list print the commits on one git branch that are not on another using loose comparison

BranchesTags
Open more actions menu

Latest commit

 

History

158 Commits
158 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
snap
snap
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
README.md
README.md
 
 
branch-diff.js
branch-diff.js
 
 
package.json
package.json
 
 
test.js
test.js
 
 

Repository files navigation

branch-diff

A tool to list print the commits on one git branch that are not on another using loose comparison

npm npm

Usage

$ branch-diff [--format=<format>] [--group] [--reverse] [--patch-only] base-branch comparison-branch

A commit is considered to be in the comparison-branch but not in the base-branch if:

  • the commit sha is identical, or
  • the commit summary is identical and the commit description is identical and a PR-URL exists in the metadata and is identical (in the description but split out by commit-stream)

The output is the same as changelog-maker. The default simple format suits console output; use --format=markdown for Markdown.

The commit list is very close to running:

$ git log main..next

But the comparison isn't quite as strict, generally leading to a shorter list of commits.

Options

  • --commit-url: A URL template which will be used to generate commit URLs for a repository not hosted in GitHub. {ref} is the placeholder that will be replaced with the commit, i.e. --commit-url=https://gitlab.com/myUser/myRepo/commit/{ref}. {ghUser} and {ghRepo} are available if they can be derived from package.json (Gitlab and Bitbucket URLs should be understood in package.json).
  • --end-ref=<ref>: Only list comparison-branch commits up to the commit date of <ref>.
  • --exclude-label: Exclude any commits from the list that come from a GitHub pull request with the given label. Multiple --exclude-label options may be provided, they will also be split by ,. e.g. --exclude-label=semver-major,meta.
  • --filter-release: Exclude Node-style release commits from the list. e.g. Working on v1.0.0 or 2015-10-21 Version 2.0.0.
  • --find-matching-prs: Use the GitHub API to find the pull requests that match commits that don't have PR-URL metadata in their message text.
  • --format: Dictates what formatting the output will have. Possible options are:
    • simple (default): Don't print full markdown output, good for console printing without the additional fluff.
    • sequence: Hybrid format that can be pasted directly in the sequence editor of a git rebase --interactive session, with commit title, author, labels and PR URL as comments compatible with interactive rebase input.
    • sha: Print only the 10-character truncated commit hashes.
    • plaintext: A very simple form, without commit details, implies --group.
    • markdown: A Markdown formatted from, with links and proper escaping.
    • messageonly: Displays the commit message only, implies --group.
  • --group or -g: Group commits by prefix, this uses the part of the commit summary that is usually used in Node.js core to indicate subsystem for example. Groups are made up of numbers, letters, , and -, followed by a :.
  • --help or -h: Print usage and options.
  • --patch-only: An alias for --exclude-label=semver-major,semver-minor.
  • --quiet or -q: Do not print to stdout.
  • --repo: Override the auto-detected GitHub repository name derived from package.json
  • --require-label: Only include commits in the list that come from a GitHub pull request with the given label. Multiple --require-label options may be provided, they will also be split by ,. e.g. --require-label=test,doc.
  • --reverse: Reverse the results, this is especially useful when piping output to xargs.
  • --sequence-drop=<label1>[,<label2>[,...]]: When --format=sequence, will output the commits belonging to a PR with a label listed here as drop instead of pick. This can be useful for a human backporter to understand why a specific commit does not apply cleanly, to spot which commit might be creating conflicts.
  • --user: Override the auto-detected GitHub user/org derived from package.json
  • --version or -v: Only prints branch-diff's package.json version.

Unknown options are an error. The --sha, --plaintext, --markdown and --simple shorthands were removed in v4; use --format=<format>.

License

branch-diff is Copyright (c) 2015 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

About

A tool to list print the commits on one git branch that are not on another using loose comparison

Topics

nodenodejs

Resources

Readme

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

53 stars

Watchers

13 watching

Forks

21 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.