Mercurial Queues Emulation for Git
Rev. | 1a53f0d998b3fb0ed2b9ba877996ad57a22b9783 |
---|---|
크기 | 3,122 bytes |
Time | 2022-03-31 22:05:16 |
Author | Keith Marshall |
Log Message | Promote git-mq-1.0-rc-3 to final release status,
* configure.ac (AC_INIT): Set version number to 1.0
|
# git-qfinish.shar
# ------------------------------------------------------------------------------
# Shell archive to deliver the implementation for the "git qfinish" command.
# ------------------------------------------------------------------------------
#
# $Id$
#
# Written by Keith Marshall <keith@users.osdn.me>
# Copyright (C) 2019, Keith Marshall
#
#
# This file is part of the Git-MQ program suite.
#
# The Git-MQ program suite is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public Licence
# as published by the Free Software Foundation, either version 3 of
# the Licence, or (at your option) any later version.
#
# The Git-MQ program suite is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public Licence for more details.
#
# You should have received a copy of the GNU General Public Licence
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# ------------------------------------------------------------------------------
#
cat <<\ETX
#!/bin/sh
# ------------------------------------------------------------------------------
#
# git-qfinish.sh: Implement the Git-MQ "git qfinish" extension command.
#
# Move a specified sequence of applied Git-MQ patches out of Git-MQ control,
# delete the associated patch tags, and patch files, leaving the associated
# commit objects in place; the specified patch sequence must be contiguous,
# and must extend from the base of the patch stack.
#
# $Id$
#
# ------------------------------------------------------------------------------
#
mq_facility="git qfinish"
#
# I'd have liked to call this a "SYNOPSIS", (which is what it is), but git's
# git-sh-setup script requires the much less appropriate name "OPTIONS_SPEC",
# (which describes only a small subset of its actual content).
#
OPTIONS_SPEC="\
git qfinish <patch> ... [<patch-range> [<patch>]] ...
git qfinish <patch-range> ... [<patch> [<patch-range>]] ...
git qfinish --applied
Release a specified patch, sequence of patches, or all applied
patches from Git-MQ control, leaving each as a regular commit;
any explicitly specified patches must represent a contiguous
sequence at the base of the patch series stack.
--
a,applied! release all currently applied patches"
ETX
# Incorporate the universal set-up code, which is common to all of
# the Git-MQ command implementations.
#
. ./git-mq-setup.shar
cat <<\ETX
# Check if the "--applied" option has been specified; ignore any of
# the standard Git-MQ options, which may have been specified on the
# command line.
#
while git_mq_getopt "$@"
do test "$1" = "-a" && mq_applied_opt=all; shift
done
# Hand off further processing to the appropriate backend script; that
# is to "git-qfinish-all" when the "--applied" option is specified, or
# to "git-qfinish-named" otherwise.
#
mq_require git-qfinish-${mq_applied_opt-named} "$@"
#
# ------------------------------------------------------------------------------
# $RCSfile$: end of file
ETX