git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-p4: test t9820-git-p4-editor-handling.sh failing

From
Luke Diamand <luke@diamand.org>
Date
May 19, 2015, 06:40 UTC
Message-ID
<555ADAF7.5020001@diamand.org>
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

Next: Junio C Hamano
Message 1 of 11 in “git-p4: test t9820-git-p4-editor-handling.sh failing”
  1. Luke DiamandMay 19, 2015
  2. Junio C HamanoMay 19, 2015
  3. 0/3 git-p4: fix handling of multi-word P4EDITORLuke Diamand, May 19, 2015
  4. 1/3 git-p4: add failing test for P4EDITOR handlingLuke Diamand, May 19, 2015
  5. Junio C HamanoMay 20, 2015
  6. Junio C HamanoMay 20, 2015
  7. Luke DiamandMay 20, 2015
  8. 2/3 git-p4: fix handling of multi-word P4EDITORLuke Diamand, May 19, 2015
  9. 3/3 git-p4: tests: use test-chmtime in place of touchLuke Diamand, May 19, 2015
  10. Luke DiamandMay 19, 2015
  11. Junio C HamanoMay 24, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.