Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

magit-review

Annotate diff lines while reviewing changes in magit — commits, staged and unstaged alike. Annotations are saved to REVIEW.md in the repo root.

Format

> Code review:
> Annotations in the following format: <path>:<line>: [<sha>] Annotation
> C-c on a line to go to it (on HEAD)

## Committed

path/to/file:123: [a348a942] My annotation

## Staged (uncommitted; SHA is HEAD at time of annotation)

path/to/file:45: [a348a942] Another note

## Unstaged (uncommitted; SHA is HEAD at time of annotation)

Entries land in the section matching where you annotated. Range diffs (e.g. main..feature) record the range as-is instead of a SHA.

Press RET on any annotation line to jump to the file and line.

Installation (Doom Emacs)

In packages.el:

(package! magit-review
  :recipe (:host github :repo "YOUR_USER/magit-review"))

In config.el:

(use-package! magit-review
  :after magit)

Then doom sync and restart.

Usage

  1. Show a diff: a commit from magit-log (RET), the staged/unstaged hunks right in the status buffer, or a diff buffer (d s, d u, d r).
  2. Move point to a diff line.
  3. Press d n to annotate.
  4. Type your note and hit RET.

REVIEW.md opens in a side window; focus stays in magit.

Press d N from any magit buffer to open REVIEW.md.

Commands

Key Command Description
d n magit-review-annotate Annotate line at point
d N magit-review-open Open REVIEW.md

Customization

Variable Default Description
magit-review-file "REVIEW.md" Output file name
magit-review-sha-length 8 SHA abbreviation width

Testing

make test

Batch ERT suite. Dependencies are loaded from your straight.el build directory; point MAGIT_REVIEW_BUILD_DIR elsewhere to override.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages