Coder Social home page Coder Social logo

Comments (2)

hartzell avatar hartzell commented on June 8, 2024

I've noticed that sometimes the last mod info is correct, but not usually. I can't reproducibly cause it to be correct or out of date. Sigh...

The code that's fetching the info from the git repository is from bep/gitmap:gitmap.go. At the bottom it seems to be calling git something like so:

git -c diff.renames=0 -c log.showSignature=0 -C . log --name-only --no-merges '--format=format:%x1e%H%x1f%h%x1f%s%x1f%aN%x1f%aE%x1f%ai%x1f%ci' HEAD

and then parsing the output and building up a map of files to info. It doesn't seem wonky....

If I look through the output I don't see anything that would make it be fixated on the commit known as 52e5f1e.

from justdocs.

hartzell avatar hartzell commented on June 8, 2024

Ok, mystery solved, apologies for wasting our time. Turns out that it was my mis-understanding (or perhaps two).

  1. The last modified bit displays the time of the last commit, simply changing the file isn't enough to update it.
  2. Committing a file is not enough to trigger hugo server to rebuild the site so even though the GitInfo is now up to date, the site I'm previewing in the browser hasn't been updated.

I'd been:

  • editing a file, not seeing a change
  • committing a file, not seeing a change
  • sometimes restarting hugo server then seeing a change
  • and etc....

from justdocs.

Related Issues (5)

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.