Gentoo Archives: gentoo-user

From: Michael Orlitzky <mjo@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT: git, how to compare a repo with a loose tree
Date: Fri, 08 Dec 2017 03:17:52
Message-Id: 5151c5a1-b5ab-3d38-ed0b-353aca215046@gentoo.org
In Reply to: [gentoo-user] OT: git, how to compare a repo with a loose tree by Ian Zimmerman
1 On 12/07/2017 09:58 PM, Ian Zimmerman wrote:
2 > I would like to use "git diff" to show differences between the
3 > current state of a git repository and a normal directory tree somewhere
4 > on the filesystem, ie. one without a .git subdirectory. This is proving
5 > surprisingly hard to do.
6
7 If "git diff" isn't important, I was able to fake something close but
8 not quite like it:
9
10 colordiff --recursive \
11 --suppress-common-lines \
12 --unified \
13 --exclude=.git \
14 --new-file \
15 <src> \
16 <dst> \
17 | most
18
19 That uses app-misc/colordiff to colorize the diff output, and
20 sys-apps/most as my pager.