[BUG] ? - git log :/text results are strange

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

[BUG] ? - git log :/text results are strange

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:48:18

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 [off-list ref]
Date:   Tue Dec 8 22:16:55 2009 -0800

   fixup! rebase -i --autosquash

commit 66a357d9bac24cc9b8419c256b5e35c327d2997c
Author: Nanako Shiraishi [off-list ref]
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 [off-list ref]
   Signed-off-by: Junio C Hamano [off-list ref]

commit 0205e72f088322a70a77643a7cd2d8b23ee07e14
Author: Michael Haggerty [off-list ref]
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 [off-list ref]
   Acked-by: Johannes Schindelin [off-list ref]
   Signed-off-by: Junio C Hamano [off-list ref]

commit 163f3925902446735b2f631dc44ab67882a93024
Author: Michael Haggerty [off-list ref]
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 [off-list ref]
   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

Re: [BUG] ? - git log :/text results are strange

From: Thomas Rast <hidden>
Date: 2016-06-15 22:48:18

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

Re: [BUG] ? - git log :/text results are strange

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:48:19

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 [off-list ref] wrote:
On Friday 19 February 2010 22:50:39 Eugene Sajine wrote:
quoted
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

Re: [BUG] ? - git log :/text results are strange

From: Thomas Rast <hidden>
Date: 2016-06-15 22:48:19

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help