mirror of
https://abf.rosa.ru/djam/gitflow.git
synced 2025-02-23 23:12:46 +00:00
Imported from SRPM
This commit is contained in:
commit
3ee41f843c
5 changed files with 333 additions and 0 deletions
2
.abf.yml
Normal file
2
.abf.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
sources:
|
||||||
|
gitflow-15aab26490facf285acef56cb5d61025eacb3a69.tar.gz: 163590387852742453122f8e60fb44e10806d491
|
225
git-flow-completion.bash
Normal file
225
git-flow-completion.bash
Normal file
|
@ -0,0 +1,225 @@
|
||||||
|
#!bash
|
||||||
|
#
|
||||||
|
# git-flow-completion
|
||||||
|
# ===================
|
||||||
|
#
|
||||||
|
# Bash completion support for [git-flow](http://github.com/nvie/gitflow)
|
||||||
|
#
|
||||||
|
# The contained completion routines provide support for completing:
|
||||||
|
#
|
||||||
|
# * git-flow init and version
|
||||||
|
# * feature, hotfix and release branches
|
||||||
|
# * remote feature, hotfix and release branch names
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# Installation
|
||||||
|
# ------------
|
||||||
|
#
|
||||||
|
# To achieve git-flow completion nirvana:
|
||||||
|
#
|
||||||
|
# 0. Install git-completion.
|
||||||
|
#
|
||||||
|
# 1. Install this file. Either:
|
||||||
|
#
|
||||||
|
# a. Place it in a `bash-completion.d` folder:
|
||||||
|
#
|
||||||
|
# * /etc/bash-completion.d
|
||||||
|
# * /usr/local/etc/bash-completion.d
|
||||||
|
# * ~/bash-completion.d
|
||||||
|
#
|
||||||
|
# b. Or, copy it somewhere (e.g. ~/.git-flow-completion.sh) and put the following line in
|
||||||
|
# your .bashrc:
|
||||||
|
#
|
||||||
|
# source ~/.git-flow-completion.sh
|
||||||
|
#
|
||||||
|
# 2. If you are using Git < 1.7.1: Edit git-completion.sh and add the following line to the giant
|
||||||
|
# $command case in _git:
|
||||||
|
#
|
||||||
|
# flow) _git_flow ;;
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The Fine Print
|
||||||
|
# --------------
|
||||||
|
#
|
||||||
|
# Copyright (c) 2011 [Justin Hileman](http://justinhileman.com)
|
||||||
|
#
|
||||||
|
# Distributed under the [MIT License](http://creativecommons.org/licenses/MIT/)
|
||||||
|
|
||||||
|
_git_flow ()
|
||||||
|
{
|
||||||
|
local subcommands="init feature release hotfix support help version"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$subcommand" in
|
||||||
|
init)
|
||||||
|
__git_flow_init
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
feature)
|
||||||
|
__git_flow_feature
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
release)
|
||||||
|
__git_flow_release
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
hotfix)
|
||||||
|
__git_flow_hotfix
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
support)
|
||||||
|
__git_flow_support
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_init ()
|
||||||
|
{
|
||||||
|
local subcommands="help"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_feature ()
|
||||||
|
{
|
||||||
|
local subcommands="list start finish publish track diff rebase checkout pull help"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$subcommand" in
|
||||||
|
pull)
|
||||||
|
__gitcomp "$(__git_remotes)"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
checkout|finish|diff|rebase)
|
||||||
|
__gitcomp "$(__git_flow_list_branches 'feature')"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
publish)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_branches 'feature') <(__git_flow_list_remote_branches 'feature'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
track)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_remote_branches 'feature') <(__git_flow_list_branches 'feature'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_release ()
|
||||||
|
{
|
||||||
|
local subcommands="list start finish track publish help"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$subcommand" in
|
||||||
|
finish)
|
||||||
|
__gitcomp "$(__git_flow_list_branches 'release')"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
publish)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_branches 'release') <(__git_flow_list_remote_branches 'release'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
track)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_remote_branches 'release') <(__git_flow_list_branches 'release'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_hotfix ()
|
||||||
|
{
|
||||||
|
local subcommands="list start finish track publish help"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$subcommand" in
|
||||||
|
finish)
|
||||||
|
__gitcomp "$(__git_flow_list_branches 'hotfix')"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
publish)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_branches 'hotfix') <(__git_flow_list_remote_branches 'hotfix'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
track)
|
||||||
|
__gitcomp "$(comm -23 <(__git_flow_list_remote_branches 'hotfix') <(__git_flow_list_branches 'hotfix'))"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_support ()
|
||||||
|
{
|
||||||
|
local subcommands="list start help"
|
||||||
|
local subcommand="$(__git_find_on_cmdline "$subcommands")"
|
||||||
|
if [ -z "$subcommand" ]; then
|
||||||
|
__gitcomp "$subcommands"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$subcommand" in
|
||||||
|
*)
|
||||||
|
COMPREPLY=()
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_prefix ()
|
||||||
|
{
|
||||||
|
case "$1" in
|
||||||
|
feature|release|hotfix)
|
||||||
|
git config "gitflow.prefix.$1" 2> /dev/null || echo "$1/"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_list_branches ()
|
||||||
|
{
|
||||||
|
local prefix="$(__git_flow_prefix $1)"
|
||||||
|
git branch --no-color 2> /dev/null | tr -d ' |*' | grep "^$prefix" | sed s,^$prefix,, | sort
|
||||||
|
}
|
||||||
|
|
||||||
|
__git_flow_list_remote_branches ()
|
||||||
|
{
|
||||||
|
local prefix="$(__git_flow_prefix $1)"
|
||||||
|
local origin="$(git config gitflow.origin 2> /dev/null || echo "origin")"
|
||||||
|
git branch --no-color -r 2> /dev/null | sed "s/^ *//g" | grep "^$origin/$prefix" | sed s,^$origin/$prefix,, | sort
|
||||||
|
}
|
||||||
|
|
||||||
|
# alias __git_find_on_cmdline for backwards compatibility
|
||||||
|
if [ -z "`type -t __git_find_on_cmdline`" ]; then
|
||||||
|
alias __git_find_on_cmdline=__git_find_subcommand
|
||||||
|
fi
|
27
gitflow-Appropriate-GITFLOW_DIR.patch
Normal file
27
gitflow-Appropriate-GITFLOW_DIR.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
From 5e8a9afc0e83326be48295e5fd20cffe73aa9b1e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ralph Bean <rbean@redhat.com>
|
||||||
|
Date: Tue, 26 Jun 2012 13:55:24 -0400
|
||||||
|
Subject: [PATCH] Appropriate GITFLOW_DIR.
|
||||||
|
|
||||||
|
---
|
||||||
|
git-flow | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/git-flow b/git-flow
|
||||||
|
index 93e9f0f..7a7d67f 100755
|
||||||
|
--- a/git-flow
|
||||||
|
+++ b/git-flow
|
||||||
|
@@ -45,9 +45,7 @@ if [ "$DEBUG" = "yes" ]; then
|
||||||
|
set -x
|
||||||
|
fi
|
||||||
|
|
||||||
|
-# The sed expression here replaces all backslashes by forward slashes.
|
||||||
|
-# This helps our Windows users, while not bothering our Unix users.
|
||||||
|
-export GITFLOW_DIR=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
||||||
|
+export GITFLOW_DIR="/usr/share/gitflow"
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "usage: git flow <subcommand>"
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
2
gitflow.rpmlintrc
Normal file
2
gitflow.rpmlintrc
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
addFilter("E: sourced-script-with-shebang")
|
||||||
|
|
77
gitflow.spec
Normal file
77
gitflow.spec
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
%global gitcommit 15aab26490facf285acef56cb5d61025eacb3a69
|
||||||
|
%global githash %(echo %{gitcommit} | cut -c -7)
|
||||||
|
%global gitdate 20120925
|
||||||
|
%global checkout %{gitdate}git%{githash}
|
||||||
|
|
||||||
|
Name: gitflow
|
||||||
|
Version: 0.4.2.%{checkout}
|
||||||
|
Release: 4
|
||||||
|
Summary: Extensions providing operations for V. Driessen's branching model
|
||||||
|
Group: Development/Other
|
||||||
|
License: BSD and MIT
|
||||||
|
URL: https://github.com/nvie/gitflow
|
||||||
|
# You can get this tarball by cloning the repository from github and checking
|
||||||
|
# out revision %%{githash}
|
||||||
|
#Source0: gitflow-0.4.2.%{checkout}.tar.gz
|
||||||
|
Source0: https://github.com/nvie/gitflow/archive/%{gitcommit}/%{name}-%{gitcommit}.tar.gz
|
||||||
|
Source1000: %{name}.rpmlintrc
|
||||||
|
# The bash completion stuff is MIT licensed, while the rest is BSD
|
||||||
|
Source1: https://raw2.github.com/bobthecow/git-flow-completion/master/git-flow-completion.bash
|
||||||
|
# There is no upstream ticket for this patch, but instead just hardcodes the
|
||||||
|
# directory we're installing to for Fedora.
|
||||||
|
Patch0: gitflow-Appropriate-GITFLOW_DIR.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Requires: shflags
|
||||||
|
Requires: git
|
||||||
|
|
||||||
|
%description
|
||||||
|
A collection of Git extensions to provide high-level repository operations
|
||||||
|
for Vincent Driessen's [branching model](http://nvie.com/git-model "original
|
||||||
|
blog post").
|
||||||
|
|
||||||
|
For the best introduction to get started with `git flow`, please read Jeff
|
||||||
|
Kreeftmeijer's blog post:
|
||||||
|
|
||||||
|
http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
|
||||||
|
|
||||||
|
Or have a look at one of these screen casts:
|
||||||
|
|
||||||
|
* [A short introduction to git-flow]
|
||||||
|
(http://vimeo.com/16018419) (by Mark Derricutt)
|
||||||
|
* [On the path with git-flow]
|
||||||
|
(http://codesherpas.com/screencasts/on_the_path_gitflow.mov) (by Dave Bock)
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}-%{gitcommit}
|
||||||
|
%patch0 -p1 -b .gitflowdir
|
||||||
|
|
||||||
|
%build
|
||||||
|
# This section is empty because this package ccontains shell scripts
|
||||||
|
# to be sourced: there's nothing to build
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
|
install -v -m 0755 git-flow %{buildroot}/%{_bindir}
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-init %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-feature %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-hotfix %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-release %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-support %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 git-flow-version %{buildroot}/%{_datadir}/%{name}
|
||||||
|
install -v -m 0644 gitflow-common %{buildroot}/%{_datadir}/%{name}
|
||||||
|
|
||||||
|
ln -s %{_datadir}/shflags/shflags %{buildroot}/%{_datadir}/%{name}/gitflow-shFlags
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_sysconfdir}/bash_completion.d/
|
||||||
|
install -v -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/bash_completion.d
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc README.mdown LICENSE AUTHORS Changes.mdown
|
||||||
|
%{_bindir}/git-flow*
|
||||||
|
%{_datadir}/%{name}
|
||||||
|
%{_sysconfdir}/bash_completion.d/git-flow-completion.bash
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Add table
Reference in a new issue