threads / patch / 2878

patchcg-update quotes too much

Subject: [PATCH] cg-update quotes too much

## tl;dr

One message between Dec 19, 2005 and Dec 19, 2005. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Tero Roponen· Dec 19, 2005, 12:19 UTC · lore
Hi,

It seems that cogito commit e5ca051c1d3900f7fbc1592d018ab3aab6a9573a broke cg-update, as expected ("Such a large patch is bound to introduce some (probably mostly trivial) bugs").

Quoting $force and $squash gives cg-fetch and cg-merge an empty argument if they are not set. If they are not quoted they will be omitted if they are empty, which is the right thing.

Signed-off-by: Tero Roponen <teanropo@cc.jyu.fi>
---
Show changes to cg-update +2 −2
diff --git a/cg-update b/cg-update
index d586631..1d6e0a0 100755
--- a/cg-update
+++ b/cg-update
@@ -55,10 +55,10 @@ name="${ARGS[0]}"
 [ -s "$_git/refs/heads/$name" ] && export _cg_orig_head="$(cat "$_git/refs/heads/$name")"

 if [ -s "$_git/branches/$name" ]; then
-	cg-fetch "$force" "$name" || exit 1
+	cg-fetch $force "$name" || exit 1
 else
 	echo "Updating from a local branch."
 fi
 echo
 echo "Applying changes..."
-cg-merge "$squash" "$name"
+cg-merge $squash "$name"

← back to recent threads