Re: [PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

5 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

From: Petr Baudis <hidden>
Date: 2016-06-15 22:41:59

Dear diary, on Tue, Jun 07, 2005 at 11:59:36AM CEST, I got a letter
where Jon Seymour [off-list ref] told me that...
On 6/7/05, Petr Baudis [off-list ref] wrote:
quoted
I'd prefer just --wrt-author and --exclude-author to take an argument on
their own.
The reason I don't want to do this is that it doesn't really make
sense in the context of the change to specify one author for
--wrt-author and another for --exclude-author. In normal use --author
defaults to GIT_AUTHOR_EMAIL or the locally derived user@host.domain.
The  intention is simply to override this default derivation.
Hmm, then why not make it --wrt-author[=AUTHOR] ? Similar to the
--pretty option. BTW, can it do multiple author excludes now? The
commandline would look especially horrifying in that case now, I guess.

I'd prefer --stop-at-author from the choices you offer in your other
mail.
quoted
(Note that I don't endorse this patch and the --wrt-author behaviour in
particular seems strange. I don't have enough time to comment on it
sensibly now, though. I'm just focusing on style here since I'd like to
still be able to read git's source code few weeks from now on.)
The rationale for the change is as follows:

During parallel development, one is aware of ones own
changes...everyone else changes haven't happened yet as far as you are
concerned. Only when they appear in a future merge that incorporates
one's own changes do the other changes appear in your own workspace.

As far as you are concerned, these changes occurred after you made
your own - your changes were not dependent on those changes, only on
those that came before. So the linearisation reflects that perceived
ordering of changes.

--wrt-author helps to reconstruct the merge-history from the
perspective of each individual committer.
Yes, such motivation makes sense. But is the author field the right one?
If you are integrating a lot of other people's patches in particular, I
think it makes no sense whatsoever - you already reviewed and
consciously applied them, but your option will regard them as something
alien and merged from outside, right?

And, after all, the other branches might be _quite_ long-lived. I think
it would be confusing for the user if the commit graph looked like

  a1 -- a2 -- a3 -- a4 -- a5 -- a6 -- a7 -- a8 -- a9 -- a10
     \           /           /     \                 /
      - b1 -- b2 -- b3 -- b4 -- b5 -- b6 -- b7 -- b8 -- b9

If your patch first chooses b1, it then shows all of it, completely
ignoring a2, right? I can't see how that would be right - the subsequent
merges from a should be shown.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor

Re: [PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

From: Jon Seymour <hidden>
Date: 2016-06-15 22:41:59

On 6/8/05, Petr Baudis [off-list ref] wrote:
Dear diary, on Tue, Jun 07, 2005 at 11:59:36AM CEST, I got a letter
where Jon Seymour [off-list ref] told me that...
quoted
On 6/7/05, Petr Baudis [off-list ref] wrote:
quoted
I'd prefer just --wrt-author and --exclude-author to take an argument on
their own.
The reason I don't want to do this is that it doesn't really make
sense in the context of the change to specify one author for
--wrt-author and another for --exclude-author. In normal use --author
defaults to GIT_AUTHOR_EMAIL or the locally derived user@host.domain.
The  intention is simply to override this default derivation.
Hmm, then why not make it --wrt-author[=AUTHOR] ? Similar to the
--pretty option. BTW, can it do multiple author excludes now? The
commandline would look especially horrifying in that case now, I guess.
No, it doesn't. I can see a use for multiple ^ arguments, but the use
case for multiple --stop-at-author arguments doesn't strike me as
being particularly useful. Multiple ^'s helps you prune the graph at
places you already know about --stop-at-author allows you to prune the
tree with respect to one author. It is particularly useful if you are
the author concerned because you have some recollection of being of
what you did last. I am not sure it is that useful to prune the tree
with respect to multiple authors - the results would be somewhat
unpredictable, I would think.
I'd prefer --stop-at-author from the choices you offer in your other
mail.
Ok, unless I Linus or the list disagree I will modify my patch to be
--stop-at-author.
quoted
quoted
(Note that I don't endorse this patch and the --wrt-author behaviour in
particular seems strange. I don't have enough time to comment on it
sensibly now, though. I'm just focusing on style here since I'd like to
still be able to read git's source code few weeks from now on.)
The rationale for the change is as follows:

During parallel development, one is aware of ones own
changes...everyone else changes haven't happened yet as far as you are
concerned. Only when they appear in a future merge that incorporates
one's own changes do the other changes appear in your own workspace.

As far as you are concerned, these changes occurred after you made
your own - your changes were not dependent on those changes, only on
those that came before. So the linearisation reflects that perceived
ordering of changes.

--wrt-author helps to reconstruct the merge-history from the
perspective of each individual committer.
Yes, such motivation makes sense. But is the author field the right one?
If you are integrating a lot of other people's patches in particular, I
think it makes no sense whatsoever - you already reviewed and
consciously applied them, but your option will regard them as something
alien and merged from outside, right?

And, after all, the other branches might be _quite_ long-lived. I think
it would be confusing for the user if the commit graph looked like

  a1 -- a2 -- a3 -- a4 -- a5 -- a6 -- a7 -- a8 -- a9 -- a10
     \           /           /     \                 /
      - b1 -- b2 -- b3 -- b4 -- b5 -- b6 -- b7 -- b8 -- b9

If your patch first chooses b1, it then shows all of it, completely
ignoring a2, right? I can't see how that would be right - the subsequent
merges from a should be shown.
No, that's not the intent of --wrt-author when specified without
--stop-at-author.

--wrt-author doesn't cause any commits to be ignored ... it simply
changes the order
in which they are displayed by altering the order in which parents are visited.

I'll get it wrong if I do it by hand so I'll create a test case and
show you what the default merge order would be, the --wrt-author
--author=a and the --wrt-author --author=b cases.

Stay tuned...

jon.

Re: [PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

From: Jon Seymour <hidden>
Date: 2016-06-15 22:41:59

Ok, this is how --wrt-author sorts your example:

(Original example transposed so that variable width fonts don't play
havoc with the layout)

a10 b9
| \  |
a9  b8
|    |
a8  b7
|    | 
a7  b6
| /  |
a6  b5
| \  |
a5  b4
|    |
a4  b3
| \  |
a3  b2
|    |
a2  b1
| /
a1

with respect to a and b respectively

A         B

| b9      | b9
^ a10     ^ a10
| b8      | a9
| b7      | a8          
| b6      | a7
| b5      ^ b8
^ a9      | b7
| a8      | b6
| a7      | a6
| a6      | a5
| b4      | a4
| b3      | a3
^ a5      | a2
| a4      ^ b5
| b2      | b4
| b1      | b3
^ a3      | b2
| a2      | b1
= a1      = a1

In otherwords, B doesn't see any of A's changes after a1 until b6,
whereas A sees some of B's changes at a4 and some at a6, then not
again until a10.

jon.

Re: [PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

From: Jon Seymour <hidden>
Date: 2016-06-15 22:41:59

Pasky,

Hey, I was thinking, instead of stop-at-author, how about we call it
prune-at-author instead?

Regards,

jon.

[WITHDRAW PATCH] Add support for --wrt-author, --author and --exclude-author switches to git-rev-list

From: Jon Seymour <hidden>
Date: 2016-06-15 22:41:59

G'day Linus,

I'd like to  withdraw this patch until the --merge-order bug fix of my
earlier post is applied. The patch as it stands won't operate
correctly once that fix is applied, so I'll have to modify it. Also, I
want to rename the --exclude-author switch to --prune-at-author.

Regards,

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