mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Merge pull request #778 from pabs3/cleanups
Clean up some minor issues detected by check-all-the-things
This commit is contained in:
commit
f7d127b360
|
|
@ -1,7 +1,7 @@
|
|||
## Your new git-extra command should support
|
||||
|
||||
* OSX, Linux, BSD (You may need to browse their man page)<sup>*</sup>
|
||||
* Bash 3.2+ (If you aren't sure, see [the Bash changelog](http://tldp.org/LDP/abs/html/bash2.html))
|
||||
* Bash 3.2+ (If you aren't sure, see [the Bash changelog](https://www.tldp.org/LDP/abs/html/bash2.html))
|
||||
* Git 2.1+
|
||||
|
||||
<sup>*</sup>If you aren't able to test your new command on a platform,
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ $ git extras update
|
|||
```
|
||||
## git gh-pages
|
||||
|
||||
Sets up the `gh-pages` branch. (See [GitHub Pages](http://pages.github.com/) documentation.)
|
||||
Sets up the `gh-pages` branch. (See [GitHub Pages](https://pages.github.com/) documentation.)
|
||||
|
||||
## git feature|refactor|bug|chore
|
||||
|
||||
|
|
@ -317,7 +317,7 @@ $ git bulk --purge
|
|||
|
||||
## git repl
|
||||
|
||||
Git read-eval-print-loop. Let's you run `git` commands without typing 'git'.
|
||||
Git read-eval-print-loop. Lets you run `git` commands without typing 'git'.
|
||||
|
||||
Commands can be prefixed with an exclamation mark (!) to be interpreted as
|
||||
a regular command.
|
||||
|
|
@ -877,7 +877,7 @@ Populates the file matching `authors|contributors -i` with the authors of commit
|
|||
|
||||
Opens the file in `$EDITOR` when set.
|
||||
|
||||
See the ["MAPPING AUTHORS" section](http://git-scm.com/docs/git-shortlog#_mapping_authors) of **git-shortlog**(1) to coalesce together commits by the same person.
|
||||
See the ["MAPPING AUTHORS" section](https://git-scm.com/docs/git-shortlog#_mapping_authors) of **git-shortlog**(1) to coalesce together commits by the same person.
|
||||
|
||||
Updating AUTHORS file:
|
||||
|
||||
|
|
@ -1196,7 +1196,7 @@ List all commits on the local branch that have not yet been sent to origin. Any
|
|||
|
||||
## git archive-file
|
||||
|
||||
Creates an zip archive of the current git repository. The name of the archive will depend on the current HEAD of your git repository.
|
||||
Creates a zip archive of the current git repository. The name of the archive will depend on the current HEAD of your git repository.
|
||||
|
||||
## git missing
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ See the Makefile for details on advanced configuration options.
|
|||
One-liner:
|
||||
|
||||
```bash
|
||||
curl -sSL http://git.io/git-extras-setup | sudo bash /dev/stdin
|
||||
curl -sSL https://git.io/git-extras-setup | sudo bash /dev/stdin
|
||||
```
|
||||
|
||||
## Installing as Zsh plugin
|
||||
|
|
@ -154,4 +154,4 @@ If you installed git-extras from source, you can run `git-extras update` to upda
|
|||
|
||||
Enjoy `git-extras`!
|
||||
|
||||
[1]: http://sourceforge.net/projects/msys2/
|
||||
[1]: https://sourceforge.net/projects/msys2/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
invers=$(tput rev)
|
||||
inverse=$(tput rev)
|
||||
reset=$(tput sgr0)
|
||||
txtbld=$(tput bold)
|
||||
bldred=${txtbld}$(tput setaf 1)
|
||||
|
|
@ -39,7 +39,7 @@ function listall { git config --global --get-regexp bulkworkspaces; }
|
|||
# guarded execution of a git command in one specific repository
|
||||
function guardedExecution () {
|
||||
if $guardedmode; then
|
||||
echo -n "${invers}git $gitcommand${reset} -> execute here (y/n)? "
|
||||
echo -n "${inverse}git $gitcommand${reset} -> execute here (y/n)? "
|
||||
read -n 1 -r </dev/tty; echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then atomicExecution; fi
|
||||
else
|
||||
|
|
@ -49,7 +49,7 @@ function guardedExecution () {
|
|||
|
||||
# atomic git command execution with log
|
||||
function atomicExecution () {
|
||||
echo "${bldred}->${reset} executing ${invers}git $gitcommand${reset}" && git $gitcommand
|
||||
echo "${bldred}->${reset} executing ${inverse}git $gitcommand${reset}" && git $gitcommand
|
||||
}
|
||||
|
||||
# check if the passed command is known as a core git command
|
||||
|
|
@ -108,7 +108,7 @@ function executBulkOp () {
|
|||
if [[ -n $wsname ]] && [[ $rwsname != "$wsname" ]]; then continue; fi
|
||||
eval cd "\"$rwsdir\""
|
||||
local actual=$(pwd)
|
||||
echo "Executing bulk operation in workspace ${invers}$actual${reset}"
|
||||
echo "Executing bulk operation in workspace ${inverse}$actual${reset}"
|
||||
eval find -L . -name ".git" | while read line; do
|
||||
local gitrepodir=${line::${#line}-5} # cut the .git part of find results to have the root git directory of that repository
|
||||
eval cd "\"$gitrepodir\"" # into git repo location
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ _exit() {
|
|||
# The format of `ps` is different between Windows and other platforms,
|
||||
# so we need to calculate the total column number(COL_NUM) of header first.
|
||||
# Why don't we just use the last column?
|
||||
# Because the body of CMD column may contain space and be treated as multiple fileds.
|
||||
# Because the body of CMD column may contain space and be treated as multiple fields.
|
||||
pid_list=( $(ps -f |
|
||||
awk -v ppid=$$ 'NR == 1 {
|
||||
COL_NUM = NF
|
||||
|
|
|
|||
|
|
@ -37,10 +37,11 @@ test -z $BRANCH && echo "branch argument required." 1>&2 && exit 1
|
|||
|
||||
if [[ -n $REMOTE ]]
|
||||
then
|
||||
git ls-remote --exit-code $REMOTE 1>/dev/null 2>/tmp/ls-remote-error
|
||||
stderr=$(git_extra_mktemp)
|
||||
git ls-remote --exit-code $REMOTE 1>/dev/null 2>"$stderr"
|
||||
REMOTE_EXIT=$?
|
||||
REMOTE_ERROR=$(</tmp/ls-remote-error)
|
||||
rm -f /tmp/ls-remote-error
|
||||
REMOTE_ERROR=$(<"$stderr")
|
||||
rm -f "$stderr"
|
||||
if [ $REMOTE_EXIT -eq 0 ]
|
||||
then
|
||||
git push $REMOTE HEAD:refs/heads/$BRANCH
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ done
|
|||
shift $((OPTIND-1))
|
||||
|
||||
if [[ $# -gt 0 ]]; then
|
||||
warn "please upgrate to new-style interface. Run 'git help standup' to get more info."
|
||||
warn "please upgrade to new-style interface. Run 'git help standup' to get more info."
|
||||
if [[ $# -gt 3 ]] ; then
|
||||
usage
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for git-extras (http://github.com/tj/git-extras).
|
||||
# Completion script for git-extras (https://github.com/tj/git-extras).
|
||||
#
|
||||
# This depends on and reuses some of the internals of the _git completion
|
||||
# function that ships with zsh itself. It will not work with the _git that ships
|
||||
|
|
@ -19,8 +19,8 @@
|
|||
# Inspirations
|
||||
# -----------
|
||||
#
|
||||
# * git-extras (http://github.com/tj/git-extras)
|
||||
# * git-flow-completion (http://github.com/bobthecow/git-flow-completion)
|
||||
# * git-extras (https://github.com/tj/git-extras)
|
||||
# * git-flow-completion (https://github.com/bobthecow/git-flow-completion)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -9,13 +9,14 @@ make_install() {
|
|||
fi
|
||||
}
|
||||
|
||||
cd /tmp \
|
||||
&& rm -rf ./git-extras \
|
||||
dir=$(mktemp -t -d git-extras-install.XXXXXXXXXX) \
|
||||
&& cd "$dir" \
|
||||
&& echo "Setting up 'git-extras'...." \
|
||||
&& git clone https://github.com/tj/git-extras.git &> /dev/null \
|
||||
&& cd git-extras \
|
||||
&& git checkout \
|
||||
$(git describe --tags $(git rev-list --tags --max-count=1)) \
|
||||
&> /dev/null \
|
||||
&& make_install
|
||||
&& make_install \
|
||||
&& rm -rf "$dir"
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Any git Command you wish to execute on the repositories\.
|
|||
\-\-addworkspace <ws\-name> <ws\-root\-directory>
|
||||
.
|
||||
.P
|
||||
Register a workspace for bulk operations\. All repositories in the diretories below <ws\-root\-directory> get registered under this workspace with the name <ws\-name>\. <ws\-root\-directory> must be absolute path\.
|
||||
Register a workspace for bulk operations\. All repositories in the directories below <ws\-root\-directory> get registered under this workspace with the name <ws\-name>\. <ws\-root\-directory> must be absolute path\.
|
||||
.
|
||||
.P
|
||||
\-\-removeworkspace <ws\-name>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@
|
|||
|
||||
<p> --addworkspace <ws-name> <ws-root-directory></p>
|
||||
|
||||
<p> Register a workspace for bulk operations. All repositories in the diretories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path.</p>
|
||||
<p> Register a workspace for bulk operations. All repositories in the directories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path.</p>
|
||||
|
||||
<p> --removeworkspace <ws-name></p>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ git bulk adds convenient support for operations that you want to execute on mult
|
|||
|
||||
--addworkspace <ws-name> <ws-root-directory>
|
||||
|
||||
Register a workspace for bulk operations. All repositories in the diretories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path.
|
||||
Register a workspace for bulk operations. All repositories in the directories below <ws-root-directory> get registered under this workspace with the name <ws-name>. <ws-root-directory> must be absolute path.
|
||||
|
||||
--removeworkspace <ws-name>
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ $ git ignore-io vim
|
|||
*~
|
||||
```
|
||||
|
||||
Append sample gitignore for vim and python to .gitignore in current directory.
|
||||
Append sample gitignore for Vim and Python to .gitignore in current directory.
|
||||
|
||||
```bash
|
||||
$ git ignore-io -a vim python
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ Written by Nate Jones <<nate@endot.org>>
|
|||
|
||||
## REPORTING BUGS
|
||||
|
||||
<<http://github.com/tj/git-extras/issues>>
|
||||
<<https://github.com/tj/git-extras/issues>>
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
<<http://github.com/tj/git-extras>>
|
||||
<<https://github.com/tj/git-extras>>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ Written by Damien Tardy-Panis <<damien@tardypad.me>>
|
|||
|
||||
## REPORTING BUGS
|
||||
|
||||
<<http://github.com/tj/git-extras/issues>>
|
||||
<<https://github.com/tj/git-extras/issues>>
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ Written by Niklas Fiekas <<niklas.fiekas@tu-clausthal.de>>
|
|||
|
||||
## REPORTING BUGS
|
||||
|
||||
<<http://github.com/tj/git-extras/issues>>
|
||||
<<https://github.com/tj/git-extras/issues>>
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
<<http://github.com/tj/git-extras>>
|
||||
<<https://github.com/tj/git-extras>>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ Also runs git commit if -c is provided.
|
|||
|
||||
Written by Antoine Beaupré <<anarcat@debian.org>> from
|
||||
inspiration by https://github.com/da-x/git-search-replace and
|
||||
http://stackoverflow.com/questions/9651898/is-there-a-git-sed-or-equivalent
|
||||
https://stackoverflow.com/questions/9651898/is-there-a-git-sed-or-equivalent
|
||||
|
||||
## REPORTING BUGS
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ Written by Damien Tardy-Panis <<damien@tardypad.me>>
|
|||
|
||||
## REPORTING BUGS
|
||||
|
||||
<<http://github.com/tj/git-extras/issues>>
|
||||
<<https://github.com/tj/git-extras/issues>>
|
||||
|
||||
## SEE ALSO
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue