* [gentoo-user] OT: git, how to compare a repo with a loose tree
@ 2017-12-08 2:58 99% Ian Zimmerman
0 siblings, 0 replies; 1+ results
From: Ian Zimmerman @ 2017-12-08 2:58 UTC (permalink / raw
To: gentoo-user
I would like to use "git diff" to show differences between the
current state of a git repository and a normal directory tree somewhere
on the filesystem, ie. one without a .git subdirectory. This is proving
surprisingly hard to do.
git diff has a documented mode to compare general "paths" as they call
it: the --no-index option. But when I try it like this inside a git repo,
git diff --no-index . /somedir
git apparently "forgets" that the current directory is a repo, and just
basically apes diff -r. This means it doesn't know which files are
tracked, and in particular it reports every freaking file under ./.git
as deleted. And there is no exclude option that I see. Argh! How can
I get around this?
If it matters: I'm fine with assuming the repo is clean ie. no
uncommitted changes, so the current state can be represented as any of:
working tree, "index" or HEAD.
--
Please don't Cc: me privately on mailing lists and Usenet,
if you also post the followup to the list or newsgroup.
To reply privately _only_ on Usenet, fetch the TXT record for the domain.
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-12-08 2:58 99% [gentoo-user] OT: git, how to compare a repo with a loose tree Ian Zimmerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox