git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] ? - git log :/text results are strange
@ 2010-02-19 21:50 Eugene Sajine
  2010-02-19 22:34 ` Thomas Rast
  0 siblings, 1 reply; 4+ messages in thread
From: Eugene Sajine @ 2010-02-19 21:50 UTC (permalink / raw)
  To: git; +Cc: Eugene Sajine

Hi,


When I’m executing
$ git log :/fix

I expect to see commits with messages starting from word “fix” only
in git.git I’m getting a list of commits where some of messages are
starting from this word and some are not

as this:

$ git log :/fix

commit a525d2a41825530c01fd5eac497df0fcd82dca0b
Author: Junio C Hamano <gitster@pobox.com>
Date:   Tue Dec 8 22:16:55 2009 -0800

   fixup! rebase -i --autosquash

commit 66a357d9bac24cc9b8419c256b5e35c327d2997c
Author: Nanako Shiraishi <nanako3@lavabit.com>
Date:   Tue Dec 8 12:13:14 2009 +0900

   rebase -i --autosquash: auto-squash commits

   Teach a new option, --autosquash, to the interactive rebase.
   When the commit log message begins with "!fixup ...", and there
   is a commit whose title begins with the same ..., automatically
   modify the todo list of rebase -i so that the commit marked for
   squashing come right after the commit to be modified, and change
   the action of the moved commit from pick to squash.

   Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
   Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit 0205e72f088322a70a77643a7cd2d8b23ee07e14
Author: Michael Haggerty <mhagger@alum.mit.edu>
Date:   Mon Dec 7 10:20:59 2009 +0100

   Add a command "fixup" to rebase --interactive

   The command is like "squash", except that it discards the commit message
   of the corresponding commit.

   Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
   Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
   Signed-off-by: Junio C Hamano <gitster@pobox.com>

commit 163f3925902446735b2f631dc44ab67882a93024
Author: Michael Haggerty <mhagger@alum.mit.edu>
Date:   Mon Dec 7 05:22:58 2009 +0100

   t3404: Use test_commit to set up test repository

   Also adjust "expected" text to reflect the file contents generated by
   test_commit, which are slightly different than those generated by the
   old code.

   Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
   Signed-off-by: Junio C Hamano gitster@pobox.com

And so on…

This is reproducible problem on Linux env git v 1.6.5.6 and in msysgit
1.6.4.msysgit.0

Thanks,
Eugene

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

* Re: [BUG] ? - git log :/text results are strange
  2010-02-19 21:50 [BUG] ? - git log :/text results are strange Eugene Sajine
@ 2010-02-19 22:34 ` Thomas Rast
  2010-02-19 23:41   ` Eugene Sajine
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Rast @ 2010-02-19 22:34 UTC (permalink / raw)
  To: Eugene Sajine; +Cc: git

On Friday 19 February 2010 22:50:39 Eugene Sajine wrote:
> When I’m executing
> $ git log :/fix
> 
> I expect to see commits with messages starting from word “fix” only

You're not putting the puzzle together in the right way.  The chain
goes roughly like this:

* git-log wants to know what its arguments resolve to

  * (the internal equivalent of) git-rev-parse works out that :/fix is
    a525d2a, as it (apparently) is the youngest commit with a message
    starting with 'fix' (see man git-rev-parse)

* git-log feeds a525d2a to the revision walker

  * the revision walker starts outputting commits backwards through
    history, starting from a525d2a

and unsurprisingly, the log you pasted is just 'git log a525d2a'.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

* Re: [BUG] ? - git log :/text results are strange
  2010-02-19 22:34 ` Thomas Rast
@ 2010-02-19 23:41   ` Eugene Sajine
  2010-02-19 23:45     ` Thomas Rast
  0 siblings, 1 reply; 4+ messages in thread
From: Eugene Sajine @ 2010-02-19 23:41 UTC (permalink / raw)
  To: Thomas Rast, git

oh. I see, thanks!

I had to do

$git log --pretty=oneline | grep fix

to get what i wanted...

On Fri, Feb 19, 2010 at 5:34 PM, Thomas Rast <trast@student.ethz.ch> wrote:
> On Friday 19 February 2010 22:50:39 Eugene Sajine wrote:
>> When I’m executing
>> $ git log :/fix
>>
>> I expect to see commits with messages starting from word “fix” only
>
> You're not putting the puzzle together in the right way.  The chain
> goes roughly like this:
>
> * git-log wants to know what its arguments resolve to
>
>  * (the internal equivalent of) git-rev-parse works out that :/fix is
>    a525d2a, as it (apparently) is the youngest commit with a message
>    starting with 'fix' (see man git-rev-parse)
>
> * git-log feeds a525d2a to the revision walker
>
>  * the revision walker starts outputting commits backwards through
>    history, starting from a525d2a
>
> and unsurprisingly, the log you pasted is just 'git log a525d2a'.
>
> --
> Thomas Rast
> trast@{inf,student}.ethz.ch
>

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

* Re: [BUG] ? - git log :/text results are strange
  2010-02-19 23:41   ` Eugene Sajine
@ 2010-02-19 23:45     ` Thomas Rast
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Rast @ 2010-02-19 23:45 UTC (permalink / raw)
  To: Eugene Sajine; +Cc: git

On Saturday 20 February 2010 00:41:32 Eugene Sajine wrote:
> oh. I see, thanks!
> 
> I had to do
> 
> $git log --pretty=oneline | grep fix
> 
> to get what i wanted...

Well, you can also do

  git log --grep=fix --pretty=oneline

Sorry for not mentioning that in my first reply...

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

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

end of thread, other threads:[~2010-02-19 23:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-19 21:50 [BUG] ? - git log :/text results are strange Eugene Sajine
2010-02-19 22:34 ` Thomas Rast
2010-02-19 23:41   ` Eugene Sajine
2010-02-19 23:45     ` Thomas Rast

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).