wakatime / sublime-wakatime

Sublime Text 2 & 3 plugin for automatic time tracking and metrics generated from your programming activity.
https://wakatime.com/sublime-text
BSD 3-Clause "New" or "Revised" License
526 stars 47 forks source link

Is it possible to change it to the same project if the git address is the same? #72

Closed jaychsu closed 6 years ago

jaychsu commented 7 years ago

I don't know if this is a bug:

When I make a change in OthProj(it's a git submodule) in RootProject, my time will be counted under RootProject.

The structure is:

RootProject
|  OthProj (as submodule)

Is it possible to change it to the same project if the git address is the same?

For this example, whether I'm in the OthProj in RootProject, or directly in OthProj, the time spent will be counted in OthProj.

alanhamlett commented 7 years ago

Yes, create a .wakatime-project file with the first line of that file OthProj then put that file in your RootProject folder. Any files edited inside that folder will now be assigned to OthProj.

jaychsu commented 7 years ago

It's work. Thx. :)

jaychsu commented 7 years ago

One more question, does it make sense to load proj info from .gitsubmodule if it exists?

alanhamlett commented 7 years ago

does it make sense to load proj info from .gitsubmodule if it exists?

My understanding of submodules is they are for dependencies, not usually for development inside the submodules?

However, we can add support for submodules to wakatime-cli that can be enabled with a config setting in ~/.wakatime.cfg.

jaychsu commented 7 years ago

OK, I'll submit a PR into wakatime-cli to do that :)

alanhamlett commented 6 years ago

wakatime/wakatime#105 added project detection from git submodules.