Re: Rebase options via git pull

2 messages, 2 authors, 2021-05-17 · open the first message on its own page

Re: Rebase options via git pull

From: Sergey Organov <hidden>
Date: 2021-05-17 12:59:54

Đoàn Trần Công Danh [off-list ref] writes:
On 2021-05-17 15:33:18+0300, Sergey Organov [off-list ref] wrote:
quoted
quoted
quoted
Probably add generic cmd.<cmd>.opts config support, so that I can say:

  git -c cmd.rebase.opts="--no-fork-point --empty=keep" pull --rebase

Thoughts?
It's been discussed before (but I did not dig up the discussions,
sorry). It's been considered a bad idea, because our commands are a
mixture of plumbing/porcelain commands and switches, so we want to be
able to reliably invoke say ls-tree with some switches internally,
without config tripping us up.

Of course we could make this sort of thing work by selectively ignoring
the config, but such a thing would be equal in complexity to the effort
of assering that it's safe to introduce new rebase.* config in the
codebase for every switch it has now, but with a less friendly interface
both for git itself and users.
I don't see much complexity here. We'd then just need to effectively
invoke ls-tree internally like this:

   git -c 'cmd.ls-tree.opts=' ls-tree

Not a big deal.
It's a big deal.

Scripts was written with plumbing command and expect stable output.
If such change can be accepted, a lot of scripts will begin to fail.
Makes sense. Then simply don't do it for plumbing?

Thanks,
-- Sergey Organov

Re: Rebase options via git pull

From: Đoàn Trần Công Danh <hidden>
Date: 2021-05-17 16:15:46

On 2021-05-17 15:59:49+0300, Sergey Organov [off-list ref] wrote:
Đoàn Trần Công Danh [off-list ref] writes:
quoted
On 2021-05-17 15:33:18+0300, Sergey Organov [off-list ref] wrote:
quoted
quoted
quoted
Probably add generic cmd.<cmd>.opts config support, so that I can say:

  git -c cmd.rebase.opts="--no-fork-point --empty=keep" pull --rebase

Thoughts?
It's been discussed before (but I did not dig up the discussions,
sorry). It's been considered a bad idea, because our commands are a
mixture of plumbing/porcelain commands and switches, so we want to be
able to reliably invoke say ls-tree with some switches internally,
without config tripping us up.

Of course we could make this sort of thing work by selectively ignoring
the config, but such a thing would be equal in complexity to the effort
of assering that it's safe to introduce new rebase.* config in the
codebase for every switch it has now, but with a less friendly interface
both for git itself and users.
I don't see much complexity here. We'd then just need to effectively
invoke ls-tree internally like this:

   git -c 'cmd.ls-tree.opts=' ls-tree

Not a big deal.
It's a big deal.

Scripts was written with plumbing command and expect stable output.
If such change can be accepted, a lot of scripts will begin to fail.
Makes sense. Then simply don't do it for plumbing?
Then, we will get back to the state Ævar pointed out.

Quoted again:
quoted
quoted
quoted
Of course we could make this sort of thing work by selectively ignoring
the config, but such a thing would be equal in complexity to the effort
of assering that it's safe to introduce new rebase.* config in the
codebase for every switch it has now, but with a less friendly interface
both for git itself and users.
Anyway, it's not only plumbing command, it's also semi-plumbing
commands (the ones accept --porcelain option) like:

	git status --porcelain[=<version>]

-- 
Danh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help