git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Git difftool: interaction between --dir-diff and --trust-exit-code
@ 2024-02-15 11:09 Jean-Rémy Falleri
  2024-02-16  8:39 ` [PATCH] git-difftool--helper: honor `--trust-exit-code` with `--dir-diff` Patrick Steinhardt
  2024-02-20 10:08 ` [PATCH v2] " Patrick Steinhardt
  0 siblings, 2 replies; 10+ messages in thread
From: Jean-Rémy Falleri @ 2024-02-15 11:09 UTC (permalink / raw)
  To: git

Hi all and thanks for the amazing work you do on Git.

It seems that the —trust-exit-code option from git-difftool is not working when one use —dir-diff.

As an example I have set up the following configuration :

[difftool "false"]
cmd = false

And when I launch git-difftool in normal mode with —trust-exit-code, it works fine:
$ git difftool -y -t false --trust-exit-code HEAD HEAD~1
$ echo $?
> 128

However the same command in dir-diff mode is not working :
$ git difftool -t false -d --trust-exit-code HEAD HEAD~1
$ echo $?
> 0

From what I read in git/git-difftool—helper.sh it seems to not forward the exit status when $GIT_DIFFTOOL_DIRDIFF is on.

I believe there is nothing in the documentation about this interaction. Maybe this is intended but I find that this could be useful to have this option working on dir-diff mode too. For instance in my use case I would want to signal an error when I detect breaking changes with the breaking change detector we are working on, that is hooked as a difftool.

Best regards!
---
Jean-Rémy Falleri (http://www.labri.fr/~falleri)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-21 13:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 11:09 Git difftool: interaction between --dir-diff and --trust-exit-code Jean-Rémy Falleri
2024-02-16  8:39 ` [PATCH] git-difftool--helper: honor `--trust-exit-code` with `--dir-diff` Patrick Steinhardt
2024-02-16 18:12   ` Junio C Hamano
2024-02-20  9:56     ` Patrick Steinhardt
2024-02-28  1:52     ` David Aguilar
2024-02-28  2:15       ` Junio C Hamano
2024-02-20 10:08 ` [PATCH v2] " Patrick Steinhardt
2024-03-08 22:12   ` SZEDER Gábor
2024-03-08 22:36     ` Junio C Hamano
2024-03-21 13:50       ` Patrick Steinhardt

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).