Giter Club home page Giter Club logo

Comments (4)

devdanzin avatar devdanzin commented on July 18, 2024

Confirmed. Easier to reproduce by using wily index and git log --oneline. History is linear and commits are in chronological sequence, so the cause isn't either of these. Investigating.

Output for wily index:

--------Configuration---------
Path: /home/danzin/projects/32blit-tools
Archiver: git
Operators: {'raw', 'cyclomatic', 'maintainability', 'halstead'}

-----------History------------
╒════════════╤═════════════════╤════════════╕
│ Revision   │ Author          │ Date       │
╞════════════╪═════════════════╪════════════╡
│ 22e1016    │ Alistair Buxton │ 2021-01-12 │
├────────────┼─────────────────┼────────────┤
│ 1ca573a    │ Alistair Buxton │ 2021-01-12 │
├────────────┼─────────────────┼────────────┤
│ 56ca29a    │ Alistair Buxton │ 2021-01-12 │
├────────────┼─────────────────┼────────────┤
│ 0b4d767    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 9e03d14    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 5a6befe    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ c9c4207    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 7996aca    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 36f9cf9    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 6c3f523    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 69ae620    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ 28701b5    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ f24ab84    │ Alistair Buxton │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ e0bbe19    │ Philip Howard   │ 2021-01-11 │
├────────────┼─────────────────┼────────────┤
│ c1b8aaa    │ Alistair Buxton │ 2021-01-05 │
├────────────┼─────────────────┼────────────┤
│ 48ed205    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤
│ a228875    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤
│ fade5c9    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤
│ 47bcf8e    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤
│ 756dfff    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤
│ 48a54ac    │ Alistair Buxton │ 2021-01-02 │
├────────────┼─────────────────┼────────────┤

Output for git log --oneline:

56ca29a (HEAD -> wily-test, origin/wily-test) Remove unused code
1ca573a Only check we have a config once
22e1016 Remove working_path from packer
0b4d767 Move Tool.prepare() to AssetTool
f24ab84 Remove build() and prepare_options() methods of AssetTool
28701b5 Make packer only use AssetBuilders, not AssetTools
69ae620 Make AssetSource into a single static function
6c3f523 Make Tools call AssetBuilders directly
36f9cf9 Split AssetBuilder into two classes
7996aca Auto-register all Tools and load them dynamically
c9c4207 Split out RLE code into functions and re-implement with a generator
5a6befe Fix transparent colour palette update
9e03d14 Put the right path into the ImageAsset
e0bbe19 Merge pull request #62 from ali1234/asset-refactor
c1b8aaa Use importlib.import_module() to load implementations
addda07 Rename OutputFormat to AssetFormatter
468ec10 Only handle lists in join()
4d11268 Implement AssetWriter
d2db808 Make all formatters have components
cc7d72d Make output formatters instances of OutputFormat
48a54ac Clean-up formatters

from wily.

devdanzin avatar devdanzin commented on July 18, 2024

This happens because we sort commits by date in:

index = sorted(index, key=lambda k: k["date"], reverse=True)

But somehow all commits for a given day have the same date (trying to figure out why) and the sort ends up shuffling commits for a given day. It seems that we could actually simply not sort and index would be in the correct order.

from wily.

devdanzin avatar devdanzin commented on July 18, 2024

The commits have the exact same date because they were committed on the exact same second. What wily uses is commit.committed_date, not commit.authored_date (which is what appears in normal git log). If we run git log --format=fuller we can see that the CommitDate is the same for several commits.

That causes the sort mentioned in my previous message to reorder commits with the same date. So we can either use commit.authored_date instead (which may be what users expect, as it's what git log shows), avoid sorting altogether, or live with the fact that, for commits that share the same CommitDate, results will be in wrong order.

Edit: it seems this "same commit time" issue arises from amending/rebasing commits.

from wily.

Wurstnase avatar Wurstnase commented on July 18, 2024

Looks like when you do not reverse the iter_commits here and do not sorted here all commits have the correct order.

However, sometimes changes in metrics are connected to the wrong commit.

from wily.

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.