* log -S with evil merges
@ 2010-07-10 19:48 Jonathan Nieder
2010-07-12 6:12 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Nieder @ 2010-07-10 19:48 UTC (permalink / raw)
To: git
Hi,
I was interested to know the origin of the UE_ALWAYS et al flags in
builtin/reflog.c, so I asked git:
; git log --oneline -S'UE_ALWAYS' --follow builtin/reflog.c
81b50f3 Move 'builtin-*' into a 'builtin/' subdirectory
4264dc1 git reflog expire
Ok, clearly it was not introduced in the builtin/ move. I guess the
UE_ flags were part of the original ‘reflog’ implementation. Right?
; git show 4264dc1 | grep UE_ALWAYS
; git show 4264dc1:builtin-reflog.c | grep UE_ALWAYS
;
No, that’s not it. At this point I decided -S is broken and just did
a grep through log -p, to find that apparently this symbol was
introduced in builtin-reflog.c with v1.7.2-rc0~122^2 (reflog
--expire-unreachable: special case entries in "HEAD" reflog,
2010-04-09).
So why is log confused? As far as log -S knows, because of the
builtin/ move, commit v1.7.2-rc0~122 was an evil merge that produced
the UE_ flags in builtin/reflog.c out of thin air. It should be
blaming that commit, then. With a little coaxing, it does.
; git log --format=oneline \
--first-parent -m -S'UE_ALWAYS' --follow builtin/reflog.c |
git name-rev --tags --stdin |
cut -d' ' -f2-
(tags/v1.7.2-rc0~122) Merge branch 'jc/maint-no-reflog-expire-unreach-for-head'
(tags/v1.7.1-rc0~76) Merge branch 'lt/deepen-builtin-source'
(tags/v1.5.0-rc1~188) Merge branch 'jc/fsck-reflog'
;
The first is the culprit, the second and third the file’s renaming and
introduction[1].
The more logical
; git log --oneline -c -S'UE_ALWAYS' --follow builtin/reflog.c
does not work --- it mentions _all_ merges. Why?
[1] I don’t know why ‘log -S --follow’ should feel the need to point
these out, but that’s a different story.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: log -S with evil merges
2010-07-10 19:48 log -S with evil merges Jonathan Nieder
@ 2010-07-12 6:12 ` Junio C Hamano
2010-07-12 6:39 ` Jonathan Nieder
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2010-07-12 6:12 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: git
Jonathan Nieder <jrnieder@gmail.com> writes:
> The more logical
>
> ; git log --oneline -c -S'UE_ALWAYS' --follow builtin/reflog.c
>
> does not work --- it mentions _all_ merges. Why?
I don't think --follow, which is merely a checkbox item, is friendly to
most other git features. Does it even show diff with the corresponding
file at the commit where filename is changed?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: log -S with evil merges
2010-07-12 6:12 ` Junio C Hamano
@ 2010-07-12 6:39 ` Jonathan Nieder
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Nieder @ 2010-07-12 6:39 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> ; git log --oneline -c -S'UE_ALWAYS' --follow builtin/reflog.c
>>
>> does not work --- it mentions _all_ merges. Why?
>
> I don't think --follow, which is merely a checkbox item, is friendly to
> most other git features.
Hmm, leaving out the --follow makes it behave again. Thanks for the tip.
> Does it even show diff with the corresponding
> file at the commit where filename is changed?
$ git tag lt/deepen-builtin-source 81b50f3
$ git diff --raw --follow lt/deepen-builtin-source^! -- builtin/reflog.c
:100644 100644 7498210... 7498210... R100 builtin-reflog.c builtin/reflog.c
$ git diff-tree --abbrev -c --follow v1.7.2-rc0~122 -- builtin/reflog.c
a660534e06147f8867d6c9b6c41025427a7b5c6c
::100644 100644 100644 f732156... fafb740... ebf610e... MR builtin/reflog.c
Looks good to me...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-12 6:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 19:48 log -S with evil merges Jonathan Nieder
2010-07-12 6:12 ` Junio C Hamano
2010-07-12 6:39 ` Jonathan Nieder
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 NNTP newsgroup(s).