git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yaroslav Halchenko <yoh@onerussian.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: external diff driver is not used for diff --stat?
Date: Wed, 24 Jan 2018 23:35:44 -0500	[thread overview]
Message-ID: <20180125043544.GY3296@hopa.kiewit.dartmouth.edu> (raw)
In-Reply-To: <xmqqtvyzslcz.fsf_-_@gitster.mtv.corp.google.com>

Dear Git Peoples,

I am torturing git and git-annex here trying to compare some logs from a
run of a software recorded in two different branches.  As many other
tools, software often logs its version, elapsed times etc, so diff becomes not of interest to me:

	$> PATH=~/proj/misc/git/INSTALL-2.16.1/bin:$PATH git diff test-18.0.09 test-18.0.05+git24-gb25b21054_dfsg.1-1_nd90+1 -- AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git
	diff --git a/AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git b/AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git
	index db85c9be..5f4a704d 100644
	--- a/AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git
	+++ b/AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git
	@@ -1,4 +1,4 @@
	-++ 3dAllineate: AFNI version=AFNI_18.0.09 (Jan 19 2018) [64-bit]
	+++ 3dAllineate: AFNI version=Debian-18.0.05+git24-gb25b21054~dfsg.1-1~nd90+1 (Jan 23 2018) [64-bit]
	 ++ Authored by: Zhark the Registrator
	 ++ Source dataset: ./anat_final.FT+tlrc.HEAD
	 ++ Base dataset:   ./final_epi_vr_base_min_outlier+tlrc.HEAD
	@@ -28,5 +28,5 @@ volume 0
		lpa  = 0.921773
		lpc+ = 0.310739
		ncd  = 0.967007
	-++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 1.5
	+++ 3dAllineate: total CPU time = 0.0 sec  Elapsed = 1.3


so I came up with a simple differ to exclude those:

	$> cat ~/bin/git-annex-diff-wrapper
	#!/usr/bin/env bash                                                             
	LANG=C diff --color=always --ignore-matching-lines="\(AFNI version=\|time.*Elapsed\)" -u "$2" "$5"  

which works as it should (sorry for long lines, just wanted to not cut out
anything which might be of relevance)

	$> PATH=~/proj/misc/git/INSTALL-2.16.1/bin:$PATH GIT_EXTERNAL_DIFF='git-annex diffdriver  -- ~/bin/git-annex-diff-wrapper --' git diff --ext-diff test-18.0.09 test-18.0.05+git24-gb25b21054_dfsg.1-1_nd90+1 -- AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git     
	# no output received

(and even on annexed files -- whoohoo).

The problem comes that --stat seems to be not using the external diff (it is
line the same as above just with --stat):

	$> PATH=~/proj/misc/git/INSTALL-2.16.1/bin:$PATH GIT_EXTERNAL_DIFF='git-annex diffdriver  -- ~/bin/git-annex-diff-wrapper --' git diff --ext-diff test-18.0.09 test-18.0.05+git24-gb25b21054_dfsg.1-1_nd90+1 --stat -- AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git
	 AFNI_data6/FT_analysis/FT.results/out.allcostX.txt-git | 4 ++--
	 1 file changed, 2 insertions(+), 2 deletions(-)


A shortcoming or somehow "by design"? ;)

PS Please CC me in replies

Cheers!

-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        

  parent reply	other threads:[~2018-01-25  4:35 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25  0:02 BUG: merge -s theirs is not in effect (does the same as -s ours) Yaroslav Halchenko
2017-09-25  1:08 ` Junio C Hamano
2017-09-25  3:17   ` Yaroslav Halchenko
2017-09-25  5:33     ` Re* " Junio C Hamano
2017-09-25 14:30       ` -X theirs does not resolve symlink conflict Was: BUG: merge -s theirs is not in effect Yaroslav Halchenko
2017-09-26  1:56         ` Junio C Hamano
2017-09-26  2:16           ` Junio C Hamano
2017-09-26  2:39             ` Junio C Hamano
2017-09-26 13:37               ` Yaroslav Halchenko
2017-10-16  5:38                 ` [PATCH] merge: teach -Xours/-Xtheirs to symbolic link merge Junio C Hamano
2017-12-29  2:49                   ` Elijah Newren
2017-12-29  4:41                     ` Yaroslav Halchenko
2018-01-25  4:35                   ` Yaroslav Halchenko [this message]
2017-09-25 14:40       ` -s theirs use-case(s) Was: BUG: merge -s theirs is not in effect Yaroslav Halchenko
2017-09-26  3:45         ` Junio C Hamano
2017-09-26 13:32           ` Yaroslav Halchenko
2017-09-27  0:09             ` Junio C Hamano
2017-09-27  5:19               ` Yaroslav Halchenko
2017-09-27 20:21                 ` Yaroslav Halchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180125043544.GY3296@hopa.kiewit.dartmouth.edu \
    --to=yoh@onerussian.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).