Git Product home page Git Product logo

Comments (6)

hoxu avatar hoxu commented on July 4, 2024

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.

ffagerho avatar ffagerho commented on July 4, 2024

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.

hoxu avatar hoxu commented on July 4, 2024

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.

ffagerho avatar ffagerho commented on July 4, 2024

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.

hoxu avatar hoxu commented on July 4, 2024

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.

amadio avatar amadio commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.