git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH Cogito] Add -f parameter also to cg-update

From
MHMarcel Holtmann <marcel@holtmann.org>
Date
Jun 4, 2005, 06:25 UTC
Message-ID
<1117866308.3656.120.camel@pegasus>
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>
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
Message 1 of 1 in “Add -f parameter also to cg-update”
  1. Add -f parameter also to cg-updateMarcel Holtmann, Jun 4, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.