Hi.
Is there a (non-depressing) way of getting "which files did not change since <rev>" out of git?
Rene.
Hi.
Is there a (non-depressing) way of getting "which files did not change since <rev>" out of git?
Rene.
Re: statistics
Rene Herman schrieb:
> Hi. > > Is there a (non-depressing) way of getting "which files did not change > since <rev>" out of git?
What is "non-depressing"?
Try this if you are using bash:
comm -13 <(git diff --name-only your-rev-here) <(git ls-files)
-- Hannes
Re: statistics
On 25-07-08 13:29, Johannes Sixt wrote:
> Rene Herman schrieb:
>> Is there a (non-depressing) way of getting "which files did not change >> since <rev>" out of git? > > What is "non-depressing"? > > Try this if you are using bash: > > comm -13 <(git diff --name-only your-rev-here) <(git ls-files)
That classifies as non-depressing, thank you. --name-only, process substitution _and_ comm -13 hadn't featured in my attempts yet.
Rene.
Re: statistics
Hi,
On Fri, 25 Jul 2008, Johannes Sixt wrote:
> comm -13 <(git diff --name-only your-rev-here) <(git ls-files)
Thanks. I learnt two new things from that: comm (funnily, I did not know that tool), and <() (looks almost like a puffin, doesn't it?).
But should it not be -12?
Ciao, Dscho
Re: statistics
Johannes Schindelin schrieb:
> On Fri, 25 Jul 2008, Johannes Sixt wrote: > >> comm -13 <(git diff --name-only your-rev-here) <(git ls-files) > > But should it not be -12?
I don't think so:
-1 .. suppress lines unique to 1st arg, i.e. removed files -2 .. suppress lines unique to 2nd arg, i.e. unmodified files -3 .. suppress lines in both, i.e. modified and added files
We want to keep lines that -2 would remove, that leaves -1 and -3.
-- Hannes
Re: statistics
Hi,
On Fri, 25 Jul 2008, Johannes Sixt wrote:
> Johannes Schindelin schrieb: > > On Fri, 25 Jul 2008, Johannes Sixt wrote: > > > >> comm -13 <(git diff --name-only your-rev-here) <(git ls-files) > > > > But should it not be -12? > > I don't think so: > > -1 .. suppress lines unique to 1st arg, i.e. removed files > -2 .. suppress lines unique to 2nd arg, i.e. unmodified files > -3 .. suppress lines in both, i.e. modified and added files > > We want to keep lines that -2 would remove, that leaves -1 and -3.
Oh, but of course!
Thanks again, Dscho
Re: statistics
On Jul 25, 2008, at 4:29 AM, Johannes Sixt wrote:
> Rene Herman schrieb: >> Hi. >> >> Is there a (non-depressing) way of getting "which files did not >> change >> since <rev>" out of git? > > What is "non-depressing"? > > Try this if you are using bash: > > comm -13 <(git diff --name-only your-rev-here) <(git ls-files)
Neat, I never knew about comm before. I probably would have come up with something like
cat <(git ls-tree -r $REV) <(git ls-tree -r HEAD) | sort | uniq -d | cut -f 2 | sort
-Kevin Ballard
-- Kevin Ballard http://kevin.sb.org kevin@sb.org http://www.tildesoft.com