git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: git@vger.kernel.org, Petr Baudis <pasky@suse.cz>
Subject: [PATCH] Use Cogito when possible in the "tutorial" test.
Date: Fri, 03 Mar 2006 20:23:34 -0500	[thread overview]
Message-ID: <20060304012333.10494.35600.stgit@dv.roinet.com> (raw)

In particular, use Cogito branch support.  Document why git has to be
used in some places.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 Documentation/tutorial-script/script.sh |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/Documentation/tutorial-script/script.sh b/Documentation/tutorial-script/script.sh
index edcebda..4d6b732 100755
--- a/Documentation/tutorial-script/script.sh
+++ b/Documentation/tutorial-script/script.sh
@@ -1,8 +1,9 @@
 #!/bin/bash
 #
-# FIXME: This script has many GITisms. Some of them are unnecessary, while
-# some stem from missing Cogito features (especially no support for pushing
-# tags, and consequently no support for remotes/).
+# FIXME: This script has some GITisms. They stem from missing Cogito
+# features, such as exporting patches to mbox format, applying patches
+# from e-mail, merging multiple tags at once, verifying signed tags and
+# repacking the repository.
 
 
 # This function is appended as "&& should_fail" to commands which should
@@ -34,7 +35,7 @@ cd $ALICE
 tar xf $TOP/0001-alice.tar
 cd rpn
 
-# Being a tidy girl, she places it under git
+# Being a tidy girl, she places it under Cogito
 echo "Alice's first version" | cg-init
 cg-tag -d "First ever version of RPN" rpn-0.1
  
@@ -108,8 +109,8 @@ cg-export ../rpn-0.3.tar.bz2
 ### Bob tells Alice of his changes, Alice prepares to get them.
 cd $ALICE/rpn
 
-git checkout -b bob
-git branch
+cg-switch -r master bob
+cg-status -g
 
 # Alice needs to register his remote branch
 cg-branch-add bobswork $BOB/rpn
@@ -163,14 +164,16 @@ cg-commit -m "Add proper header file for
           -m "Update dependencies in Makefile"
 
 # Charlie emails the patch to Alice:
+# cg-mkpatch -d .. -r rpn-0.3..master
 git format-patch -o .. --mbox --signoff -r rpn-0.3
-      # Result is in $TOP/0014-charlie-email
+# Only git can create mbox formatted output
+# Compare the result to 0014-charlie-email
 
 
 ### Alice is busy meanwhile...
 cd $ALICE/rpn
 
-git checkout master
+cg-switch master
 
 patch -p1 -i $TOP/0015-alice-mod.patch
 
@@ -189,21 +192,23 @@ cg-push public
 ### Alice gets Charlie's fix, creates a new branch for his changes
 cd $ALICE/rpn
 
-git checkout master
-git checkout -b charlie rpn-0.3
-git branch
+cg-switch -r rpn-0.3 charlie
+cg-status -g
 
+# Check what's inside the patch.  There is no Cogito equivalent yet.
 git apply --stat $TOP/0014-charlie-email
 git apply --summary $TOP/0014-charlie-email
 git apply --check $TOP/0014-charlie-email
 
 # Everything looks OK
 git applymbox $TOP/0014-charlie-email
+# This doesn't work well yet
+# cg-patch < $TOP/0014-charlie-email
 
 ### Alice integrates the changes in the branches for the next release
 cd $ALICE/rpn
 
-git checkout master
+cg-switch master
 # Alice tries "git merge" instead of "cg-merge" since she wanted to
 # merge both branches at once, which "cg-merge" cannot do.
 git merge "Integrate changes from Bob and Charlie" master bob charlie \

                 reply	other threads:[~2006-03-04  1:23 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=20060304012333.10494.35600.stgit@dv.roinet.com \
    --to=proski@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.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).