git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Luke Diamand <luke@diamand.org>
To: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>
Subject: git-p4: test t9820-git-p4-editor-handling.sh failing
Date: Tue, 19 May 2015 07:40:55 +0100	[thread overview]
Message-ID: <555ADAF7.5020001@diamand.org> (raw)

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

             reply	other threads:[~2015-05-19  6:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-19  6:40 Luke Diamand [this message]
2015-05-19 15:44 ` git-p4: test t9820-git-p4-editor-handling.sh failing 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

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=555ADAF7.5020001@diamand.org \
    --to=luke@diamand.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).