2
0
mirror of https://github.com/gitwatch/gitwatch synced 2024-11-15 06:12:52 +00:00
Commit Graph

85 Commits

Author SHA1 Message Date
Alan Young
8680fc47b6 ran gitwatch.sh through shfmt (options -i 2 -bn -ci -sr) 2021-03-06 08:10:59 -07:00
Alan Young
b361dea0d7 fix word splitting failure 2021-02-27 19:59:57 -07:00
Alan Young
9f82d555cf made shellcheck quiet 2021-02-27 19:44:00 -07:00
hesk
255d385a17 Use different exit code for each error condition 2020-12-08 22:38:21 +01:00
hesk
32bf8872a0 Add ability to configure path for readline 2020-12-08 22:38:21 +01:00
hesk
35987b5cf2 Fix: exclude .git repository on macOS 2020-12-08 22:23:35 +01:00
Joachim Nicolay
8cb0c827c0 double-double-quote target directory to support pathes with spaces 2020-08-13 19:26:19 +02:00
Tin Lai
5e6b68bdcb add no pager 2020-06-07 02:25:43 +10:00
Matt Kotsenas
011b982e72 Add 'modify' event as well 2020-05-29 16:34:17 -07:00
Matt Kotsenas
fc17c7def4
Update inotifywait parameters to also watch move_self
Update the parameters to `inotifywait` to also watch `move_self`, as vim uses it on linux (at least on Ubuntu 18.04)
2020-05-29 11:18:05 -07:00
Dave Musicant
40bcd27b1b
Merge pull request #81 from juanmancebo/master
Fixed git inotifywait exclude args
2020-04-15 07:29:09 -05:00
juan.mancebo
5f35eedf7d clean git inotifywait exclude args 2020-04-15 07:57:30 +02:00
juan.mancebo
1d7e7f8b0f Fixed git inotifywait exclude args 2020-04-13 21:01:25 +02:00
Tero Niemi
493dd0a38a
Fixing EVENTS also in the Darvin side.
Using VAR="${VAR:-defaults}" structure.
2020-03-04 13:30:36 +02:00
Tero Niemi
4d086834fb
Fixed the broken -e command line option
In the original the defaults always overwrote the option.
2020-03-03 15:34:35 +02:00
Dave Musicant at home
8a7c37279a cleaned up typo 2019-12-10 12:25:04 -06:00
Dave Musicant
a341c1eb96
Merge pull request #67 from vogler/is_command_hash
is_command should use hash instead of which
2019-12-10 11:41:13 -06:00
Ralf Vogler
9233d8d6c0 macOS: try greadlink -f, then readlink -f, then readlink and warn about it 2019-07-26 17:22:59 +02:00
Ralf Vogler
41bde82710 is_command: use bash builtin hash instead of which 2019-07-26 13:34:24 +02:00
Dave Musicant
a0acf8aa79
Fixed shebang 2019-03-06 15:38:13 -06:00
Andrey Astafyev
d1d9721314 Exit on wrong option 2019-02-15 13:45:51 +03:00
Andrey Astafyev
0729d1965f Check if directory changing is possible 2019-02-15 13:30:20 +03:00
Andrey Astafyev
9875612281 Arguments to INW command stored in array 2019-02-15 12:49:19 +03:00
Andrey Astafyev
00c26dde5c Apply fixes for some of shellcheck warnings 2019-02-15 12:43:24 +03:00
Andrey Astafyev
e6ae00a4c7 Remove trailing whitespaces 2019-02-11 12:29:47 +03:00
Andrey Astafyev
089576cf0b Typos fixes 2019-02-11 12:25:55 +03:00
Dave Musicant / thinkpad
759aa1aace Enabled OS X functionality with fswatch. 2019-01-22 09:55:24 -06:00
Dave Musicant / thinkpad
11a2eab5db cleaned up GIT_DIR portion to only add parameters as necessary 2019-01-12 12:54:50 -06:00
Dave Musicant / thinkpad
f34a7545d5 Remote dir functionality added, tests improved, variable added to delay timing in tests 2019-01-12 12:54:16 -06:00
Dave Musicant / thinkpad
e493af3336 Status check is back in to prevent extraneous commit attempts; test added as well. 2019-01-02 10:03:19 -06:00
Dave Musicant / thinkpad
295ad233fc Added some author names to stackoverflow references. 2018-12-31 15:52:11 -06:00
shervin.emami
9c4027a75c Better handling of file creation, deletion and renames 2018-12-30 22:35:55 +11:00
shervin.emami
1841ba624c Simply capitalized each sentence in the help info, for better readability. 2018-12-30 21:32:31 +11:00
shervin.emami
96461e5805 Limit the line width, so it fits in a single line in most git log outputs 2018-12-30 21:29:48 +11:00
shervin.emami
362f82aba9 Only commit changes if there were actual file changes. (Doesn't impact the git logs, only the shell output 2018-12-30 21:23:23 +11:00
shervin.emami
10ae3717df Allow listing file diffs in the commit log message, such as by passing '-l 10' 2018-12-30 15:33:10 +11:00
Dave Musicant / thinkpad
4b80c397da Removed the -u. It conflicts with -A (--all), and appears to be unnecessary as the documentation indicates for git 2.0 indicates that -A will remove anyway. Test script confirms. 2018-11-30 14:15:56 -06:00
Nevik Rehnel
c0408ff8f1 Add '-u' switch to git-add invocation. Closes #25 2015-03-24 09:48:38 +01:00
Nevik Rehnel
750e534490 Fix usage help text (typos, outdated events variable) 2014-07-05 20:08:42 +02:00
Nevik Rehnel
0b729ad582 Quote events list in command generation 2014-07-05 20:08:42 +02:00
Nevik Rehnel
cd40a3f579 Update copyright notice, add Phil Thompson @philt to contributors list 2014-07-05 20:08:27 +02:00
Phil Thompson
bd159dbb6e alternative to process substitution plus other multiplatform fixes 2014-07-03 09:35:30 +01:00
Phil Thompson
429c4af5bf add optional arg to specify events to monitor 2014-07-02 14:47:17 +01:00
Nevik Rehnel
a2b78e9a60 Add --all to git-add call (dirs)
The call to `git add` for directories previously used the argument `.` while
being in the target directory. In current Git versions, this produces a warning
about the upcoming changes to `git add` behavior.

To remove this warning and make `git add` behave like we want it, now and in
coming Git versions, we added the `--all` switch to the call (as suggested in
the aforementioned warning). This will include removals as well as additions in
the index.
2013-11-13 11:07:38 +01:00
Nevik Rehnel
930d1d1957 Add some more comments 2013-11-13 10:57:29 +01:00
Nevik Rehnel
7788b7cbfd Only use one inotifywait instance, fix quoting
As detailed in #14, this improves usage of inotifywait: instead of calling inw
once per loop-run, it is launched once and its output piped into this script.
To facilitate this in an economic manner, a sleep period after a captured event
is added (it acts exactly as it did before this change). Should new events
occur while a waiting period is already running, that sleep process is killed
and a new one started. This groups together rapid events. The -s switch keeps
its functionality.

As mentioned in the issue, a big credit goes out to @datag, since the idea and
structure for this feature are taken from
datag/confcan@bcff79bc77.

Also fixes quoting (and quote-parsing) issues in a few places. These became
apparent in the inotifywait call (which is prepared as a string, from which
quotes arguments are not processed like normal unless `eval` is used). Testing
revealed a few quoting weaknesses in other places, where a path containing
whitespace would cause errors. Most of these should be fixed for now.

Closes #14.
2013-04-25 23:19:48 +02:00
Nevik Rehnel
72090b30ee Add help about env vars for binaries 2013-04-25 17:05:55 +02:00
Nevik Rehnel
f7a992e379 Construct push command only once
Move checking and construction of push command out of main loop so construction
is only done once (push command does not change during script execution.
2013-04-24 16:35:42 +02:00
Nevik Rehnel
b3fc585539 Move echo'ing of errors to function 2013-04-24 16:22:51 +02:00
Nevik Rehnel
0584887db2 Replace literal git/inw calls with vars 2013-04-24 16:17:24 +02:00