git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j6t@kdbg.org>
To: Glen Choo <chooglen@google.com>
Cc: xing zhi jiang <a97410985new@gmail.com>, git@vger.kernel.org
Subject: Re: [GSoC][PATCH v2] Add a diff driver for JavaScript languages.
Date: Tue, 15 Mar 2022 08:40:24 +0100	[thread overview]
Message-ID: <d8783660-1487-1899-19bf-10654801ea0a@kdbg.org> (raw)
In-Reply-To: <kl6lwngwqwm2.fsf@chooglen-macbookpro.roam.corp.google.com>

Am 14.03.22 um 18:20 schrieb Glen Choo:
> xing zhi jiang <a97410985new@gmail.com> writes:
>> diff --git a/t/t4018/javascript-exports-function b/t/t4018/javascript-exports-function
>> new file mode 100644
>> index 0000000000..63b79f5991
>> --- /dev/null
>> +++ b/t/t4018/javascript-exports-function
>> @@ -0,0 +1,4 @@
>> +exports.RIGHT = function(document) {
>> +    
>> +    return ChangeMe;
>> +}
> 
> I don't think we should include 'exports.foo = bar'. To my knowledge,
> this is _not_ a standard ES feature, but rather the CommonJS module
> system popularized by Node.js [1] and other frameworks. To confirm this,
> I searched the ES spec and did not find any reference to exports.* [2].
> 
> Even if we wanted to support nonstandard 'language features' (and this
> label is tenuous at best, CommonJS is not trying to replace the ES
> modules standard AFAIK), Node.js is also starting to support ES modules,
> so I don't think this is a good long term direction for Git.

It is not a priority to model hunk header regular expressions after some
standard and to ignore stuff that is outside the standard. The goal is
to make them useful in a majority of cases. If there exists a noticable
chunk of code that uses non-standard constructs, then that is worth
being supported.

> 
> [1] https://nodejs.org/api/modules.html
> [2] https://262.ecma-international.org/12.0/#sec-exports

-- Hannes

  reply	other threads:[~2022-03-15  7:40 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 13:08 [GSoC][PATCH 0/1] userdiff: add buildin diff driver for JavaScript language xing zhi jiang
2022-03-04 13:08 ` [GSoC][PATCH 1/1] Add a diff driver for JavaScript languages xing zhi jiang
2022-03-05 10:16   ` Johannes Sixt
2022-03-07 15:10     ` xing-zhi jiang
2022-03-08  6:46       ` Johannes Sixt
2022-03-12 16:59         ` xing zhi jiang
2022-03-05 13:41 ` [GSoC][PATCH 0/1] userdiff: add buildin diff driver for JavaScript language Johannes Sixt
2022-03-12 16:48 ` [GSoC][PATCH v2] Add a diff driver for JavaScript languages xing zhi jiang
2022-03-13 21:54   ` Johannes Sixt
2022-04-03 13:17     ` xing zhi jiang
2022-03-14 17:20   ` Glen Choo
2022-03-15  7:40     ` Johannes Sixt [this message]
2022-03-15 18:51       ` Glen Choo
2022-03-15 19:22         ` Junio C Hamano
2022-03-15 21:34           ` Glen Choo
2022-04-03 13:24             ` xing zhi jiang
2022-04-03 13:20         ` xing zhi jiang
2022-04-03 13:21     ` xing zhi jiang
2022-04-03 13:25 ` [GSoC][PATCH v3] " xing zhi jiang
2022-04-03 14:40   ` Johannes Sixt
2022-04-04  7:12   ` Ævar Arnfjörð Bjarmason
2022-04-04 20:29     ` Johannes Sixt
2022-04-04 21:44       ` Junio C Hamano
2022-04-05  2:22       ` Ævar Arnfjörð Bjarmason
2022-04-04 17:32   ` Glen Choo

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

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

  git send-email \
    --in-reply-to=d8783660-1487-1899-19bf-10654801ea0a@kdbg.org \
    --to=j6t@kdbg.org \
    --cc=a97410985new@gmail.com \
    --cc=chooglen@google.com \
    --cc=git@vger.kernel.org \
    /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.
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).