Coder Social home page Coder Social logo

Comments (11)

laughedelic avatar laughedelic commented on July 17, 2024

Hi @trygub!
I tried gtm report and it seems to work for me. Do you call it with any specific arguments?
Also could you just try bar=2; foo=$((1 + $bar)); echo $foo in your bash (should output 3)?

from gtm.

trygub avatar trygub commented on July 17, 2024

bar=2; foo=$((1 + $bar)); echo $foo

the above does output 3, yes

Do you call it with any specific arguments?

no, just "gtm report", I'm affraid

from gtm.

laughedelic avatar laughedelic commented on July 17, 2024

Ok, try to run gtm report -t ' ' (there is a space between ')

from gtm.

trygub avatar trygub commented on July 17, 2024

No luck, Sir.

The above produces

gtm: line 531: 7237 + 101

437 : syntax error in expression (error token is "437 ")

If you push up a branch with some more debug output around these lines of code maybe, I could run it and send the output to you...

from gtm.

laughedelic avatar laughedelic commented on July 17, 2024

Hey @trygub, sorry but right now I don't have much time for this. I'll try to take a look at it this weekend. Also it may help if you tell me whatever details about your system (actually I think only bash version matters, but you use something specific, tell me).

from gtm.

trygub avatar trygub commented on July 17, 2024

Latest Ubuntu 14.04 with default bash.

bash --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I don't speak bash, but I can do some poking around if you give me some pointers as to where...

from gtm.

trygub avatar trygub commented on July 17, 2024

Hey @laughedelic , I've worked out what the problem is. It seems that gtm got somehow into a state where there are two timestamp notes attached to a single commit, e.g.

Notes (timetracker):
Time-spent: 923

Time-spent: 47

This makes gtm fail on parse of notes for that commit. Not sure how this happened, but I've found 3-4 such commits and they are ordinary (non-merge) commits (with a single parent).

from gtm.

trygub avatar trygub commented on July 17, 2024

Hey @laughedelic , I've worked out how this happens. If gtm timer is running and a commit is made, a note is added to that commit and gtm timer is reset (but continues to run). If you then run "gtm commit --amend" (a command frequently used to tweak the commit message if something went wrong), after modification another note will be added to that commit (or more if you keep amending!).

from gtm.

laughedelic avatar laughedelic commented on July 17, 2024

Hi @trygub! Sorry, I completely forgot about this project..
Thank you for spending time to investigate this issue! 👍
Look, this is from the git help notes:

notes.rewrite.<command>
When rewriting commits with <command> (currently amend or rebase), if this variable is false, git will not copy notes from the original to the rewritten commit. Defaults to true.

if notes.rewrite.amend is not set to false, the following setting defines the behaviour:

notes.rewriteMode
When copying notes during a rewrite, what to do if the target commit already has a note. Must be one of overwrite, concatenate, and ignore. Defaults to concatenate.

So you can solve it by

git config --global notes.rewrite.amend false

this will overwrite notes when you do git commit --amend. Otherwise you can set it to true and then change notes.rewriteMode to something different than concatenate.

Also, take a look at these two commands:

  • gtm amend (for amending the timetracker notes)
  • gtm undo (I normally use it instead of git commit --amend)

from gtm.

trygub avatar trygub commented on July 17, 2024

"git config --global notes.rewrite.amend false"

worked for me --- thanks!

from gtm.

laughedelic avatar laughedelic commented on July 17, 2024

great! 👍

from gtm.

Related Issues (15)

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.