git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-p4: test t9820-git-p4-editor-handling.sh failing
@ 2015-05-19  6:40 Luke Diamand
  2015-05-19 15:44 ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Luke Diamand @ 2015-05-19  6:40 UTC (permalink / raw)
  To: Junio C Hamano, git

Hi!

The test I put in recently for multi-word editor handling in git-p4, 
t9820-git-p4-editor-handling.sh, has started failing.

It looks like the reason is the change to it that goes:

-	P4EDITOR="touch \"$git/touched\"" git p4 submit &&
+	P4EDITOR=": >\"$git/touched\"" git p4 submit &&

The problem is that git-p4 invokes $P4EDITOR passing it the name of the 
submit template. After it returns, it checks that the editor has 
actually updated the file's modification time.

The first version (somewhat subtly) does this; the second doesn't.

I put the extra check with "$git/touched" in just to check that P4EDITOR 
was being invoked at all, but I guess it's not strictly necessary. I 
wondered about doing this:

+	P4EDITOR=": >\"$git/touched\" && touch" git p4 submit &&

But it's possibly getting a bit obscure. I guess it could be OK with a 
comment.

Could it go back to the original version, or is there some other way to 
achieve a similar effect?

Thanks!
Luke

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

end of thread, other threads:[~2015-05-24 18:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19  6:40 git-p4: test t9820-git-p4-editor-handling.sh failing Luke Diamand
2015-05-19 15:44 ` Junio C Hamano
2015-05-19 22:23   ` [PATCHv3 0/3] git-p4: fix handling of multi-word P4EDITOR Luke Diamand
2015-05-19 22:23     ` [PATCHv3 1/3] git-p4: add failing test for P4EDITOR handling Luke Diamand
2015-05-20 19:54       ` Junio C Hamano
2015-05-20 20:56         ` Junio C Hamano
2015-05-20 21:43           ` Luke Diamand
2015-05-19 22:23     ` [PATCHv3 2/3] git-p4: fix handling of multi-word P4EDITOR Luke Diamand
2015-05-19 22:23     ` [PATCHv3 3/3] git-p4: tests: use test-chmtime in place of touch Luke Diamand
2015-05-19 22:36       ` Luke Diamand
2015-05-24 18:56       ` Junio C Hamano

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