From: Marcel Holtmann <marcel@holtmann.org>
To: Petr Baudis <pasky@ucw.cz>
Cc: GIT Mailing List <git@vger.kernel.org>
Subject: [PATCH Cogito] Add -f parameter also to cg-update
Date: Sat, 04 Jun 2005 08:25:08 +0200 [thread overview]
Message-ID: <1117866308.3656.120.camel@pegasus> (raw)
[-- Attachment #1: Type: text/plain, Size: 164 bytes --]
Hi Petr,
the attached patch adds the -f parameter to force a full pull also to
cg-update.
Regards
Marcel
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
[-- Attachment #2: patch --]
[-- Type: text/x-patch, Size: 666 bytes --]
diff --git a/cg-update b/cg-update
--- a/cg-update
+++ b/cg-update
@@ -7,16 +7,27 @@
#
# If local changes conflict with those of the branch updated from the
# merge will be blocked.
+#
+# OPTIONS
+# -------
+# -f::
+# Force the complete pull even if the heads are the same.
-USAGE="cg-update [BRANCH_NAME]"
+USAGE="cg-update [-f] [BRANCH_NAME]"
. ${COGITO_LIB}cg-Xlib
+force=
+if [ "$1" = "-f" ]; then
+ force=$1
+ shift
+fi
+
name=$1
[ "$name" ] || { [ -s $_git/refs/heads/origin ] && name=origin; }
[ "$name" ] || die "where to update from?"
-cg-pull $name || exit 1
+cg-pull $force $name || exit 1
echo
echo "Applying changes..."
cg-merge $name
reply other threads:[~2005-06-04 6:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1117866308.3656.120.camel@pegasus \
--to=marcel@holtmann.org \
--cc=git@vger.kernel.org \
--cc=pasky@ucw.cz \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).