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

Re: [PATCH v2] git-p4.py: add support for filetype change

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 4, 2016, 21:55 UTC
Message-ID
<xmqqtwmtm2m3.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<1451904764-338-1-git-send-email-romain.picard@oakbits.com>
Romain Picard <romain.picard@oakbits.com> writes:
Show 29 quoted lines
> diff --git a/t/t9827-git-p4-change-filetype.sh b/t/t9827-git-p4-change-filetype.sh
> new file mode 100755
> index 0000000..b0a9f62
> --- /dev/null
> +++ b/t/t9827-git-p4-change-filetype.sh
> @@ -0,0 +1,69 @@
> +#!/bin/sh
> +#
> +# Copyright (c) 2016 Romain Picard
> +#
> +
> +test_description='git p4 support for file type change'
> +
> +. ./lib-git-p4.sh
> +
> +test_expect_success 'start p4d' '
> +	start_p4d
> +'
> +
> +test_expect_success 'create files' '
> +	(
> +		cd "$cli" &&
> +		p4 client -o | sed "/LineEnd/s/:.*/:unix/" | p4 client -i &&
> +		cat >file1 <<-EOF &&
> +		This is a first file.
> +		EOF
> +		cat >file2 <<-EOF &&
> +		This is a second file whose type will change.
> +		EOF

Micronit. It would be nicer to the readers to make it clear that there is no funny substitution to be worried about by quoting the end marker of these here document, i.e.

		cat >dest <<-\EOF &&
                text without any funny substitution business
                EOF
Show 6 quoted lines
> +		p4 add file1 file2 &&
> +		p4 submit -d "add files"
> +	)
> +'
> +
> +test_expect_success 'change file to symbolic link' '

This needs a SYMLINKS prerequisite so that it is skipped on systems that lack support for symbolic links, i.e.

	test_expect_success SYMLINKS 'change file to symbolic link' '
The same for the next one.
Thanks.
Previous: Romain PicardNext: Luke Diamand
Message 2 of 4 in “git-p4.py: add support for filetype change”
  1. git-p4.py: add support for filetype changeRomain Picard, Jan 4, 2016
  2. Junio C HamanoJan 4, 2016
  3. Luke DiamandJan 4, 2016
  4. Romain PicardJan 5, 2016

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.