git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* configure remote/local as mine/theirs
@ 2020-04-11 12:51 rupert THURNER
  2020-04-11 21:40 ` Johannes Sixt
  0 siblings, 1 reply; 4+ messages in thread
From: rupert THURNER @ 2020-04-11 12:51 UTC (permalink / raw)
  To: git

hi,

the git documentation is so clear withcalling changes "mine" or
"theirs". when configuring a mergetool e.g. kdiff3, and doing a
rebase, these names are not used. instead it is "local", which
is theirs in the rebase case, and remote, which is mine. not
that this is rocket science, and i understand the technical
reason why the names are like this. but anyway i get a nod in
my brain about it sometimes. can i somehow configure git so it
would use "mine" and "theirs" only?

rupert

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure remote/local as mine/theirs
  2020-04-11 12:51 configure remote/local as mine/theirs rupert THURNER
@ 2020-04-11 21:40 ` Johannes Sixt
  2020-04-12 10:12   ` Philip Oakley
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2020-04-11 21:40 UTC (permalink / raw)
  To: rupert THURNER; +Cc: Git Mailing List

Am 11.04.20 um 14:51 schrieb rupert THURNER:
> the git documentation is so clear withcalling changes "mine" or
> "theirs". when configuring a mergetool e.g. kdiff3, and doing a
> rebase, these names are not used. instead it is "local", which
> is theirs in the rebase case, and remote, which is mine. not
> that this is rocket science, and i understand the technical
> reason why the names are like this. but anyway i get a nod in
> my brain about it sometimes. can i somehow configure git so it
> would use "mine" and "theirs" only?

The words "mine" (actually "ours") and "theirs" have a very precise
meaning in Git. If you were to use these meanings during a rebase, you
would not like the result: it would call "ours" what you intend to call
"theirs", and vice versa.

Consider this history:


--a--b--c--d   <-- upstream ("theirs" from your point of view)
   \
    x--y--z    <-- branch to rebase ("mine/ours" from your POV)

During a rebase, Git is "positioned" on the history following commit d,
i.e. on "their" branch. Then it cherry-picks commits x, y, and z. In
that situation, the change that you consider "theirs" is actually "ours"
from Git's point of view, and your own change (those introduced by x, y,
and z) are "theirs" from Git's point of view.

I suggest you live with "local" and "remote" for a bit less confusion.

-- Hannes

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure remote/local as mine/theirs
  2020-04-11 21:40 ` Johannes Sixt
@ 2020-04-12 10:12   ` Philip Oakley
  2020-04-13 10:53     ` rupert THURNER
  0 siblings, 1 reply; 4+ messages in thread
From: Philip Oakley @ 2020-04-12 10:12 UTC (permalink / raw)
  To: Johannes Sixt, rupert THURNER; +Cc: Git Mailing List

Hi Robert, Johannes

On 11/04/2020 22:40, Johannes Sixt wrote:
> Am 11.04.20 um 14:51 schrieb rupert THURNER:
>> the git documentation is so clear withcalling changes "mine" or
>> "theirs". when configuring a mergetool e.g. kdiff3, and doing a
>> rebase, these names are not used. instead it is "local", which
>> is theirs in the rebase case, and remote, which is mine. not
>> that this is rocket science, and i understand the technical
>> reason why the names are like this. but anyway i get a nod in
>> my brain about it sometimes. can i somehow configure git so it
>> would use "mine" and "theirs" only?
> The words "mine" (actually "ours") and "theirs" have a very precise
> meaning in Git. If you were to use these meanings during a rebase, you
> would not like the result: it would call "ours" what you intend to call
> "theirs", and vice versa.
>
> Consider this history:
>
>
> --a--b--c--d   <-- upstream ("theirs" from your point of view)
>    \
>     x--y--z    <-- branch to rebase ("mine/ours" from your POV)
>
> During a rebase, Git is "positioned" on the history following commit d,
> i.e. on "their" branch. Then it cherry-picks commits x, y, and z. In
> that situation, the change that you consider "theirs" is actually "ours"
> from Git's point of view, and your own change (those introduced by x, y,
> and z) are "theirs" from Git's point of view.
>
> I suggest you live with "local" and "remote" for a bit less confusion.
Robert,
given the way Git is using it's terminology, would you have any
suggestions as to how the man page(s) could now be _clarified_ so as to
avoid these potential misunderstandings? Even perhaps
    "theirs", "ours", "local" and "remote" are distinct terms in Git
with different meanings as detailed in gitreference/glossary.   (or some
such - though 3/4 are not in the glossary!)

I suggest this as a way of flagging to the reader that they should 'stop
and think' (which we never do if we already have the wrong mental model)
and perhaps go and review the distinctions.

--
Philip

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure remote/local as mine/theirs
  2020-04-12 10:12   ` Philip Oakley
@ 2020-04-13 10:53     ` rupert THURNER
  0 siblings, 0 replies; 4+ messages in thread
From: rupert THURNER @ 2020-04-13 10:53 UTC (permalink / raw)
  To: Philip Oakley; +Cc: Johannes Sixt, Git Mailing List

On Sun, Apr 12, 2020 at 12:12 PM Philip Oakley <philipoakley@iee.email> wrote:
> On 11/04/2020 22:40, Johannes Sixt wrote:
> > Am 11.04.20 um 14:51 schrieb rupert THURNER:
> >> my brain about it sometimes. can i somehow configure git so it
> >> would use "mine" and "theirs" only?
> > The words "mine" (actually "ours") and "theirs" have a very precise
> > meaning in Git. If you were to use these meanings during a rebase, you
> > would not like the result: it would call "ours" what you intend to call
> > "theirs", and vice versa.
> >
> > Consider this history:
> >
> >
> > --a--b--c--d   <-- upstream ("theirs" from your point of view)
> >    \
> >     x--y--z    <-- branch to rebase ("mine/ours" from your POV)
> >
> > During a rebase, Git is "positioned" on the history following commit d,
> > i.e. on "their" branch. Then it cherry-picks commits x, y, and z. In
> > that situation, the change that you consider "theirs" is actually "ours"
> > from Git's point of view, and your own change (those introduced by x, y,
> > and z) are "theirs" from Git's point of view.
thank you for the nice explanation! there would be no easy
way to swap the names in the rebase case? or introduce
a new one, "mine"?

> given the way Git is using it's terminology, would you have any
> suggestions as to how the man page(s) could now be _clarified_ so as to
> avoid these potential misunderstandings? Even perhaps
>     "theirs", "ours", "local" and "remote" are distinct terms in Git
> with different meanings as detailed in gitreference/glossary.   (or some
> such - though 3/4 are not in the glossary!)
philip, maybe phrase it as johannes did, add it to the man pages
of rebase, and mergetool? the change you consider "theirs" is
actually "ours", swapped for technical reasons when rebasing.

rupert

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-13 10:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 12:51 configure remote/local as mine/theirs rupert THURNER
2020-04-11 21:40 ` Johannes Sixt
2020-04-12 10:12   ` Philip Oakley
2020-04-13 10:53     ` rupert THURNER

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

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

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 read-only IMAP folder(s) and NNTP newsgroup(s).