Comments (11)
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.
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.
Ok, try to run gtm report -t ' '
(there is a space between '
)
from gtm.
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.
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.
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.
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.
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.
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 ofoverwrite
,concatenate
, andignore
. Defaults toconcatenate
.
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 ofgit commit --amend
)
from gtm.
"git config --global notes.rewrite.amend false"
worked for me --- thanks!
from gtm.
great! 👍
from gtm.
Related Issues (15)
- git shortlog usage in summary HOT 1
- After gtm set and commit, timer is not set corretly (start/stop works) HOT 2
- Add release command HOT 1
- Group commits by tasks/branches
- Possible integration with waka-time service HOT 1
- Backup/restore command
- Zapier test
- Creating new task fails to create a new issue HOT 5
- tab completion for zsh? HOT 3
- fatal: Couldn't find remote ref refs/notes/timetracker HOT 3
- gtm pick? HOT 1
- Failed to source "" script error when running "gtm weekly-report" HOT 1
- Improve closing tasks command
- warn when creating a branch name which matches an existing tag HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtm.