git-diff-stages(1)

NAME

git-diff-stages - Compares content and mode of blobs be
tween stages in an unmerged index file

SYNOPSIS

git-diff-stages  [<common diff options>] <stage1> <stage2>
[<path>...]

DESCRIPTION

Compares the content and mode of the blobs in two stages
in an unmerged index file.

OPTIONS

Array<stage1>,<stage2>
The stage number to be compared.

OUTPUT FORMAT

ArrayThat is, from the left to the right:

1. a colon.

2. mode for "src"; 000000 if creation or unmerged.

3. a space.

4. mode for "dst"; 000000 if deletion or unmerged.

5. a space.

6. sha1 for "src"; 0{40} if creation or unmerged.

7. a space.

Array9. a space.

ArrayExample:

:100644 100644 5be4a4...... 000000...... M file.c
When -z option is not used, TAB, LF, and backslash charac
ters in pathnames are represented as , 0 and respectively.

GENERATING PATCHES WITH -P

Arraydescribed above; instead they produce a patch file.
The patch generation can be customized at two levels.

Arraywhere:

Arraywhen a new file is added), or a temporary file (e.g. old-file in
the index). GIT_EXTERNAL_DIFF should not worry about unlinking the temporary file --- it is removed when GIT_EXTERNAL_DIFF exits.
For a path that is unmerged, GIT_EXTERNAL_DIFF is called
with 1 parameter, <path>.

GIT SPECIFIC EXTENSION TO DIFF FORMAT

Arrayfile that rename/copy produces, respectively.
2. It is followed by one or more extended header lines:
old mode <mode>
new mode <mode>
deleted file mode <mode>
new file mode <mode>
copy from <path>
copy to <path>
rename from <path>
rename to <path>
similarity index <number>
dissimilarity index <number>
index <hash>..<hash> <mode>
3. TAB, LF, double quote and backslash characters in path
names are represented as , 0

COMBINED DIFF FORMAT

Arrayparents). When shown by git diff-files -c, it compares the two
unresolved merge parents with the working tree file (i.e. file1
is stage 2 aka "our version", file2 is stage 3 aka "their version").

AUTHOR

Written by Junio C Hamano <junkio@cox.net>

DOCUMENTATION

Documentation by Junio C Hamano.

GIT

Part of the git(7) suite

REFERENCES

1. diffcore documentation
diffcore.html

03/08/2007 GIT
Copyright © 2010-2024 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout