git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Christian Couder <christian.couder@gmail.com>
Cc: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>,
	Jeff King <peff@peff.net>, git <git@vger.kernel.org>,
	Christian Couder <chriscool@tuxfamily.org>
Subject: Re: Git in Outreachy?
Date: Wed, 16 Sep 2020 22:27:40 +0200 (CEST)	[thread overview]
Message-ID: <nycvar.QRO.7.76.6.2009162206580.56@tvgsbejvaqbjf.bet> (raw)
In-Reply-To: <CAP8UFD0_75zR3xoBzbVZjgTY2+KvORLFNMZ36s8+m6KZyNTXPg@mail.gmail.com>

Hi Christian,

On Wed, 16 Sep 2020, Christian Couder wrote:

> On Mon, Sep 7, 2020 at 8:55 PM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
>
> > On Mon, 7 Sep 2020, Kaartic Sivaraam wrote:
> >
> > > On 28-08-2020 12:26, Jeff King wrote:
> > >
> > > > I would appreciate help to find project ideas though. Are there
> > > > still scripts that are worth converting to C (excluding
> > > > git-bisect.sh and git-submodule.sh that are still worked on)?
> > >
> > > I think Dscho's e-mail linked below gives a nice overview of the
> > > various scripts and their likely status as of Jan2020:
> > >
> > > https://lore.kernel.org/git/nycvar.QRO.7.76.6.2001301154170.46@tvgsbejvaqbjf.bet/
> > >
> > > I'm guessing only the status of submodule has changed as it's being
> > > worked on now.
> >
> > No, not quite. The `git-merge-*.sh` ones I called "trivial" are already
> > being worked on by Alban Gruin:
> > https://lore.kernel.org/git/20200901105705.6059-1-alban.gruin@gmail.com/
> >
> > And `git-legacy-stash.sh` is no more, as of v2.27.0~180^2.
> >
> > But yes, other than that, my summary still holds.
>
> To summarize more, it seems to me that only the following scripts
> could be worth converting:
>
> git-difftool--helper.sh
> git-mergetool--lib.sh
> git-mergetool.sh
>
> I wonder if they are really worth converting though, as they should
> probably all be converted together and we would likely also need to
> convert the scripts in mergetools/ at the same time. And then there
> should be a way to still easily configure things for users. So perhaps
> a better way to approach this would be first to convert the scripts in
> mergetools/ into config files.

The biggest problem is that they're all entangled.
`git-difftool--helper.sh` sources `git-mergetool--lib.sh` and uses quite a
bit of its machinery.

As to converting the scripts to config files, I'd rather have them
hard-coded in the source code. Something along those lines:

struct mergetool {
	const char *can_merge;
	const char *can_diff;
	const char *diff_cmd
	const char *merge_cmd;
	const char *translate_merge_tool_path;
	const char *list_tool_variants;
	const char *exit_code_trustable;
} araxis = {
	.diff_cmd = "\"$merge_tool_path"\ -wait -2 \"$LOCAL\" \"$REMOTE\" >/dev/null 2>&1",
	.merge_cmd = "if $base_present\n"
		"then\n"
		" \"$merge_tool_path\" -wait -merge -3 -a1"
		"  \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" >/dev/null 2>&1\n"
		"else\n"
                " \"$merge_tool_path\" -wait -2"
		"  \"$LOCAL\" \"$REMOTE\" \"$MERGED\" >/dev/null 2>&1\n"
		"fi",
	.translate_merge_tool_path = "echo compare"
}, [...]

I would then probably try to implement the bare minimum for the
`difftool--helper` command to work (re-implementing in C only the parts of
`mergetool--lib` that are necessary), and only in a next patch series work
on `mergetool`.

Ciao,
Dscho

  reply	other threads:[~2020-09-16 20:28 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28  6:56 Jeff King
2020-08-31  6:55 ` Christian Couder
2020-09-03  6:00   ` Jonathan Nieder
2020-09-04 14:14     ` Philip Oakley
2020-09-07 18:49       ` Johannes Schindelin
2020-09-16 15:16         ` Philip Oakley
2020-09-16 18:43           ` Johannes Schindelin
2020-09-17 14:42             ` Philip Oakley
2020-09-09 18:26     ` Taylor Blau
2020-09-10  1:39       ` Jonathan Nieder
2020-09-10  2:19         ` Taylor Blau
2020-09-16  9:12     ` Christian Couder
2020-09-16  6:42   ` Christian Couder
2020-08-31 17:41 ` Junio C Hamano
2020-08-31 18:05 ` Emily Shaffer
2020-09-01 12:51   ` Jeff King
2020-09-03  5:41     ` Jeff King
2020-09-15 17:35       ` Jeff King
2020-09-15 17:55         ` Kaartic Sivaraam
2020-09-15 18:02           ` Jeff King
2020-09-19  8:12         ` Christian Couder
2020-09-19 15:10           ` Phillip Wood
2020-09-16  8:45     ` Christian Couder
2020-09-02  4:00 ` Johannes Schindelin
2020-09-16  9:01   ` Christian Couder
2020-09-16  9:45     ` Phillip Wood
2020-09-17  9:43     ` Christian Couder
2020-09-17 10:14       ` Phillip Wood
2020-09-18  8:37         ` Christian Couder
2020-09-17 15:34       ` Elijah Newren
2020-09-18  8:42         ` Christian Couder
2020-09-27 16:59     ` Kaartic Sivaraam
2020-09-27 21:16       ` Christian Couder
2020-10-29 10:13         ` Christian Couder
2020-09-06 18:56 ` Kaartic Sivaraam
2020-09-07 18:55   ` Johannes Schindelin
2020-09-16  9:35     ` Christian Couder
2020-09-16 20:27       ` Johannes Schindelin [this message]
2020-09-19  7:40         ` Christian Couder
2020-09-20 15:06           ` Johannes Schindelin
2020-09-20 16:31   ` Kaartic Sivaraam
2020-09-21  4:22     ` Christian Couder
2020-09-21  7:59       ` Kaartic Sivaraam
2020-09-21 20:56       ` Shourya Shukla

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=nycvar.QRO.7.76.6.2009162206580.56@tvgsbejvaqbjf.bet \
    --to=johannes.schindelin@gmx.de \
    --cc=chriscool@tuxfamily.org \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kaartic.sivaraam@gmail.com \
    --cc=peff@peff.net \
    --subject='Re: Git in Outreachy?' \
    /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

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git