All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bryan Larsen <bryan.larsen@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] 7/7 add -N option to cg-init
Date: Fri, 08 Jul 2005 06:54:58 -0400	[thread overview]
Message-ID: <42CE5B82.8040901@gmail.com> (raw)

add -N option to cg-init

Signed-off-by: Bryan Larsen <bryan.larsen@gmail.com>
---

  cg-init |   22 +++++++++++++++++++---
  1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/cg-init b/cg-init
--- a/cg-init
+++ b/cg-init
@@ -10,13 +10,29 @@
  #
  # If `cg-init` is run in a non-empty directory files in the top and
  # sub directory will automatically be added.
+#
+# OPTIONS
+# -------
+# -N::
+#   Only update the cache: do not copy the data into the object database.
+#

-USAGE="cg-init"
+USAGE="cg-init [-N]"
  _git_repo_unneeded=1

  . ${COGITO_LIB}cg-Xlib

-uri=$1
+
+infoonly=
+while optparse; do
+       if optparse -N; then
+               infoonly=-N
+       else
+               optfail
+       fi
+done
+
+uri=$ARGV

  [ -e $_git ] && die "$_git already exists"

@@ -38,7 +54,7 @@ if [ "$uri" ]; then
         echo "Cloned (origin $uri available as branch \"origin\")"
  else
         git-read-tree # Seed the dircache
-       find * \( -type f -o -type l \) -print0 | xargs -0r cg-add
+       find * \( -type f -o -type l \) -print0 | xargs -0r cg-add 
${infoonly}
         cg-commit -C -m"Initial commit" -E
  fi

                 reply	other threads:[~2005-07-08 11:05 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=42CE5B82.8040901@gmail.com \
    --to=bryan.larsen@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.