Re: [git-users] how to --since and --until get the expected git log

2015-04-20 Thread Konstantin Khomoutov
On Mon, 20 Apr 2015 15:37:22 +0800
lei yang  wrote:

> lyang001@lyang001-OptiPlex-9010:~/stats/gitstats$ git log
> --pretty=format:'%ad %an' --date=short --since='2013-1-25'
> --until='2013-11-03'
> 2013-09-22 Alexander Strasser
> 2013-07-29 Heikki Hokkanen
> 2012-12-16 Andrey Devyatkin
> 2013-07-26 Heikki Hokkanen
> 2013-07-23 Heikki Hokkanen
> 2013-07-23 Stephen Gordon
> 2012-08-26 Sven van Haastregt-> this is not what I
> wanted 2013-02-24 Heikki Hokkanen
> 2013-02-24 Heikki Hokkanen
> 2013-01-28 Ernesto Jiménez
> 
> But I want to get the time only between '2013-1-25'  and
> '2013-11-03', Is there a general way to remove them since I have may
> of this kind of unexpected results

--since and --until check their arguments against "commit date" while
the format string you're passing to --pretty displays the "author date".
These two are different, because a commit might have both the author
and committer.  In the supposedly most common case, when you run
`git commit` in your local repository to to commit the changes you've
prepared and staged manually, the committer and the author are the
same, and the dates are the same, too.  But they do not have to be the
same: the classic case when they're not is applying a patch / patch
series prepared by, say, `git format-patch`.  Cherry-picking is another
example.  In these cases, the author is whoever actually provided the
piece of code (authored it) and the committer is whoever applied
(integrated) the work of the author.

I'd recommend you to get the SHA-1 name of that commit (add %h to your
format string) and then run `git show` on that name to see what are the
headers in that commit.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[git-users] how to --since and --until get the expected git log

2015-04-20 Thread lei yang
lyang001@lyang001-OptiPlex-9010:~/stats/gitstats$ git log
--pretty=format:'%ad %an' --date=short --since='2013-1-25'
--until='2013-11-03'
2013-09-22 Alexander Strasser
2013-07-29 Heikki Hokkanen
2012-12-16 Andrey Devyatkin
2013-07-26 Heikki Hokkanen
2013-07-23 Heikki Hokkanen
2013-07-23 Stephen Gordon
2012-08-26 Sven van Haastregt-> this is not what I wanted
2013-02-24 Heikki Hokkanen
2013-02-24 Heikki Hokkanen
2013-01-28 Ernesto Jiménez



But I want to get the time only between '2013-1-25'  and '2013-11-03', Is
there a general way to remove them since I have may of this kind of
unexpected results

Lei

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.