SYNOPSIS

cg-diff [-c] [-m] [-p] [-r FROM_ID[:TO_ID]] [FILE]…

DESCRIPTION

Outputs a diff for converting the first tree to the second one. By default compares the current working tree to the state at the last commit. The output will automatically be displayed in a pager unless it is piped to a program.

OPTIONS

-c

Colorize the diff output

-p

Instead of one ID denotes a parent commit to the specified ID (which must not be a tree, obviously).

-r FROM_ID[:TO_ID]

Specify the revisions to diff using either -r rev1:rev2 or -r rev1 -r rev2. If no revision is specified, the current working tree is implied. Note that no revision is different from empty revision which means -r rev: compares between rev and HEAD, while -r rev compares between rev and working tree.

-m

Base the diff at the merge base of the -r arguments (defaulting to HEAD and origin).

-h, --help

Print usage help.

ENVIRONMENT VARIABLES

PAGER

The pager to display log information in, defaults to less.

PAGER_FLAGS

Flags to pass to the pager. By default R is added to the LESS environment variable to allow displaying of colorized output.

COPYRIGHT

Copyright © Petr Baudis, 2005

SEE ALSO

cg-diff command is part of cogito(7), a toolkit for managing git(1) trees.