Commit graph

71 commits

Author SHA1 Message Date
Rudxain a5ba0db2f4
chore: get-regexp is deprecated 2026-05-17 12:57:32 -04:00
Edwin Kofler df1997c0dc
makefile: Allow bypassing conflict check (#1080) 2023-09-26 11:35:24 +08:00
Leroy d2dde69d14
feat(auto-test): CI with pytest (#1066)
* feat(ci): add pull request action and pytest.ini

* test(git-abort): add its unit test
2023-09-19 11:11:43 +08:00
Igor Ostapenko f5bcbe5b0d
Makefile: init SYSCONFDIR before using it (#1044) 2023-05-08 09:57:55 +08:00
Igor Ostapenko 6d73f74f83
Makefile: tune MANPREFIX configuration for FreeBSD (#1043)
We could think of the following use cases:

1. User installs git-extras from official port/pkg. man/man* structure
is quite common among different systems, but location of man/ itself can
be different. FreeBSD Ports framework setups MANPREFIX to PREFIX by
default, i.e. it's /usr/local. The idea is that software may provide
different man/man* sections, with final path being /usr/local/man/man*.
In contrast, git-extras' Makefile process simplifies the things due to
it works with section 1 only, and expects MANPREFIX to be set down to
man/man1 path. For this reason, installation via FreeBSD Ports requires
unconditional man path configuration like this:

    ifeq ($(OS), FreeBSD)
        MANPREFIX = "$(PREFIX)/man/man1"

Otherwise, the path will be incorrect. And this is how official FreeBSD
port of git-extras has been fixing this difference for many years.

2. End user installs git-extras manually. There are two sub-cases:

  2.a. User explicitly defines custom MANPREFIX. Okay, it's user's
  decision -- nothing to do here, just follow as is.

  2.b. User does not define custom paths, i.e. it's expected to be
  installed according to FreeBSD defaults. And default values in
  git-extras' Makefile forms the expected correct path.

This change supports all the cases above, with the goal to avoid wrong
man path for the most of the situations. As long as official git-extras
make process tries to support FreeBSD, this change allows to omit extra
patching for FreeBSD Ports framework.
2023-05-05 09:46:38 +08:00
Igor Ostapenko bbf90c4623
Makefile: set bash COMPL_DIR to FreeBSD expected defaults (#1042)
See official conventions: https://docs.freebsd.org/en/books/porters-handbook/special/#shell-completion
2023-05-04 11:19:25 +08:00
罗泽轩 36e6de10c8
revert the completion dir change on MacOS (#1026)
Fix https://github.com/tj/git-extras/issues/1018
2023-01-27 19:38:56 +08:00
罗泽轩 1426002037
Makefile: ensure bash is used instead of /bin/sh (#1004) 2022-11-12 12:19:35 +08:00
Sandro 66961ad491
Fix lazy loading bash_completion from XDG_DATA_DIRS
If a bash_completion file should get lazy loaded and is placed in a none standard directory which is listed in XDG_DATA_DIRS it must be placed under share/bash-completion/completions. This is for example used in home-manager.

See 730368b35a/bash_completion (L2531)
2022-07-08 11:49:58 +02:00
Tin Lai 4a7fcb7d1c
implement fish completions file
Signed-off-by: Tin Lai <oscar@tinyiu.com>
2020-07-27 15:45:37 +10:00
spacewander 58d13f88d4 Makefile: check dependencies before installation.
So that the packager will know what are dependencied when they are
making a new package.
2019-06-27 15:12:30 +08:00
罗泽轩 1cb4979ed7
Makefile: change the installed manpage destination in FreeBSD (#725) 2018-08-09 10:06:18 +08:00
Paul Wise 317e546b0a
Remove one of the documentation building tools
The two methods build slightly different manual pages.

The Makefile based version has better headers so use it.

Automatically generate git-extras.md and index.txt when building docs.
2018-05-09 17:16:49 +08:00
Hasse Ramlev Hansen 22a44eb206 Remove double path delimiters in zsh description 2018-03-22 06:56:36 +01:00
spacewander 12cd938db3 install: submit brew patch to upstream
Follow the atempt of pull request #491
2017-07-16 16:50:55 +08:00
spacewander 15759061f5 install: display absolute path of zsh completion script 2017-07-15 14:37:24 +08:00
spacewander 6bd1ebd68b fix a wrong name in installation message 2017-07-06 16:06:29 +08:00
spacewander 64b4a599e8 Check commit existed before running some commands 2017-01-27 18:58:16 +08:00
spacewander 299efd84af submit zsh completion script to upstream
Now what you need is just `source /path/to/git-extras-completion.zsh`
2016-07-21 23:48:06 +08:00
Andrew Janke a1530d90f2 Makefile: fix inverted list of commands that use is_git_repo 2015-12-31 20:28:13 -05:00
Andrew Janke cbad7c63eb installation: put $SYSCONFDIR (/etc) under $PREFIX by default 2015-12-28 00:45:04 -05:00
Andrew Janke 4354cca461 Makefile: allow customizing of SYSCONFDIR (/etc) location 2015-12-27 17:14:17 -05:00
Andrew Janke ed7dcb7682 Makefile: refactor is-git-repo inclusion logic
This avoids the need for a big repeated block of code.
2015-10-02 05:47:08 -04:00
Andrew Janke 5b285380e7 Makefile: escape $ used inside eval as shell variable 2015-10-02 03:48:53 -04:00
spacewander 9916356b14 add alias conflict prompt 2015-09-13 09:55:49 +08:00
Nicolai Skogheim 7e147993d4 Mark default task as .PHONY 2015-08-20 12:47:50 +02:00
Nicolai Skogheim bd05487375 Set default make task to be install 2015-08-08 07:06:31 +02:00
Kylie McClain a56d2a17e4 Makefile: Use a more portable mktemp invocation 2015-06-11 20:05:01 -04:00
go2null c7635f8f21 FIXes 'mktemp' to work again on Linux
Broken in 67241a46a8

`mktemp` for BSD (including OSX) requires a template, but it allows any number
of `X`s in the template.

(GNU) `mktemp` for Linux does not require a template, however, if a template is
specified, then the number of `X`s must be 6.

See http://unix.stackexchange.com/a/206111/117157
2015-05-28 11:22:52 +00:00
Kylie McClain 336501382e helper/reset-env: helper to prevent GREP_OPTIONS from causing issues 2015-04-08 18:50:41 -04: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
Rasmus Wriedt Larsen fe3a781de0 make will not assume man pages already exists
They where removed from the repo by issue #291
2014-12-11 21:14:12 +01:00
spacewander 67241a46a8 Update mktemp command to work on Mac OS X
Fix issue 274. It seens like the same with
[this issue](https://github.com/StanAngeloff/lotte/issues/1).
2014-11-13 22:13:13 +08:00
spacewander d9724f3b46 use mixin to add 'is git repo' check for some commands
When those commands are used outside a git repo, 'Not a git repo!' will be
printed to stderr
2014-09-25 00:41:43 +08:00
Andre Cerqueira ad045b7777 improved Makefile with BINPREFIX 2014-06-17 22:43:18 -03:00
Andre Cerqueira 04076cd5df fixed Makefile uninstall target for man files 2014-06-17 22:43:18 -03:00
TJ Holowaychuk 12b864e752 move docs target up 2013-05-15 10:02:38 -07:00
Curtis McEnroe 1c95138455 Uninstall bash completion from correct directory
Target $(DESTDIR)/etc instead of $(DESTDIR)$(PREFIX)/etc to match install.
2012-05-14 22:25:08 -03:00
Curtis McEnroe 0308bd0ba0 Install bash completion to $(DESTDIR)/etc, not $(DESTDIR)$(PREFIX)/etc
This fixes bash completion files being installed to /usr/etc when they should be installed to /etc.
2012-02-22 15:26:36 -05:00
David Baumgold bfc3f788a1 Make bash_completion install respect $(PREFIX) variable 2012-01-25 11:17:31 -05:00
David Baumgold 1d61a21b46 Support DESTDIR
See http://www.gnu.org/prep/standards/html_node/DESTDIR.html for details.
2012-01-25 11:11:47 -05:00
TJ Holowaychuk 8ad024a515 make /etc/bash_completion.d 2012-01-15 13:25:46 -08:00
Jonhnny Weslley ad19d2fdcf (un)installation instructions 2012-01-14 11:17:34 -03:00
Jens K. Mueller 5ce9bb7147 Create install dir before copying 2011-02-11 08:24:22 -08:00
Tj Holowaychuk 88d3c87f80 MANPATH -> MANPREFIX. Closes #25 2010-11-03 07:41:10 -07:00
Tj Holowaychuk ec95872934 Installing / uninstall man pages 2010-10-31 11:54:37 -07:00
Tj Holowaychuk 99d324308b Built docs 2010-10-31 11:51:12 -07:00
Tj Holowaychuk ec756502d6 typo 2010-10-31 11:48:02 -07:00
Tj Holowaychuk e9dbcd19f9 new make clean 2010-10-31 11:47:39 -07:00
Tj Holowaychuk c64a82b76e Started new makefile for docs 2010-10-31 11:47:11 -07:00