Tobias Fendin
b2794c18a1
Removed xargs from git-effort
2022-02-25 16:45:54 +01:00
spacewander
7015501161
git-effort: adjust column limit according to the paths
...
Fix #780 .
2019-09-24 14:32:54 +08:00
Daniel Lublin
af39b2b2ee
git-effort: restore normal (visible) cursor properly
...
If I understand GNU* correctly, cnorm should be used to undo `civis` (make
invisible). `cvvis` is just another abnormal mode, namely "very visible".
*) https://www.gnu.org/software/termutils/manual/termutils-2.0/html_chapter/tput_1.html
2017-10-27 10:30:17 +02:00
spacewander
4d885acda0
fix various typos
2017-06-18 20:22:11 +08:00
Niklas Schlimm
422c9a8e69
taken out duplicate columns setting
2017-03-05 16:06:47 +01:00
Niklas Schlimm
b01359efc5
Optimized file length calculation
2017-03-04 14:21:26 +01:00
Niklas Schlimm
518db6e648
Columns in git-effort adopt to file length
2017-03-04 13:59:48 +01:00
Dan Kilman
b2c7de9a5a
Fix git-effort for paths starting with dash
2017-02-14 23:57:19 +02:00
spacewander
7f662708fa
use real purplish
2015-10-13 23:54:52 +08:00
spacewander
77f1c86b0d
disable color if the output is not printed to tty
2015-10-08 16:45:53 +08:00
Andrew Janke
b2817c7299
git-effort: use portable terminal escape sequences
...
Also uses "default color" instead of "black" for the low-activity things, so
it still shows up on colorschemes that have dark backgrounds.
2015-10-02 06:35:38 -04:00
Sam Thursfield
6a000ec99b
effort, summary: Correctly estimate the number of active days
...
The output of `git log` is not exactly in chronological order. The
default sort option (--date-order) is described in the man page as
follows:
Show no parents before all of its children are shown, but otherwise
show commits in the commit timestamp order.
The `uniq` program will only remove duplicate lines if they follow each
other. In order for this to work correctly, we need to ensure that the
list of dates is exactly in chronological order. There doesn't seem to
be a `git log` option to achieve this, but we can use the `sort`
program. I used reverse sort (`sort -r`) since the output will be roughly
reverse-sorted already.
It's also worth noting that the default --date-order option sorts by
commit date, but git-summary uses *author* date (%ai). Passing
--author-date-order doesn't fix this issue, though, so I didn't change
that.
At the time of writing, this change reduces the number of 'active days'
for git-extras.git from 367 to 331.
2015-09-14 13:32:10 +01:00
Nicolai Skogheim
80f060b213
effort: change order of arguments to function
...
This makes git effort less prone to failing if
someone passes formatting options
2015-09-14 00:00:39 +02:00
Nicolai Skogheim
e91fd9623f
effort: add usage message
2015-09-13 23:56:56 +02:00
Nicolai Skogheim
86e1a7014c
effort: More robust argument parsing
...
Why:
* The old way of handling arguments could make it
difficult to make non-breaking changes because
to be able to handle more arguments than the
'--above' argument, the logic would need to be heavily
refactored and demand restrictions on argument order.
This change addresses the need by:
* Parse arguments in a cleaner way
* Make the command more future proof with respect to arguments
Notable change is the synopsis. Please the see man page.
2015-09-13 23:55:28 +02:00
Nicolai Skogheim
0c7bf665f2
Fix typo in variable name
2015-08-29 15:31:10 +02:00
hemanth.hm
ad75f873af
Merge pull request #423 from nicolaiskogheim/effort-paths
...
effort: document that it takes any path, not just filenames
2015-08-08 20:46:25 +05:30
Nicolai Skogheim
4527656f7c
effort: rename 'file' to 'path' to be more accurate
2015-08-08 09:06:54 +02:00
Nicolai Skogheim
7de280f12f
effort: fix active days always 1
...
Introduced in cdb773c06 (Fix error on FreeBSD with process substitution)
when trying to squash a bug.
This fix should be valid for that bug as well.
2015-08-08 02:44:55 +02:00
hemanth.hm
371dcdff13
Merge pull request #405 from nicolaiskogheim/fix-filenames-with-spaces
...
Make git effort not crash when passed file names with spaces
2015-07-29 13:36:24 +05:30
Nicolai Skogheim
526fb77823
Quote variables bc of filenames with spaces
2015-07-29 05:10:52 +02:00
Nicolai Skogheim
1956d385bd
Guard against 'seq 0'
...
Most implementations of seq yields no output for 'seq 0',
but some yields '1(newline)0'.
2015-07-28 21:23:50 +02:00
Nicolai Skogheim
cdb773c065
Fix error on FreeBSD with process substitution
2015-07-28 20:41:53 +02:00
Nicolai Skogheim
20e6455559
Pass --import-functions if required
...
This patch is the reason for this commit:
https://lists.freebsd.org/pipermail/svn-ports-all/2014-September/075090.html
2015-07-28 06:13:59 +02:00
hemanth.hm
f40e6c37a6
Merge pull request #401 from nicolaiskogheim/effort-above-error-on-NaN
...
effort: error out on bad value to --above
2015-07-25 13:05:00 +05:30
Nicolai Skogheim
6ebfdc5329
effort: error on bad value to --above
2015-07-25 09:09:39 +02:00
Nicolai Skogheim
329106c845
effort: don't count untouched files
2015-07-25 03:16:18 +02:00
Nicolai Skogheim
ba5e5989a3
Do proper argument parsing
2015-07-24 18:57:34 +02:00
Nicolai Skogheim
fd72edd98f
effort: allow sending options to log. Fix #326
2015-07-23 01:15:10 +02:00
Nicolai Skogheim
a7064395c2
Meke coloring respect --above. Fix 74
2015-07-10 03:29:09 +02:00
Nicolai Skogheim
935c5a37b3
Avoid spawning subshell
2015-07-08 18:59:10 +02:00
Nicolai Skogheim
39238ded46
Remove unnecessary call to cat
2015-07-08 18:56:00 +02:00
Nicolai Skogheim
203b7649a2
perf: reduce calls to git log
2015-07-08 18:52:51 +02:00
Nicolai Skogheim
73973049d6
Parallelize git-effort with xargs
2015-07-08 18:45:41 +02:00
Nicolai Skogheim
cb15c94eab
Alter options to git log. Remove pipe
2015-07-08 17:58:12 +02:00
phigoro
95e8812370
git-effort: replace "wc | cut" with "wc | awk"
...
It looks "cut" may have different behaviour, e.g. BSD one works the way
git-effort doesn't expect. "awk" looks to be one of possible fixes here.
2015-05-11 19:54:38 +03:00
spacewander
3330af6cd4
sort unless there is only one item
2015-03-22 22:55:15 +08:00
spacewander
32aee50bc6
extra mktemp into git_extra_mktemp
...
now we can put all utility functions to git-extra-utility
2015-02-05 14:22:49 +08:00
Matthew Avant
7701ba4069
Use mktemp for temporary file creation.
2014-12-04 11:01:40 -08:00
Dan Jackson
d7d6ff2fed
Use process-specific tmp file and clean up on exit
...
Fixes #279 using the suggestion from @hemanth, with some minor tweaks:
- I kept the leading . because I figured there was a reason it was put there originally.
- Changed the show_cursor method that's called when the process exits (prematurely or naturally) to be show_cursor_and_cleanup, and added a line to it that cleans up the tmp file.
2014-11-26 10:23:54 -08:00
hemanth.hm
47bb6e0f74
Merge pull request #222 from jsipprell/pull/filenames-containing-spaces
...
git-effort handles filenames with whitespace.
2014-07-06 12:36:08 +05:30
Konstantin Schukraft
e4290dfb32
invoke bash via /usr/bin/env for portability
2014-07-02 09:41:37 +02:00
Jesse Sipprell
1479b9633a
git effort: handle filenames containing whitespace cleanly
2014-04-22 20:21:10 -04:00
TJ Holowaychuk
41c1719d84
change git-effort(1) to use /bin/bash for now. Closes #78
2012-11-20 15:17:51 -08:00
TJ Holowaychuk
2287e07204
fix git-extras whitespace
2012-06-28 17:03:10 -07:00
Jesús Espino
abf55ae76c
Fixed 2 bashism and now works on bash and dash
2012-06-29 00:30:54 +02:00
TJ Holowaychuk
c10be63473
Revert "Removing a bashism from git-effort"
...
This reverts commit cb6c34bc26 .
2012-06-28 12:34:10 -07:00
Jesús Espino
cb6c34bc26
Removing a bashism from git-effort
2012-06-28 21:15:34 +02:00
Leila Muhtasib
4fa2c1d144
Added dots for fill instead of blank spaces
2012-06-12 11:44:33 -04:00
TJ Holowaychuk
738c784352
replace unsorted with sorted
2012-02-08 18:35:25 -08:00