# [PATCH] userdiff: add support for Fountain documents

4 messages from 2015-07-17 to 2015-07-17. Participants: Zoë Blade, Johannes Schindelin, Zoë Blade.
Thread: https://gitlist.dev/t/39869

## Zoë Blade, 2015-07-17 11:59

Subject: [PATCH] userdiff: add support for Fountain documents
Message-ID: <1437134351-15392-1-git-send-email-zoe@bytenoise.co.uk>
URL: https://gitlist.dev/e/1437134351-15392-1-git-send-email-zoe%40bytenoise.co.uk

```
Add support for Fountain, a plain text screenplay format.  In the
structure of a screenplay, scenes are roughly analogous to functions,
in the sense that it makes your job slightly easier if you can see
which ones were changed in a given range of patches.
---
 Documentation/gitattributes.txt | 2 ++
 t/t4018-diff-funcname.sh        | 1 +
 t/t4018/fountain-scene          | 4 ++++
 userdiff.c                      | 2 ++
 4 files changed, 9 insertions(+)
 create mode 100644 t/t4018/fountain-scene

diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
index 81fe586..e3b1de8 100644
--- a/Documentation/gitattributes.txt
+++ b/Documentation/gitattributes.txt
@@ -527,6 +527,8 @@ patterns are available:
 
 - `fortran` suitable for source code in the Fortran language.
 
+- `fountain` suitable for Fountain documents.
+
 - `html` suitable for HTML/XHTML documents.
 
 - `java` suitable for source code in the Java language.
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 1dbaa38..67373dc 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -31,6 +31,7 @@ diffpatterns="
 	cpp
 	csharp
 	fortran
+	fountain
 	html
 	java
 	matlab
diff --git a/t/t4018/fountain-scene b/t/t4018/fountain-scene
new file mode 100644
index 0000000..6b3257d
--- /dev/null
+++ b/t/t4018/fountain-scene
@@ -0,0 +1,4 @@
+EXT. STREET RIGHT OUTSIDE - DAY
+
+CHARACTER
+You didn't say the magic phrase, "ChangeMe".
diff --git a/userdiff.c b/userdiff.c
index 2ccbee5..5316b48 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -35,6 +35,8 @@ IPATTERN("fortran",
 	  * they would have been matched above as a variable anyway. */
 	 "|[-+]?[0-9.]+([AaIiDdEeFfLlTtXx][Ss]?[-+]?[0-9.]*)?(_[a-zA-Z0-9][a-zA-Z0-9_]*)?"
 	 "|//|\\*\\*|::|[/<>=]="),
+PATTERNS("fountain", "^((INT|EST|EXT)?\\.[A-Z0-9' -]+)$",
+	 "[^ \t-]+"),
 PATTERNS("html", "^[ \t]*(<[Hh][1-6][ \t].*>.*)$",
 	 "[^<>= \t]+"),
 PATTERNS("java",
-- 
2.5.0.rc2.28.g6003e7f.dirty

```

## Johannes Schindelin, 2015-07-17 13:03

Subject: Re: [PATCH] userdiff: add support for Fountain documents
Message-ID: <e2ddebd5451a9331e03b24c719f68530@www.dscho.org>
URL: https://gitlist.dev/e/e2ddebd5451a9331e03b24c719f68530%40www.dscho.org
In-Reply-To: <1437134351-15392-1-git-send-email-zoe@bytenoise.co.uk>

```
Hi Zoë,

On 2015-07-17 13:59, Zoë Blade wrote:
> Add support for Fountain, a plain text screenplay format.  In the
> structure of a screenplay, scenes are roughly analogous to functions,
> in the sense that it makes your job slightly easier if you can see
> which ones were changed in a given range of patches.

Interesting!

Maybe you want to add a paragraph explaining a bit more about Fountain, or at least link to http://fountain.io/?

In any case, you will need to sign off on your patch:

    https://github.com/git/git/blob/v2.4.6/Documentation/SubmittingPatches#L234-L286

Ciao,
Johannes

```

## Zoë Blade, 2015-07-17 14:03

Subject: Re: [PATCH] userdiff: add support for Fountain documents
Message-ID: <9078E9B2-7EB5-4FC9-BE1B-93D67B4D7D2A@bytenoise.co.uk>
URL: https://gitlist.dev/e/9078E9B2-7EB5-4FC9-BE1B-93D67B4D7D2A%40bytenoise.co.uk
In-Reply-To: <e2ddebd5451a9331e03b24c719f68530@www.dscho.org>

```
On 17 Jul 2015, at 14:03, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:

> Maybe you want to add a paragraph explaining a bit more about Fountain, or at least link to http://fountain.io/?
> 
> In any case, you will need to sign off on your patch:
> 
>    https://github.com/git/git/blob/v2.4.6/Documentation/SubmittingPatches#L234-L286

Thanks, I'll amend it accordingly.  I originally mentioned the Fountain site in my rough draft of the commit message, but then removed it again after reading more of the patch submitting documentation and not spotting the nuance about when is and isn't a good time to include URLs.  No bother, I managed the commit message in another repo... :D  I'll bring it back and tidy it up a bit, then sign it off.

Thanks,
Zoë.
```

## Johannes Schindelin, 2015-07-17 16:20

Subject: Re: [PATCH] userdiff: add support for Fountain documents
Message-ID: <18517252c6c90729777105d4029a1649@www.dscho.org>
URL: https://gitlist.dev/e/18517252c6c90729777105d4029a1649%40www.dscho.org
In-Reply-To: <9078E9B2-7EB5-4FC9-BE1B-93D67B4D7D2A@bytenoise.co.uk>

```
Hi Zoë,

On 2015-07-17 16:03, Zoë Blade wrote:
> On 17 Jul 2015, at 14:03, Johannes Schindelin
> <johannes.schindelin@gmx.de> wrote:
> 
>> Maybe you want to add a paragraph explaining a bit more about Fountain, or at least link to http://fountain.io/?
>>
>> In any case, you will need to sign off on your patch:
>>
>>    https://github.com/git/git/blob/v2.4.6/Documentation/SubmittingPatches#L234-L286
> 
> Thanks, I'll amend it accordingly.  I originally mentioned the
> Fountain site in my rough draft of the commit message, but then
> removed it again after reading more of the patch submitting
> documentation and not spotting the nuance about when is and isn't a
> good time to include URLs.  No bother, I managed the commit message in
> another repo... :D  I'll bring it back and tidy it up a bit, then sign
> it off.

Thank you!
Dscho

```
