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

[PATCH 2/3] cg-patch: Use optparse

From
Jonas Fonseca <fonseca@diku.dk>
Date
Feb 7, 2006, 22:44 UTC
Message-ID
<20060207224433.GB24790@diku.dk>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
---
commit 77defc166986330f4285db8faf206c1176a6c4ae
tree 293120fe428f40eab2422ed59d84e77aa1fa53a1
parent 5095aca7013d87ccdb08dad20a9fb93d7465d33d
author Jonas Fonseca <fonseca@diku.dk> Tue, 07 Feb 2006 23:07:32 +0100
committer Jonas Fonseca <fonseca@antimatter.localdomain> Tue, 07 Feb 2006 23:07:32 +0100
 cg-patch |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/cg-patch b/cg-patch
index 8be13be..90dfd30 100755
--- a/cg-patch
+++ b/cg-patch
@@ -70,10 +70,13 @@ redzone_border()
 
 
 reverse=
-if [ "${ARGS[0]}" = "-R" ]; then
-	reverse=1
-	shift
-fi
+while optparse; do
+	if optparse -R; then
+		reverse=1
+	else
+		optfail
+	fi
+done
 
 
 gonefile="$(mktemp -t gitapply.XXXXXX)"
-- 
Jonas Fonseca
Message 1 of 1 in “cg-patch: Use optparse”
  1. 2/3 cg-patch: Use optparseJonas Fonseca, Feb 7, 2006

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.