Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4267452
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:54:05+00:00 2026-05-21T06:54:05+00:00

I am trying to understand the code in this page: https://github.com/corroded/git-achievements/blob/gh-pages/git-achievements and I’m kinda

  • 0

I am trying to understand the code in this page: https://github.com/corroded/git-achievements/blob/gh-pages/git-achievements

and I’m kinda at a loss on how it actually works. I do know some bash and shell scripting, but how does this script actually “store” how many times you’ve used a command(im guessing saving into a text file?) and how does it “sense” that you actually typed in a git command? I have a feeling it’s line 464 onwards that does it but I don’t seem to quite follow the logic.

Can anyone explain this in a bit more understandable context?

I plan to do some achievements for other commands and I hope to have an idea on HOW to go about it without randomly copying and pasting stuff and voodoo.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:54:05+00:00Added an answer on May 21, 2026 at 6:54 am

    Yes on 464 start the script, everything before are helping functions. I dont know how it gets installed, but I would assume you have to call this script instead of the normal git-command. It just checks if the first parameter is achievement, and if not then just (regular) git with the rest parameters is executed. Afterwards he checks if an error happend (if he exits). And then he just makes log_action and check_for_achievments. log_action just writes the issued command with a date into a text file, while achievments scans for that log file for certains events. If you want to add another achievment you have to do it in this check_for_achievments.
    Just look how the big case handles it (most of the achievments call the count_function which counts the # usages of the function and matches when a power of 2 is reached).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand some example code on this web page: ( http://www.csharp-station.com/HowTo/HttpWebFetch.aspx
I was trying to understand something with pointers, so I wrote this code: #include
I'm trying to understand this bit of code: in display.php: <html> ... <body> <table>
After trying to understand why client code is not rendered in a page (injected
Seems like both EnyimMemcached ( https://github.com/enyim/EnyimMemcached ) and BeITMemcached ( http://code.google.com/p/beitmemcached/ ) are popular
I'm trying to understand someone else's Perl code without knowing much Perl myself. I
I'm trying to understand a particular Perl code from vcake . Usually I find
I'm just learning ruby and trying to understand the scope of code executed in
I'm trying to understand some boost code which is causing PC-Lint grief and uses
Trying to understand an fft (Fast Fourier Transform) routine I'm using (stealing)(recycling) Input is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.