Comments (6)
The problem is something unexpected from the git rev-list command, but I can't figure out what by cloning the repository what it is.
Can you run this command in your clone and tell me what it outputs:
$ git rev-list --pretty=format:"%at %ai %aN <%aE>" HEAD | grep -v ^commit |egrep -v '^[0-9]{10} [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [+-][0-9]{4} '
For me it outputs only this line, and it shouldn't cause the problem:
1 1970-01-01 01:00:01 +0100 Ursula Braun <[email protected]>
Also, please show me the output of git show-ref HEAD
in your opensuse kernel clone.
from gitstats.
The same occurs with the mainline kernel from git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
The reason seems to be that some of the output lines from git rev-list are not in the expected format:
$ git rev-list --pretty=format:"%at %ai %aN <%aE>" HEAD | grep -v ^commit |egrep -v '^[0-9]{10} [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} [+-][0-9]{4} '
1 1970-01-01 01:00:01 +0100 Ursula Braun <[email protected]>
%aN <%aE>
[...]
That last line ("%aN <%aE>") is repeated 98 times. It seems that for some commits, e.g. febf7ea4bedcd36fba0843db726bba28d22bf89a
, git rev-list doesn't display any author information when using --pretty:format
although when using --pretty:raw
, at least some of the information is there:
commit febf7ea4bedcd36fba0843db726bba28d22bf89a
tree 0a0d398e0637fba8292d8b139afbd41b102bb9c4
parent 00213b17cec87d2cd4df75bcc79aea7a91d8532d
author <[email protected]> 1136284526 +0100
committer <[email protected]> 1136284526 +0100
gitignore: ignore more generated files
Signed-off-by: Sam Ravnborg <[email protected]>
from gitstats.
git 1.8.3.rc2 here, and this is the result:
$ git rev-list --pretty=format:"%at %ai %aN <%aE>" febf7ea4bedcd36fba0843db726bba28d22bf89a |head -n2
commit febf7ea4bedcd36fba0843db726bba28d22bf89a
1136284526 2006-01-03 11:35:26 +0100 Sam Ravnborg <[email protected]>
$ git log -1 febf7ea4bedcd36fba0843db726bba28d22bf89a
commit febf7ea4bedcd36fba0843db726bba28d22bf89a
Author: <[email protected]>
Date: Tue Jan 3 11:35:26 2006 +0100
gitignore: ignore more generated files
Signed-off-by: Sam Ravnborg <[email protected]>
With git version 1.7.10.4:
$ git rev-list --pretty=format:"%at %ai %aN <%aE>" febf7ea4bedcd36fba0843db726bba28d22bf89a |head -n2
commit febf7ea4bedcd36fba0843db726bba28d22bf89a
%aN <%aE>
So this might be either a git bug fixed in some revision, or just a difference in behavior. What git version are you running?
from gitstats.
I was running git version 1.7.10.4 (which is the current version in Debian stable/wheezy).
The latest dev version of git works correctly, and apparently, everything from at least 1.8.3.rc2. So as you say, it's an issue with an old version of git.
I think this issue could be closed since updating to a more recent git version fixes the problem.
from gitstats.
Indeed. I was just thinking about whether this could warrant a workaround in gitstats, but I guess downstream distro releases that can't upgrade git can't upgrade gitstats either, so there's no point.
Thanks for the details.
from gitstats.
We have hit this problem in Gentoo as well. The error can be reproduced by running gitstats on https://github.com/gentoo-science/sci. The corresponding Gentoo bug is here: https://bugs.gentoo.org/show_bug.cgi?id=575946
The problem is that git rev-list has invalid UTF-8 characters from authors' names.
I will create a pull request with a possible solution to this problem for @hoxu's review.
from gitstats.
Related Issues (20)
- Can I specify a specific branch to calculate, thank you
- Unable to install gitstats on macOS HOT 2
- Is this project still actively maintained? HOT 5
- Broken link to gitorious on homepage
- parsing "git rev-list" was failed if the user name including a space character.
- How to generate report for all branches not only the main branch ?
- git rev-list | grep choke on utf-8 in comments
- After a while running git-stats ... the git or/and wc command is "suspended"
- gnuplot not found
- Domain stats and mailmap
- SyntaxError: invalid syntax HOT 2
- ImportError: No module named gitstats on Windows HOT 2
- list index out of range HOT 3
- commmit by authors only display top20?
- Error when running with output directory = gitstats source HOT 2
- How do we use gitstats? HOT 3
- Support running gitstats in a python3-only environment HOT 3
- Support for exclude merge commits from stats HOT 1
- 'wc' is not recognized as an internal or external command, operable program or batch file.
- FYI, a fork that adds ignore file paths, fixes some issues, and lists other good forks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitstats.