Skip to contentSkip to conversation

"gitk --author=foo" shows also parent

DISCUSSION Nikolai Kosjar 3 participants 4 messages Jun 16, 2016

lore
Share & tools
lore
#0 lore raw

Hi!

	$ gitk --author=foo

...seems to show also the parent of each author-matched commit, whereas

	$ git log --author=foo

does not. Is this intended or a bug? I've stumbled over this while configuring a gitk view with the author field.

Nikolai

# Setup
~/work/gitkBug % git init .
~/work/gitkBug % touch file1 file2
~/work/gitkBug % git add file1
~/work/gitkBug % git commit "--author=MrFoo <foo@world>" file1 -m "add file1" ~/work/gitkBug % git add file2
~/work/gitkBug % git commit "--author=MrBar <bar@world>" file2 -m "add file2"

# TEST: git log --author - OK
~/work/gitkBug % git log --author=MrBar # OK, as expected commit 8aa4a4f651162bcb2275a1e9ee23fc1bb7226097

Author: MrBar <bar@world>
Date:   Tue Apr 26 14:22:58 2016 +0200

add file2

# TEST: gitk --author - OPS
~/work/gitkBug % gitk --author=MrBar # Ops, gitk shows also the parent commit

#1 lore raw
Quoted 10 lines · Nikolai Kosjar

Hi!

        $ gitk --author=foo

...seems to show also the parent of each author-matched commit, whereas

        $ git log --author=foo

does not. Is this intended or a bug? I've stumbled over this while configuring a gitk view with the author field.

I believe that this is intentional. Notice that the parent commit's circle is just outlined
compared to the selected authored commits are filled. I consider this the context
of the commits you are looking at.

Quoted 34 lines

Nikolai

# Setup
~/work/gitkBug % git init .
~/work/gitkBug % touch file1 file2
~/work/gitkBug % git add file1
~/work/gitkBug % git commit "--author=MrFoo <foo@world>" file1 -m "add file1"
~/work/gitkBug % git add file2
~/work/gitkBug % git commit "--author=MrBar <bar@world>" file2 -m "add file2"

# TEST: git log --author - OK
~/work/gitkBug % git log --author=MrBar # OK, as expected commit 8aa4a4f651162bcb2275a1e9ee23fc1bb7226097

Author: MrBar <bar@world>
Date:   Tue Apr 26 14:22:58 2016 +0200

add file2

# TEST: gitk --author - OPS
~/work/gitkBug % gitk --author=MrBar # Ops, gitk shows also the parent commit

--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 9 lines · Mike Rappazzo
Quoted 8 lines · Nikolai Kosjar

Hi!

         $ gitk --author=foo

...seems to show also the parent of each author-matched commit, whereas

         $ git log --author=foo
Quoted 8 lines
Quoted 2 lines

does not. Is this intended or a bug? I've stumbled over this while configuring a gitk view with the author field.

I believe that this is intentional. Notice that the parent commit's circle is just outlined
compared to the selected authored commits are filled. I consider this the context
of the commits you are looking at.

Hmm, then I'm not interested in the context since it's too noisy. Is there any way to suppress this?

Nikolai

#3 lore raw
Quoted 8 lines · Nikolai Kosjar
Quoted 5 lines

I believe that this is intentional. Notice that the parent commit's circle is just outlined
compared to the selected authored commits are filled. I consider this the context
of the commits you are looking at.

Hmm, then I'm not interested in the context since it's too noisy. Is there any way to suppress this?

I am not a gitk user, but AFAIK, no. Gitk uses "--boundary" to ask git for the bottom boundary of each string of commits. There is unfortunately no "--no-boundary" option to override this (and I just tried adding one, and it doesn't seem to work; gitk is perhaps too aggressive in the way it passes along --boundary).

So I think it would require a patch to gitk.

-Peff