ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Michael Shigorin <mike@osdn.org.ua>
To: devel@lists.altlinux.org
Subject: Re: [devel] Правильный git-репо с нуля, ЧЯДНТ?
Date: Fri, 20 Apr 2012 14:12:20 +0300
Message-ID: <20120420111220.GS7507@osdn.org.ua> (raw)
In-Reply-To: <4F913F9E.7000204@altlinux.org>

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On Fri, Apr 20, 2012 at 02:51:10PM +0400, Anatoly Lyutin wrote:
> 2. Создал бранч upstream
> 3. Вычистил его от спека

См. тж. аттач (надо бы упакетить куда).

> 10. Сделал gear-update-tag

Закоммитили?

> 12. Упёрся в отсутствие файла с тагом в tags, при этом в list -
> всё нормально:

git status

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/

[-- Attachment #2: git-empty-branch --]
[-- Type: text/plain, Size: 816 bytes --]

#!/bin/sh

Usage()
{
    cat <<__USAGE__
Usage:	git-empty-branch -h|--help
	git-empty-branch [-m|--message "<message>"] branch ...
__USAGE__
}

MESSAGE="Empty branch"

if [ $# -eq 0 ]; then
    Usage >&2
    exit 1
fi

BRANCHES=
NOCOMMIT=

while [ $# -ne 0 ]; do
    case $1 in
	--)
	    shift
	    BRANCHES="$BRANCHES $@"
	    ;;
	-h|--help)
	    Usage
	    exit 0
	    ;;
	-m|--message)
	    MESSAGE=$2
	    shift 2
	    ;;
	-n|--no-commit)
	    NOCOMMIT=1
	    shift
	    ;;
	*)
	    BRANCHES="$BRANCHES $1"
	    shift
	    ;;
    esac
done

for B in $BRANCHES; do
    if [ -d .git/refs/heads/$B ]; then
	echo "branch $B already exists!" >&2
    else
	git stash
	git symbolic-ref HEAD refs/heads/$B
	rm .git/index
	git clean -f -d
	[ -z "$NOCOMMIT" ] || exit 0
	git commit --allow-empty -m "$MESSAGE"
    fi
done

  reply	other threads:[~2012-04-20 11:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 10:51 Anatoly Lyutin
2012-04-20 11:12 ` Michael Shigorin [this message]
2012-04-20 11:34     ` Michael Shigorin
2012-04-20 11:47       ` Anatoly Lyutin
2012-04-20 11:51         ` Michael Shigorin
2012-04-20 12:09           ` Anatoly Lyutin
2012-04-23  8:23   ` Sergey Alembekov
2012-04-23  8:34     ` Michael Shigorin
2012-04-23  8:35     ` Alexey Shabalin
2012-04-23  8:37       ` Michael Shigorin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120420111220.GS7507@osdn.org.ua \
    --to=mike@osdn.org.ua \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git