Git development
 help / color / mirror / Atom feed
* Re: openbsd version?
From: Daniel Barkalow @ 2005-10-10 21:31 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: Johannes Schindelin, Junio C Hamano, git
In-Reply-To: <86y851aydl.fsf@blue.stonehenge.com>

On Mon, 10 Oct 2005, Randal L. Schwartz wrote:

> >>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> <sarcasm>Undocumented secret switches.  Nice.</sarcasm>  No wonder
> >> I couldn't find it.
> 
> Johannes> <optimism>Maybe he who found the documentation lacking is going to fix 
> Johannes> it?</optimism>
> 
> I'd be happy to do that.  But as a tech writer, I know that it's
> insane to not work at least from an implementor's rough draft, to at
> least understand the intent of a mechanism, if not the precise design.
> There's no implementor's rough draft here, so I can't help.

The mailing list thread on the subject is at:

 http://www.gelato.unsw.edu.au/archives/git/0509/8902.html

(That's the middle of the thread, when the patch was actually written. 
There's discussion before and after if you need more info.)

You can actually get a pretty good explanation of features, once you know 
they exist at all, by looking for the discussion on the list. This tends 
to at least give you the person who did the patch explaining how to use it 
to the person who wanted the feature. And it'll also tell you who the 
implementor was, so you can bug the right person directly. :)

What does get written about a feature generall ends up in the commit 
message for the commit that adds it, so that's another good place to look. 
(In this case, it's missing a "not" and description of an option, so it's 
quite rough as a draft.)

In this case:

 "git branch -d <name>" deletes a branch with that name; but it checks 
that you're not on that branch, and it checks that that branch doesn't 
have any commits which aren't merged into the current branch.
 "git branch -D <name>" deletes a branch, and skips the second check.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply

* [PATCH] Remove the version tags from the manpages
From: Christian Meder @ 2005-10-10 21:25 UTC (permalink / raw)
  To: git

Remove the version tags from the manpages.

Signed-off-by: Christian Meder <chris@absolutegiganten.org>

---

 Documentation/cvs-migration.txt          |    1 -
 Documentation/git-apply.txt              |    1 -
 Documentation/git-cat-file.txt           |    1 -
 Documentation/git-checkout-index.txt     |    1 -
 Documentation/git-cherry-pick.txt        |    1 -
 Documentation/git-clone-pack.txt         |    1 -
 Documentation/git-clone.txt              |    1 -
 Documentation/git-commit-tree.txt        |    1 -
 Documentation/git-commit.txt             |    1 -
 Documentation/git-convert-objects.txt    |    1 -
 Documentation/git-cvsimport.txt          |    1 -
 Documentation/git-diff-files.txt         |    1 -
 Documentation/git-diff-index.txt         |    1 -
 Documentation/git-diff-stages.txt        |    1 -
 Documentation/git-diff-tree.txt          |    1 -
 Documentation/git-fetch-pack.txt         |    1 -
 Documentation/git-fetch.txt              |    1 -
 Documentation/git-fsck-objects.txt       |    1 -
 Documentation/git-grep.txt               |    1 -
 Documentation/git-hash-object.txt        |    1 -
 Documentation/git-http-fetch.txt         |    1 -
 Documentation/git-init-db.txt            |    1 -
 Documentation/git-local-fetch.txt        |    1 -
 Documentation/git-log.txt                |    1 -
 Documentation/git-ls-remote.txt          |    1 -
 Documentation/git-ls-tree.txt            |    1 -
 Documentation/git-merge-base.txt         |    1 -
 Documentation/git-merge-index.txt        |    1 -
 Documentation/git-merge-one-file.txt     |    1 -
 Documentation/git-merge.txt              |    1 -
 Documentation/git-mktag.txt              |    1 -
 Documentation/git-octopus.txt            |    1 -
 Documentation/git-pack-objects.txt       |    1 -
 Documentation/git-peek-remote.txt        |    1 -
 Documentation/git-prune-packed.txt       |    1 -
 Documentation/git-prune.txt              |    1 -
 Documentation/git-pull.txt               |    1 -
 Documentation/git-read-tree.txt          |    1 -
 Documentation/git-receive-pack.txt       |    1 -
 Documentation/git-rename.txt             |    1 -
 Documentation/git-repack.txt             |    1 -
 Documentation/git-resolve.txt            |    1 -
 Documentation/git-rev-list.txt           |    1 -
 Documentation/git-send-email.txt         |    1 -
 Documentation/git-send-pack.txt          |    1 -
 Documentation/git-shortlog.txt           |    1 -
 Documentation/git-show-branch.txt        |    1 -
 Documentation/git-show-index.txt         |    1 -
 Documentation/git-ssh-fetch.txt          |    1 -
 Documentation/git-ssh-upload.txt         |    1 -
 Documentation/git-status.txt             |    1 -
 Documentation/git-tag.txt                |    1 -
 Documentation/git-tar-tree.txt           |    1 -
 Documentation/git-unpack-file.txt        |    1 -
 Documentation/git-unpack-objects.txt     |    1 -
 Documentation/git-update-server-info.txt |    1 -
 Documentation/git-upload-pack.txt        |    1 -
 Documentation/git-var.txt                |    1 -
 Documentation/git-verify-pack.txt        |    1 -
 Documentation/git-whatchanged.txt        |    1 -
 Documentation/git-write-tree.txt         |    1 -
 Documentation/git.txt                    |    1 -
 Documentation/hooks.txt                  |    1 -
 Documentation/repository-layout.txt      |    1 -
 Documentation/tutorial.txt               |    1 -
 65 files changed, 0 insertions(+), 65 deletions(-)

39c33dea976abc89b5897e24e95711c7bde43617
diff --git a/Documentation/cvs-migration.txt b/Documentation/cvs-migration.txt
--- a/Documentation/cvs-migration.txt
+++ b/Documentation/cvs-migration.txt
@@ -1,6 +1,5 @@
 Git for CVS users
 =================
-v0.99.5, Aug 2005
 
 Ok, so you're a CVS user. That's ok, it's a treatable condition, and the
 first step to recovery is admitting you have a problem. The fact that
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -1,6 +1,5 @@
 git-apply(1)
 ============
-v0.1, June 2005
 
 NAME
 ----
diff --git a/Documentation/git-cat-file.txt b/Documentation/git-cat-file.txt
--- a/Documentation/git-cat-file.txt
+++ b/Documentation/git-cat-file.txt
@@ -1,6 +1,5 @@
 git-cat-file(1)
 ===============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-checkout-index.txt b/Documentation/git-checkout-index.txt
--- a/Documentation/git-checkout-index.txt
+++ b/Documentation/git-checkout-index.txt
@@ -1,6 +1,5 @@
 git-checkout-index(1)
 =====================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-cherry-pick.txt b/Documentation/git-cherry-pick.txt
--- a/Documentation/git-cherry-pick.txt
+++ b/Documentation/git-cherry-pick.txt
@@ -1,6 +1,5 @@
 git-cherry-pick(1)
 ==================
-v0.99.5 Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-clone-pack.txt b/Documentation/git-clone-pack.txt
--- a/Documentation/git-clone-pack.txt
+++ b/Documentation/git-clone-pack.txt
@@ -1,6 +1,5 @@
 git-clone-pack(1)
 =================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -1,6 +1,5 @@
 git-clone(1)
 ============
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-commit-tree.txt b/Documentation/git-commit-tree.txt
--- a/Documentation/git-commit-tree.txt
+++ b/Documentation/git-commit-tree.txt
@@ -1,6 +1,5 @@
 git-commit-tree(1)
 ==================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -1,6 +1,5 @@
 git-commit(1)
 =============
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-convert-objects.txt b/Documentation/git-convert-objects.txt
--- a/Documentation/git-convert-objects.txt
+++ b/Documentation/git-convert-objects.txt
@@ -1,6 +1,5 @@
 git-convert-objects(1)
 ======================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-cvsimport.txt b/Documentation/git-cvsimport.txt
--- a/Documentation/git-cvsimport.txt
+++ b/Documentation/git-cvsimport.txt
@@ -1,6 +1,5 @@
 git-cvsimport(1)
 ================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt
--- a/Documentation/git-diff-files.txt
+++ b/Documentation/git-diff-files.txt
@@ -1,6 +1,5 @@
 git-diff-files(1)
 =================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-diff-index.txt b/Documentation/git-diff-index.txt
--- a/Documentation/git-diff-index.txt
+++ b/Documentation/git-diff-index.txt
@@ -1,6 +1,5 @@
 git-diff-index(1)
 =================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-diff-stages.txt b/Documentation/git-diff-stages.txt
--- a/Documentation/git-diff-stages.txt
+++ b/Documentation/git-diff-stages.txt
@@ -1,6 +1,5 @@
 git-diff-stages(1)
 ==================
-v0.1, June 2005
 
 NAME
 ----
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt
--- a/Documentation/git-diff-tree.txt
+++ b/Documentation/git-diff-tree.txt
@@ -1,6 +1,5 @@
 git-diff-tree(1)
 ================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-fetch-pack.txt b/Documentation/git-fetch-pack.txt
--- a/Documentation/git-fetch-pack.txt
+++ b/Documentation/git-fetch-pack.txt
@@ -1,6 +1,5 @@
 git-fetch-pack(1)
 =================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt
--- a/Documentation/git-fetch.txt
+++ b/Documentation/git-fetch.txt
@@ -1,6 +1,5 @@
 git-fetch(1)
 ============
-v0.99.5, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-fsck-objects.txt b/Documentation/git-fsck-objects.txt
--- a/Documentation/git-fsck-objects.txt
+++ b/Documentation/git-fsck-objects.txt
@@ -1,6 +1,5 @@
 git-fsck-objects(1)
 ===================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
--- a/Documentation/git-grep.txt
+++ b/Documentation/git-grep.txt
@@ -1,6 +1,5 @@
 git-grep(1)
 ===========
-v0.99.6, Sep 2005
 
 NAME
 ----
diff --git a/Documentation/git-hash-object.txt b/Documentation/git-hash-object.txt
--- a/Documentation/git-hash-object.txt
+++ b/Documentation/git-hash-object.txt
@@ -1,6 +1,5 @@
 git-hash-object(1)
 ==================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt
--- a/Documentation/git-http-fetch.txt
+++ b/Documentation/git-http-fetch.txt
@@ -1,6 +1,5 @@
 git-http-fetch(1)
 =================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-init-db.txt b/Documentation/git-init-db.txt
--- a/Documentation/git-init-db.txt
+++ b/Documentation/git-init-db.txt
@@ -1,6 +1,5 @@
 git-init-db(1)
 ==============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-local-fetch.txt b/Documentation/git-local-fetch.txt
--- a/Documentation/git-local-fetch.txt
+++ b/Documentation/git-local-fetch.txt
@@ -1,6 +1,5 @@
 git-local-fetch(1)
 ==================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -1,6 +1,5 @@
 git-log(1)
 ==========
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-ls-remote.txt b/Documentation/git-ls-remote.txt
--- a/Documentation/git-ls-remote.txt
+++ b/Documentation/git-ls-remote.txt
@@ -1,6 +1,5 @@
 git-ls-remote(1)
 ================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-ls-tree.txt b/Documentation/git-ls-tree.txt
--- a/Documentation/git-ls-tree.txt
+++ b/Documentation/git-ls-tree.txt
@@ -1,6 +1,5 @@
 git-ls-tree(1)
 ==============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-merge-base.txt b/Documentation/git-merge-base.txt
--- a/Documentation/git-merge-base.txt
+++ b/Documentation/git-merge-base.txt
@@ -1,6 +1,5 @@
 git-merge-base(1)
 =================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-merge-index.txt b/Documentation/git-merge-index.txt
--- a/Documentation/git-merge-index.txt
+++ b/Documentation/git-merge-index.txt
@@ -1,6 +1,5 @@
 git-merge-index(1)
 ==================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-merge-one-file.txt b/Documentation/git-merge-one-file.txt
--- a/Documentation/git-merge-one-file.txt
+++ b/Documentation/git-merge-one-file.txt
@@ -1,6 +1,5 @@
 git-merge-one-file(1)
 =====================
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
--- a/Documentation/git-merge.txt
+++ b/Documentation/git-merge.txt
@@ -1,6 +1,5 @@
 git-merge(1)
 ============
-v0.99.6, Sep 2005
 
 NAME
 ----
diff --git a/Documentation/git-mktag.txt b/Documentation/git-mktag.txt
--- a/Documentation/git-mktag.txt
+++ b/Documentation/git-mktag.txt
@@ -1,6 +1,5 @@
 git-mktag(1)
 ============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-octopus.txt b/Documentation/git-octopus.txt
--- a/Documentation/git-octopus.txt
+++ b/Documentation/git-octopus.txt
@@ -1,6 +1,5 @@
 git-octopus(1)
 ==============
-v0.99.5, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-pack-objects.txt b/Documentation/git-pack-objects.txt
--- a/Documentation/git-pack-objects.txt
+++ b/Documentation/git-pack-objects.txt
@@ -1,6 +1,5 @@
 git-pack-objects(1)
 ===================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-peek-remote.txt b/Documentation/git-peek-remote.txt
--- a/Documentation/git-peek-remote.txt
+++ b/Documentation/git-peek-remote.txt
@@ -1,6 +1,5 @@
 git-peek-remote(1)
 ==================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-prune-packed.txt b/Documentation/git-prune-packed.txt
--- a/Documentation/git-prune-packed.txt
+++ b/Documentation/git-prune-packed.txt
@@ -1,6 +1,5 @@
 git-prune-packed(1)
 =====================
-v0.1, August 2005
 
 NAME
 ----
diff --git a/Documentation/git-prune.txt b/Documentation/git-prune.txt
--- a/Documentation/git-prune.txt
+++ b/Documentation/git-prune.txt
@@ -1,6 +1,5 @@
 git-prune(1)
 ============
-v0.99.5, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt
--- a/Documentation/git-pull.txt
+++ b/Documentation/git-pull.txt
@@ -1,6 +1,5 @@
 git-pull(1)
 ===========
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -1,6 +1,5 @@
 git-read-tree(1)
 ================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-receive-pack.txt b/Documentation/git-receive-pack.txt
--- a/Documentation/git-receive-pack.txt
+++ b/Documentation/git-receive-pack.txt
@@ -1,6 +1,5 @@
 git-receive-pack(1)
 ===================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-rename.txt b/Documentation/git-rename.txt
--- a/Documentation/git-rename.txt
+++ b/Documentation/git-rename.txt
@@ -1,6 +1,5 @@
 git-rename(1)
 =============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-repack.txt b/Documentation/git-repack.txt
--- a/Documentation/git-repack.txt
+++ b/Documentation/git-repack.txt
@@ -1,6 +1,5 @@
 git-repack(1)
 =============
-v0.99.5, August 2005
 
 NAME
 ----
diff --git a/Documentation/git-resolve.txt b/Documentation/git-resolve.txt
--- a/Documentation/git-resolve.txt
+++ b/Documentation/git-resolve.txt
@@ -1,6 +1,5 @@
 git-resolve(1)
 ==============
-v0.99.5, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-rev-list.txt b/Documentation/git-rev-list.txt
--- a/Documentation/git-rev-list.txt
+++ b/Documentation/git-rev-list.txt
@@ -1,6 +1,5 @@
 git-rev-list(1)
 ===============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt
--- a/Documentation/git-send-email.txt
+++ b/Documentation/git-send-email.txt
@@ -1,6 +1,5 @@
 git-send-email(1)
 =================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-send-pack.txt b/Documentation/git-send-pack.txt
--- a/Documentation/git-send-pack.txt
+++ b/Documentation/git-send-pack.txt
@@ -1,6 +1,5 @@
 git-send-pack(1)
 ================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-shortlog.txt b/Documentation/git-shortlog.txt
--- a/Documentation/git-shortlog.txt
+++ b/Documentation/git-shortlog.txt
@@ -1,6 +1,5 @@
 git-shortlog(1)
 ===============
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-show-branch.txt b/Documentation/git-show-branch.txt
--- a/Documentation/git-show-branch.txt
+++ b/Documentation/git-show-branch.txt
@@ -1,6 +1,5 @@
 git-show-branch(1)
 ==================
-v0.99.5, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-show-index.txt b/Documentation/git-show-index.txt
--- a/Documentation/git-show-index.txt
+++ b/Documentation/git-show-index.txt
@@ -1,6 +1,5 @@
 git-show-index(1)
 =================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-ssh-fetch.txt b/Documentation/git-ssh-fetch.txt
--- a/Documentation/git-ssh-fetch.txt
+++ b/Documentation/git-ssh-fetch.txt
@@ -1,6 +1,5 @@
 git-ssh-fetch(1)
 ================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-ssh-upload.txt b/Documentation/git-ssh-upload.txt
--- a/Documentation/git-ssh-upload.txt
+++ b/Documentation/git-ssh-upload.txt
@@ -1,6 +1,5 @@
 git-ssh-upload(1)
 =================
-v0.1, Jun 2005
 
 NAME
 ----
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -1,6 +1,5 @@
 git-status(1)
 =============
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-tag.txt b/Documentation/git-tag.txt
--- a/Documentation/git-tag.txt
+++ b/Documentation/git-tag.txt
@@ -1,6 +1,5 @@
 git-tag(1)
 ==========
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-tar-tree.txt b/Documentation/git-tar-tree.txt
--- a/Documentation/git-tar-tree.txt
+++ b/Documentation/git-tar-tree.txt
@@ -1,6 +1,5 @@
 git-tar-tree(1)
 ===============
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-unpack-file.txt b/Documentation/git-unpack-file.txt
--- a/Documentation/git-unpack-file.txt
+++ b/Documentation/git-unpack-file.txt
@@ -1,6 +1,5 @@
 git-unpack-file(1)
 ==================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git-unpack-objects.txt b/Documentation/git-unpack-objects.txt
--- a/Documentation/git-unpack-objects.txt
+++ b/Documentation/git-unpack-objects.txt
@@ -1,6 +1,5 @@
 git-unpack-objects(1)
 =====================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-update-server-info.txt b/Documentation/git-update-server-info.txt
--- a/Documentation/git-update-server-info.txt
+++ b/Documentation/git-update-server-info.txt
@@ -1,6 +1,5 @@
 git-update-server-info(1)
 =========================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-upload-pack.txt b/Documentation/git-upload-pack.txt
--- a/Documentation/git-upload-pack.txt
+++ b/Documentation/git-upload-pack.txt
@@ -1,6 +1,5 @@
 git-upload-pack(1)
 ==================
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-var.txt b/Documentation/git-var.txt
--- a/Documentation/git-var.txt
+++ b/Documentation/git-var.txt
@@ -1,6 +1,5 @@
 git-var(1)
 ==========
-v0.1, July 2005
 
 NAME
 ----
diff --git a/Documentation/git-verify-pack.txt b/Documentation/git-verify-pack.txt
--- a/Documentation/git-verify-pack.txt
+++ b/Documentation/git-verify-pack.txt
@@ -1,6 +1,5 @@
 git-verify-pack(1)
 ==================
-v0.1, June 2005
 
 NAME
 ----
diff --git a/Documentation/git-whatchanged.txt b/Documentation/git-whatchanged.txt
--- a/Documentation/git-whatchanged.txt
+++ b/Documentation/git-whatchanged.txt
@@ -1,6 +1,5 @@
 git-whatchanged(1)
 ==================
-v0.99.4, Aug 2005
 
 NAME
 ----
diff --git a/Documentation/git-write-tree.txt b/Documentation/git-write-tree.txt
--- a/Documentation/git-write-tree.txt
+++ b/Documentation/git-write-tree.txt
@@ -1,6 +1,5 @@
 git-write-tree(1)
 =================
-v0.1, May 2005
 
 NAME
 ----
diff --git a/Documentation/git.txt b/Documentation/git.txt
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -1,6 +1,5 @@
 git(7)
 ======
-v0.99.6, Sep 2005
 
 NAME
 ----
diff --git a/Documentation/hooks.txt b/Documentation/hooks.txt
--- a/Documentation/hooks.txt
+++ b/Documentation/hooks.txt
@@ -1,6 +1,5 @@
 Hooks used by GIT
 =================
-v0.99.6, Sep 2005
 
 Hooks are little scripts you can place in `$GIT_DIR/hooks`
 directory to trigger action at certain points.  When
diff --git a/Documentation/repository-layout.txt b/Documentation/repository-layout.txt
--- a/Documentation/repository-layout.txt
+++ b/Documentation/repository-layout.txt
@@ -1,6 +1,5 @@
 GIT repository layout
 =====================
-v0.99.5, Sep 2005
 
 You may find these things in your git repository (`.git`
 directory for a repository associated with your working tree, or
diff --git a/Documentation/tutorial.txt b/Documentation/tutorial.txt
--- a/Documentation/tutorial.txt
+++ b/Documentation/tutorial.txt
@@ -1,6 +1,5 @@
 A short git tutorial
 ====================
-v0.99.5, Aug 2005
 
 Introduction
 ------------

^ permalink raw reply

* Re: Notes and questions while reading the documentation
From: Christian Meder @ 2005-10-10 21:22 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7v1x2zfsp2.fsf@assigned-by-dhcp.cox.net>

Sorry for being slow.

On Wed, 2005-10-05 at 16:30 -0700, Junio C Hamano wrote:
> Christian Meder <chris@absolutegiganten.org> writes:
> 
> > * a lot of the manpages include something like "v0.1, June 2005" in the
> > header; these versions tags are pretty obscure to interpret, timestamp
> > when last edited ? version of the manpage ? version of git when the
> > manpage was included ? maturity the author assigned to the content ?
> > If these tags don't follow some sane schema they should be removed.
> 
> I think the original intent was the last modification datestamp
> and the version of the documentation, but I agree it should be
> removed.  I do not think they show on the HTML version, nor man
> pages, although I have to admit that I haven't looked at
> generated manpages for some time.

Ok. I've done a patch to remove them in a separate email.

> > * the usage of git, Git and GIT isn't consistent in the documentation.
> > I'd vote for only using git.
> 
> Sounds sane.  What would we do if we need to start sentences with it?

I prepared a patch which changes all usages to git even at the beginning
of sentences.  

> > * git-clone says that http transport is not supported yet I used it to
> > clone the git repo from kernel.org yesterday. Should the documentation
> > get updated ?
> 
> Thanks for noticing.  Yes, now HTTP can handle both of the
> trickier setups (packed, and alternates); credit goes to Daniel.

I noted it down for my second sweep.

> > * the manpage synopsises aren't consistent wrt command naming; it's "git
> > commit" but "git-branch"; I guess all the manpages should reference
> > their commands as "git-x" and not "git x"
> 
> Agreed.
> 

Ok. Patch in separate email.


				Christian

-- 
Christian Meder, email: chris@absolutegiganten.org

The Way-Seeking Mind of a tenzo is actualized 
by rolling up your sleeves.

                (Eihei Dogen Zenji)

^ permalink raw reply

* Re: openbsd version?
From: Randal L. Schwartz @ 2005-10-10 21:05 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Johannes Schindelin, Junio C Hamano, git
In-Reply-To: <434AD742.2090109@zytor.com>

>>>>> "H" == H Peter Anvin <hpa@zytor.com> writes:

H> Sounds like an offer to send Mr. Schwartz some notes to work from.  In
H> my experience, sending notes to a good tech writer is about an order
H> of magnitude less painful than writing polished documentation, so that
H> should be easier.

Since I'm benefitting from this project, I'd be happy to offer my services
as time permits.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

^ permalink raw reply

* Re: openbsd version?
From: H. Peter Anvin @ 2005-10-10 21:04 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: Johannes Schindelin, Junio C Hamano, git
In-Reply-To: <86y851aydl.fsf@blue.stonehenge.com>

Randal L. Schwartz wrote:
> 
> Johannes> <optimism>Maybe he who found the documentation lacking is going to fix 
> Johannes> it?</optimism>
> 
> I'd be happy to do that.  But as a tech writer, I know that it's
> insane to not work at least from an implementor's rough draft, to at
> least understand the intent of a mechanism, if not the precise design.
> There's no implementor's rough draft here, so I can't help.
> 

Sounds like an offer to send Mr. Schwartz some notes to work from.  In 
my experience, sending notes to a good tech writer is about an order of 
magnitude less painful than writing polished documentation, so that 
should be easier.

	-hpa

^ permalink raw reply

* Re: openbsd version?
From: Sven Verdoolaege @ 2005-10-10 21:00 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Randal L. Schwartz, git
In-Reply-To: <7vll113yjs.fsf@assigned-by-dhcp.cox.net>

On Mon, Oct 10, 2005 at 01:30:15PM -0700, Junio C Hamano wrote:
> Removing from the tip of non-current branch:
> 
> $ git update-ref mybranch mybranch^
> 

I think you mean 

$ git-update-ref refs/heads/mybranch mybranch^

Which reminds me... try this:

bash-3.00$ git-init-db 
defaulting to local storage area
bash-3.00$ touch a
bash-3.00$ git-update-index --add a
bash-3.00$ git commit -m 'a'
Committing initial tree 496d6428b9cf92981dc9495211e6e1120fb6f2ba
bash-3.00$ touch b
bash-3.00$ git-update-index --add b
bash-3.00$ git commit -m 'b'
bash-3.00$ git checkout -b branch
bash-3.00$ git-update-ref master master^
bash-3.00$ git checkout master
bash-3.00$ git-status
#
# Updated but not checked in:
#   (will commit)
#
#       deleted:  b
#

(Hint: there are now two masters)

skimo

^ permalink raw reply

* Re: First cut at git port to Cygwin
From: H. Peter Anvin @ 2005-10-10 20:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Schindelin, git, Linus Torvalds
In-Reply-To: <7vhdbp3yd7.fsf@assigned-by-dhcp.cox.net>

Junio C Hamano wrote:
> "H. Peter Anvin" <hpa@zytor.com> writes:
> 
> 
>>>>Junio C Hamano wrote:
>>>>
>>>>
>>>>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>>>>>correctly we do not write file via mmap -- at least we do not
>>>>>intend to.
>>>>>
>>
>>In the above sentence, emphasis on "at least we do not intend to."  If 
>>writes are done legitimately then that's fine, but we shouldn't have 
>>"accidental writes" -- those would be program bugs!
> 
> 
> What I meant to say was "we do not intend to write back the
> changes by expecting the modification on mapped area are written
> back by mmap() mechanism -- the updates to index file is done by
> creat - write - close - rename".  So your saying "the overkill
> being actively wrong" was technically correct, but that wrongly
> written data was renamed out anyway and no real harm was done.

Well, it broke the atomicity of an operation, which *is* a real problem.

Anyway, malloc+read is a dead ringer for MAP_PRIVATE with PROT_WRITE, so 
that makes it even easier to mimic.

	-hpa

^ permalink raw reply

* Deal with $(bindir) and friends with whitespaces.
From: Junio C Hamano @ 2005-10-10 20:52 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: git
In-Reply-To: <434AA033.60308@zytor.com>

... using HPA's shellquote macro.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---

 I only tested that this passes "Anna's Home" test:

	make	HOME="/tmp/Anna's Home" \
		PERL_PATH="Anna's Home/Program Directory/perl"  \
		PYTHON_PATH="Anna's Home/Program Directory/python" \
		test install

 Makefile               |   34 ++++++++++++++++++++--------------
 git-merge-recursive.py |    2 +-
 t/Makefile             |    8 +++++++-
 templates/Makefile     |   10 ++++++++--
 4 files changed, 36 insertions(+), 18 deletions(-)

applies-to: a35b27b04d18022ea4731941ea2a1bedce998092
8f77be8002b9e254ccb5cc3ed3ad1b9240289f7c
diff --git a/Makefile b/Makefile
index ac384c7..f7eee47 100644
--- a/Makefile
+++ b/Makefile
@@ -163,6 +163,12 @@ LIB_OBJS = \
 LIBS = $(LIB_FILE)
 LIBS += -lz
 
+# Shell quote;
+# Result of this needs to be placed inside ''
+shq = $(subst ','\'',$(1))
+# This has surrounding ''
+shellquote = '$(call shq,$(1))'
+
 #
 # Platform specific tweaks
 #
@@ -235,7 +241,7 @@ ifndef NO_OPENSSL
 		OPENSSL_LINK =
 	endif
 else
-	DEFINES += '-DNO_OPENSSL'
+	DEFINES += -DNO_OPENSSL
 	MOZILLA_SHA1 = 1
 	OPENSSL_LIBSSL =
 endif
@@ -294,7 +300,7 @@ endif
 endif
 endif
 
-DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'
+DEFINES += -DSHA1_HEADER=$(call shellquote,$(SHA1_HEADER))
 
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
@@ -311,7 +317,7 @@ all:
 
 git: git.sh Makefile
 	rm -f $@+ $@
-	sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
+	sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    -e 's/@@X@@/$(X)/g' \
 	    $(GIT_LIST_TWEAK) <$@.sh >$@+
@@ -320,22 +326,22 @@ git: git.sh Makefile
 
 $(filter-out git,$(patsubst %.sh,%,$(SCRIPT_SH))) : % : %.sh
 	rm -f $@
-	sed -e '1s|#!.*/sh|#!$(SHELL_PATH)|' \
+	sed -e '1s|#!.*/sh|#!$(call shq,$(SHELL_PATH))|' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.sh >$@
 	chmod +x $@
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)) : % : %.perl
 	rm -f $@
-	sed -e '1s|#!.*perl|#!$(PERL_PATH)|' \
+	sed -e '1s|#!.*perl|#!$(call shq,$(PERL_PATH))|' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.perl >$@
 	chmod +x $@
 
 $(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
 	rm -f $@
-	sed -e '1s|#!.*python|#!$(PYTHON_PATH)|' \
-	    -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR)|g' \
+	sed -e '1s|#!.*python|#!$(call shq,$(PYTHON_PATH))|' \
+	    -e 's|@@GIT_PYTHON_PATH@@|$(call shq,$(GIT_PYTHON_DIR))|g' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.py >$@
 	chmod +x $@
@@ -365,7 +371,7 @@ git-rev-list$X: LIBS += $(OPENSSL_LIBSSL
 
 init-db.o: init-db.c
 	$(CC) -c $(ALL_CFLAGS) \
-		-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir)"' $*.c
+		-DDEFAULT_GIT_TEMPLATE_DIR=$(call shellquote,"$(template_dir)") $*.c
 
 $(LIB_OBJS): $(LIB_H)
 $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H)
@@ -397,13 +403,13 @@ check:
 ### Installation rules
 
 install: $(PROGRAMS) $(SCRIPTS)
-	$(INSTALL) -d -m755 $(DESTDIR)$(bindir)
-	$(INSTALL) $(PROGRAMS) $(SCRIPTS) $(DESTDIR)$(bindir)
-	$(INSTALL) git-revert $(DESTDIR)$(bindir)/git-cherry-pick
-	sh ./cmd-rename.sh $(DESTDIR)$(bindir)
+	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(bindir))
+	$(INSTALL) $(PROGRAMS) $(SCRIPTS) $(call shellquote,$(DESTDIR)$(bindir))
+	$(INSTALL) git-revert $(call shellquote,$(DESTDIR)$(bindir)/git-cherry-pick)
+	sh ./cmd-rename.sh $(call shellquote,$(DESTDIR)$(bindir))
 	$(MAKE) -C templates install
-	$(INSTALL) -d -m755 $(DESTDIR)$(GIT_PYTHON_DIR)
-	$(INSTALL) $(PYMODULES) $(DESTDIR)$(GIT_PYTHON_DIR)
+	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
+	$(INSTALL) $(PYMODULES) $(call shellquote,$(DESTDIR)$(GIT_PYTHON_DIR))
 
 install-doc:
 	$(MAKE) -C Documentation install
diff --git a/git-merge-recursive.py b/git-merge-recursive.py
index b80a860..626d854 100755
--- a/git-merge-recursive.py
+++ b/git-merge-recursive.py
@@ -4,7 +4,7 @@ import sys, math, random, os, re, signal
 from heapq import heappush, heappop
 from sets import Set
 
-sys.path.append('@@GIT_PYTHON_PATH@@')
+sys.path.append('''@@GIT_PYTHON_PATH@@''')
 from gitMergeCommon import *
 
 originalIndexFile = os.environ.get('GIT_INDEX_FILE',
diff --git a/t/Makefile b/t/Makefile
index e71da77..5c76aff 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -7,10 +7,16 @@
 SHELL_PATH ?= $(SHELL)
 TAR ?= $(TAR)
 
+# Shell quote;
+# Result of this needs to be placed inside ''
+shq = $(subst ','\'',$(1))
+# This has surrounding ''
+shellquote = '$(call shq,$(1))'
+
 T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
 
 all:
-	@$(foreach t,$T,echo "*** $t ***"; $(SHELL_PATH) $t $(GIT_TEST_OPTS) || exit; )
+	@$(foreach t,$T,echo "*** $t ***"; $(call shellquote,$(SHELL_PATH)) $t $(GIT_TEST_OPTS) || exit; )
 	@rm -fr trash
 
 clean:
diff --git a/templates/Makefile b/templates/Makefile
index c23aee8..07e928e 100644
--- a/templates/Makefile
+++ b/templates/Makefile
@@ -6,6 +6,12 @@ prefix ?= $(HOME)
 template_dir ?= $(prefix)/share/git-core/templates/
 # DESTDIR=
 
+# Shell quote;
+# Result of this needs to be placed inside ''
+shq = $(subst ','\'',$(1))
+# This has surrounding ''
+shellquote = '$(call shq,$(1))'
+
 all: boilerplates.made custom
 	find blt
 
@@ -38,6 +44,6 @@ clean:
 	rm -rf blt boilerplates.made
 
 install: all
-	$(INSTALL) -d -m755 $(DESTDIR)$(template_dir)
+	$(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir))
 	(cd blt && $(TAR) cf - .) | \
-	(cd $(DESTDIR)$(template_dir) && $(TAR) xf -)
+	(cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)
---
0.99.8.GIT

^ permalink raw reply related

* Re: SVN import
From: Matthias Urlichs @ 2005-10-10 20:52 UTC (permalink / raw)
  To: Yasushi SHOJI; +Cc: git
In-Reply-To: <87y851yvfn.wl@mail2.atmark-techno.com>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

Hi,

Yasushi SHOJI:
> anyway, here is another one if you are interested in.  svnimport
> doesn't seems to handle -t option, or what am i missing?
> 
At first glance: you're only doing one check-in, which the -s2 option
therefore conveniently skips. git-svnimport therefore does nothing. ;-)

NB: Please put thpse svn scripts into a bunch of testcases, and send me a
    patch...

-- 
Matthias Urlichs   |   {M:U} IT Design @ m-u-it.de   |  smurf@smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
 - -
"When a man is tired of Ankh-Morpork, he is tired of ankle-deep slurry."
		-- Terry Pratchett (Mort)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply

* Re: openbsd version?
From: Randal L. Schwartz @ 2005-10-10 20:52 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: Junio C Hamano, git
In-Reply-To: <Pine.LNX.4.63.0510102248570.10402@wbgn013.biozentrum.uni-wuerzburg.de>

>>>>> "Johannes" == Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

>> <sarcasm>Undocumented secret switches.  Nice.</sarcasm>  No wonder
>> I couldn't find it.

Johannes> <optimism>Maybe he who found the documentation lacking is going to fix 
Johannes> it?</optimism>

I'd be happy to do that.  But as a tech writer, I know that it's
insane to not work at least from an implementor's rough draft, to at
least understand the intent of a mechanism, if not the precise design.
There's no implementor's rough draft here, so I can't help.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

^ permalink raw reply

* [PATCH 3/3] Trivial optimization
From: H. Peter Anvin @ 2005-10-10 20:50 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 03-git-dir-environment-is-always-a-string-literal.patch --]
[-- Type: text/x-patch, Size: 971 bytes --]

GIT_DIR_ENVIRONMENT is always a string literal

---
commit db6b7c2ba5e59184de22c55b36c21b5ef94da325
tree dc809b653f9d7dcfa096ca763987ccb0e87599ba
parent 16e46159b554116a7d95a206913fcdf7e79e07d0
author Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:33:51 -0700
committer Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:33:51 -0700

 rsh.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/rsh.c b/rsh.c
index 8278eab..64c4809 100644
--- a/rsh.c
+++ b/rsh.c
@@ -73,8 +73,7 @@ int setup_connection(int *fd_in, int *fd
 	posn = command;
 	of = 0;
 	of |= add_to_string(&posn, &sizen, "env ", 0);
-	of |= add_to_string(&posn, &sizen, GIT_DIR_ENVIRONMENT, 0);
-	of |= add_to_string(&posn, &sizen, "=", 0);
+	of |= add_to_string(&posn, &sizen, GIT_DIR_ENVIRONMENT "=", 0);
 	of |= add_to_string(&posn, &sizen, path, 1);
 	of |= add_to_string(&posn, &sizen, " ", 0);
 	of |= add_to_string(&posn, &sizen, remote_prog, 1);

^ permalink raw reply related

* [PATCH 2/3] Make rsh.c use sq_quote_buf()
From: H. Peter Anvin @ 2005-10-10 20:50 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 02-make-rsh-c-use-sq-quote-buf.patch --]
[-- Type: text/x-patch, Size: 1854 bytes --]

Make rsh.c use sq_quote_buf()

---
commit 16e46159b554116a7d95a206913fcdf7e79e07d0
tree c075951382add702148d7a2c2b4e0298efab8082
parent cc114823f72bd8d912abf7f7a7515853c554a9f3
author Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:23:44 -0700
committer Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:23:44 -0700

 rsh.c |   46 +++++-----------------------------------------
 1 files changed, 5 insertions(+), 41 deletions(-)

diff --git a/rsh.c b/rsh.c
index bad5cff..8278eab 100644
--- a/rsh.c
+++ b/rsh.c
@@ -1,52 +1,16 @@
-#include "rsh.h"
-
 #include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 
+#include "rsh.h"
+#include "quote.h"
 #include "cache.h"
 
 #define COMMAND_SIZE 4096
 
 /*
- * Write a shell-quoted version of a string into a buffer, and
- * return bytes that ought to be output excluding final null.
- */
-static int shell_quote(char *buf, int nmax, const char *str)
-{
-	char ch;
-	int nq;
-	int oc = 0;
-
-	while ( (ch = *str++) ) {
-		nq = 0;
-		if ( strchr(" !\"#$%&\'()*;<=>?[\\]^`{|}", ch) )
-			nq = 1;
-
-		if ( nq ) {
-			if ( nmax > 1 ) {
-				*buf++ = '\\';
-				nmax--;
-			}
-			oc++;
-		}
-
-		if ( nmax > 1 ) {
-			*buf++ = ch;
-			nmax--;
-		}
-		oc++;
-	}
-
-	if ( nmax )
-		*buf = '\0';
-
-	return oc;
-}
-			
-/*
- * Append a string to a string buffer, with or without quoting.  Return true
- * if the buffer overflowed.
+ * Append a string to a string buffer, with or without shell quoting.
+ * Return true if the buffer overflowed.
  */
 static int add_to_string(char **ptrp, int *sizep, const char *str, int quote)
 {
@@ -56,7 +20,7 @@ static int add_to_string(char **ptrp, in
 	int err = 0;
 
 	if ( quote ) {
-		oc = shell_quote(p, size, str);
+		oc = sq_quote_buf(p, size, str);
 	} else {
 		oc = strlen(str);
 		memcpy(p, str, (oc >= size) ? size-1 : oc);

^ permalink raw reply related

* [PATCH 1/3] Enhanced sq_quote()
From: H. Peter Anvin @ 2005-10-10 20:49 UTC (permalink / raw)
  To: Git Mailing List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 01-create-function-to-sq-quote-into-a-buffer.patch --]
[-- Type: text/x-patch, Size: 3248 bytes --]

Create function to sq_quote into a buffer
Handle !'s for csh-based shells

Signed-off-by: H. Peter Anvin <hpa@zytor.com>

---
commit cc114823f72bd8d912abf7f7a7515853c554a9f3
tree 9766b638ae175b9206855f2613e07507ed51fbca
parent d5b0c9ea178dab3599674ccff50645c0464b8c31
author Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:21:35 -0700
committer Peter Anvin <hpa@tazenda.sc.orionmulti.com> Mon, 10 Oct 2005 12:21:35 -0700

 quote.c |   56 ++++++++++++++++++++++++++++++++++----------------------
 quote.h |   11 +++++++++--
 2 files changed, 43 insertions(+), 24 deletions(-)

diff --git a/quote.c b/quote.c
index 5e6fda3..9d5d0bc 100644
--- a/quote.c
+++ b/quote.c
@@ -2,40 +2,52 @@
 #include "quote.h"
 
 /* Help to copy the thing properly quoted for the shell safety.
- * any single quote is replaced with '\'', and the caller is
- * expected to enclose the result within a single quote pair.
+ * any single quote is replaced with '\'', any exclamation point
+ * is replaced with '\!', and the whole thing is enclosed in a
  *
  * E.g.
  *  original     sq_quote     result
  *  name     ==> name      ==> 'name'
  *  a b      ==> a b       ==> 'a b'
  *  a'b      ==> a'\''b    ==> 'a'\''b'
+ *  a!b      ==> a'\!'b    ==> 'a'\!'b'
  */
-char *sq_quote(const char *src)
+#define EMIT(x) ( (++len < n) && (*bp++ = (x)) )
+
+size_t sq_quote_buf(char *dst, size_t n, const char *src)
 {
-	static char *buf = NULL;
-	int cnt, c;
-	const char *cp;
-	char *bp;
-
-	/* count bytes needed to store the quoted string. */
-	for (cnt = 3, cp = src; *cp; cnt++, cp++)
-		if (*cp == '\'')
-			cnt += 3;
+	char c;
+	char *bp = dst;
+	size_t len = 0;
 
-	buf = xmalloc(cnt);
-	bp = buf;
-	*bp++ = '\'';
+	EMIT('\'');
 	while ((c = *src++)) {
-		if (c != '\'')
-			*bp++ = c;
-		else {
-			bp = strcpy(bp, "'\\''");
-			bp += 4;
+		if (c == '\'' || c == '!') {
+			EMIT('\'');
+			EMIT('\\');
+			EMIT(c);
+			EMIT('\'');
+		} else {
+			EMIT(c);
 		}
 	}
-	*bp++ = '\'';
-	*bp = 0;
+	EMIT('\'');
+
+	if ( n )
+		*bp = 0;
+
+	return len;
+}
+
+char *sq_quote(const char *src)
+{
+	char *buf;
+	size_t cnt;
+
+	cnt = sq_quote_buf(NULL, 0, src) + 1;
+	buf = xmalloc(cnt);
+	sq_quote_buf(buf, cnt, src);
+
 	return buf;
 }
 
diff --git a/quote.h b/quote.h
index c8cfb3a..50ce1df 100644
--- a/quote.h
+++ b/quote.h
@@ -1,10 +1,12 @@
 #ifndef QUOTE_H
 #define QUOTE_H
 
+#include <stddef.h>
 
 /* Help to copy the thing properly quoted for the shell safety.
- * any single quote is replaced with '\'', and the whole thing
- * is enclosed in a single quote pair.
+ * any single quote is replaced with '\'', any exclamation point
+ * is replaced with '\!', and the whole thing is enclosed in a
+ * single quote pair.
  *
  * For example, if you are passing the result to system() as an
  * argument:
@@ -19,8 +21,13 @@
  *
  * Note that the above examples leak memory!  Remember to free result from
  * sq_quote() in a real application.
+ *
+ * sq_quote_buf() writes to an existing buffer of specified size; it
+ * will return the number of characters that would have been written
+ * excluding the final null regardless of the buffer size.
  */
 
 char *sq_quote(const char *src);
+size_t sq_quote_buf(char *dst, size_t n, const char *src);
 
 #endif

^ permalink raw reply related

* Re: openbsd version?
From: Johannes Schindelin @ 2005-10-10 20:49 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: Junio C Hamano, git
In-Reply-To: <86ek6tcdou.fsf@blue.stonehenge.com>

Hi,

On Mon, 10 Oct 2005, Randal L. Schwartz wrote:

> >>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
> 
> Junio> Removing non-current branch -- you may need to do -D instead of -d. 
> 
> Junio> $ git branch -d mybranch
> 
> <sarcasm>Undocumented secret switches.  Nice.</sarcasm>  No wonder
> I couldn't find it.

<optimism>Maybe he who found the documentation lacking is going to fix 
it?</optimism>

^ permalink raw reply

* Re: [PATCH] Teach git-status about spaces in file names also on MacOSX
From: Johannes Schindelin @ 2005-10-10 20:48 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd5md3yb0.fsf@assigned-by-dhcp.cox.net>

Hi,

On Mon, 10 Oct 2005, Junio C Hamano wrote:

> Thanks; not Kai's fault but mine.

By saying that I do not really understand Kai's patch, I wanted to make 
clear that maybe I got that fix all wrong ;-)

Ciao,
Dscho

^ permalink raw reply

* Re: openbsd version?
From: Randal L. Schwartz @ 2005-10-10 20:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git
In-Reply-To: <7vll113yjs.fsf@assigned-by-dhcp.cox.net>

>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:

Junio> Removing non-current branch -- you may need to do -D instead of -d. 

Junio> $ git branch -d mybranch

<sarcasm>Undocumented secret switches.  Nice.</sarcasm>  No wonder
I couldn't find it.

>> That's also a question in general... how can I remove a commit,
>> knowing that I'd never refer to it again?  Or is disk space so cheap
>> that it wouldn't make any difference anyway?

Junio> Removing from the tip of the current branch:

Junio> $ git reset HEAD^

Junio> Removing from the tip of non-current branch:

Junio> $ git update-ref mybranch mybranch^

Do these also flush any related object files?  Or do I need git-fsck still?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

^ permalink raw reply

* Re: [PATCH] Teach git-status about spaces in file names also on MacOSX
From: Junio C Hamano @ 2005-10-10 20:35 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: git, junkio
In-Reply-To: <Pine.LNX.4.63.0510102212230.8106@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> Not that I really understand what Kai's original patch really does, but on
> my iBook, sed does not understand '\t' and consequently cuts of every file
> name at the first "t" (or backslash...).

Thanks; not Kai's fault but mine.

^ permalink raw reply

* Re: First cut at git port to Cygwin
From: Junio C Hamano @ 2005-10-10 20:34 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Johannes Schindelin, git, Linus Torvalds
In-Reply-To: <434AC058.60803@zytor.com>

"H. Peter Anvin" <hpa@zytor.com> writes:

>>>Junio C Hamano wrote:
>>>
>>>>PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
>>>>correctly we do not write file via mmap -- at least we do not
>>>>intend to.
>>>>
>
> In the above sentence, emphasis on "at least we do not intend to."  If 
> writes are done legitimately then that's fine, but we shouldn't have 
> "accidental writes" -- those would be program bugs!

What I meant to say was "we do not intend to write back the
changes by expecting the modification on mapped area are written
back by mmap() mechanism -- the updates to index file is done by
creat - write - close - rename".  So your saying "the overkill
being actively wrong" was technically correct, but that wrongly
written data was renamed out anyway and no real harm was done.

^ permalink raw reply

* Re: openbsd version?
From: Junio C Hamano @ 2005-10-10 20:30 UTC (permalink / raw)
  To: Randal L. Schwartz; +Cc: git
In-Reply-To: <864q7pdvcn.fsf@blue.stonehenge.com>

merlyn@stonehenge.com (Randal L. Schwartz) writes:

> Related question.  I created "mybranch" to do the patch, but how
> can I have my repository now forget that mybranch was ever made?
> Is it sufficient to remove the branch link, and then type some "fsck"
> operation?

Removing non-current branch -- you may need to do -D instead of -d. 

$ git branch -d mybranch

> That's also a question in general... how can I remove a commit,
> knowing that I'd never refer to it again?  Or is disk space so cheap
> that it wouldn't make any difference anyway?

Removing from the tip of the current branch:

$ git reset HEAD^

Removing from the tip of non-current branch:

$ git update-ref mybranch mybranch^

^ permalink raw reply

* Re: First cut at git port to Cygwin
From: Daniel Barkalow @ 2005-10-10 20:27 UTC (permalink / raw)
  To: Johannes Schindelin; +Cc: H. Peter Anvin, Junio C Hamano, git, Linus Torvalds
In-Reply-To: <Pine.LNX.4.63.0510102100010.7688@wbgn013.biozentrum.uni-wuerzburg.de>

On Mon, 10 Oct 2005, Johannes Schindelin wrote:

> Hi,
> 
> On Mon, 10 Oct 2005, H. Peter Anvin wrote:
> 
> > Junio C Hamano wrote:
> > > 
> > > PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> > > correctly we do not write file via mmap -- at least we do not
> > > intend to.
> > > 
> > 
> > Then PROT_READ probably makes more sense?
> 
> Not necessarily. Sometimes you need to annotate the data from the index, 
> and this does not need to be written back to the index file.

In fact, it is intentional that we open the file O_RDONLY, and mmap it 
PROT_READ | PROT_WRITE, MAP_PRIVATE. We prepare the next index in the 
memory where we mapped the old index, but we don't want to change what's 
on the disk using the mapping; we write that later to a different file 
using write().

> > > Yes.  It might have been overkill that you supported writing
> > > changes back, though.
> > 
> > Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
> 
> See above.
> 
> BTW, is there a mechanism to make sure that the index file is locked 
> between reading and writing?

There's definitely locking; the new file is written to "(filename).lock", 
which is openned O_CREAT | O_EXCL, and is moved to the destination when 
it's complete. I believe everything that intends to write a new index gets 
the lock before reading the old index, although I haven't actually 
checked.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply

* Re: SVN import
From: Yasushi SHOJI @ 2005-10-10 20:21 UTC (permalink / raw)
  To: Matthias Urlichs; +Cc: git
In-Reply-To: <20051010185729.GR567@kiste.smurf.noris.de>

At Mon, 10 Oct 2005 20:57:30 +0200,
Matthias Urlichs wrote:
> 
> Yasushi SHOJI:
> > > True. I could add an option which behaves as if everything that's not
> > > recognized is seen as being on the trunk, but ...
> > 
> > hmmm. can libsvn see those file had moved in to the trunk?  don't know
> > how 'svn mv' is treated in svn.
> > 
> see "svn log". The script sees the file, and where it comes from (but
> ignores that).

well, if it can, it'd be nice if svnimport could handle those
files. ;-)

anyway, here is another one if you are interested in.  svnimport
doesn't seems to handle -t option, or what am i missing?

    svnadmin create --fs-type fsfs /tmp/repo
    svn co file:///tmp/repo test
    cd test
    svn mkdir foo
    echo hello > foo/hello.c
    svn add foo/hello.c
    svn ci -m 'add hello.c'
    cd ..
    git-svnimport.perl -t foo -s2 -C /tmp/test.git -i -v file:///tmp/repo
    DONE; creating master branch
    cp: cannot stat `/tmp/test.git/.git/refs/heads/origin': No such file or directory
--
          yashi

^ permalink raw reply

* Re: First cut at git port to Cygwin
From: Junio C Hamano @ 2005-10-10 20:21 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Johannes Schindelin, git, Linus Torvalds
In-Reply-To: <434AC058.60803@zytor.com>

"H. Peter Anvin" <hpa@zytor.com> writes:

> Eh?  If we MAP_PRIVATE, *and* we (intentionally) write to it, we 
> *BETTER* not write anything back.

Correct.

It has already been fixed by Johannes last week and I merged it
over the weekend if not earlier if I recall correctly.

^ permalink raw reply

* [PATCH] Teach git-status about spaces in file names also on MacOSX
From: Johannes Schindelin @ 2005-10-10 20:13 UTC (permalink / raw)
  To: git, junkio


Not that I really understand what Kai's original patch really does, but on
my iBook, sed does not understand '\t' and consequently cuts of every file
name at the first "t" (or backslash...).

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>

---

 git-status.sh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

applies-to: b7dbad9daef37a781daa3942e9258797f23fa635
ab97728bc4bebd99406cefa55de8530b1fe35620
diff --git a/git-status.sh b/git-status.sh
index 6e2783a..fbdd377 100755
--- a/git-status.sh
+++ b/git-status.sh
@@ -45,10 +45,10 @@ then
 	sed -e '
 		s/^:// 
 		h
-		s/^[^\t]*//
+		s/^[^	]*//
 		s/ /\\ /g
 		x
-		s/\t.*$//
+		s/	.*$//
 		G
 		s/\n/ /' |
 	report "Updated but not checked in" "will commit"
@@ -71,10 +71,10 @@ git-diff-files |
 sed -e '
 	s/^:// 
 	h
-	s/^[^\t]*//
+	s/^[^	]*//
 	s/ /\\ /g
 	x
-	s/\t.*$//
+	s/	.*$//
 	G
 	s/\n/ /' |
 report "Changed but not updated" "use git-update-index to mark for commit"
---
0.99.8.GIT

^ permalink raw reply related

* Re: [RFC] Cleaning up die() error messages
From: Daniel Barkalow @ 2005-10-10 20:14 UTC (permalink / raw)
  To: Elfyn McBratney; +Cc: git mailing list
In-Reply-To: <20051010105008.GB30202@gentoo.org>

On Mon, 10 Oct 2005, Elfyn McBratney wrote:

> 	[C sources]
> 	static char *prog;
> 	..
> 	static inline void set_prog_name (char *argv0)
> 	{
> 		prog = strrchr(argv0, '/');
> 		if (prog)
> 			prog++;
> 		else
> 			prog = argv0;
> 	}
> 	..
> 	int main (int argc, char **argv)
> 	{
> 		set_prog_name(argv[0]);
> 		..
> 		if (!do_bar())
> 			die("%s: do_bar() failed", prog);
> 		..
> 	}

Just put set_prog_name() next to die(), and have die() write "prog: " at 
the beginning if set_prog_name() got called. Assuming it's useful at all 
to show the name of the program, it's not going to be less useful if the 
error is actually found in a library function called by the program.

	-Daniel
*This .sig left intentionally blank*

^ permalink raw reply

* Re: First cut at git port to Cygwin
From: Johannes Schindelin @ 2005-10-10 19:42 UTC (permalink / raw)
  To: H. Peter Anvin; +Cc: Junio C Hamano, git, Linus Torvalds
In-Reply-To: <434AC058.60803@zytor.com>

Hi,

On Mon, 10 Oct 2005, H. Peter Anvin wrote:

> Johannes Schindelin wrote:
> > 
> > > Junio C Hamano wrote:
> > > 
> > > > PROT_WRITE is true, but we do MAP_PRIVATE, and if I recall
> > > > correctly we do not write file via mmap -- at least we do not
> > > > intend to.
> > > > 
> > > 
> > > Then PROT_READ probably makes more sense?
> > 
> > Not necessarily. Sometimes you need to annotate the data from the index, and
> > this does not need to be written back to the index file.
> > 
> 
> In the above sentence, emphasis on "at least we do not intend to."  If writes
> are done legitimately then that's fine, but we shouldn't have "accidental
> writes" -- those would be program bugs!

Yes, those would be bugs. However, if I understood the man page for mmap() 
correctly, then PROT_WRITE && MAP_PRIVATE makes the data copy-on-write, 
which means that those bugs would have been found (because the changes 
would no longer be present when git was called the next time). And I 
checked: all mmap() calls in git are MAP_PRIVATE.

> > > > Yes.  It might have been overkill that you supported writing
> > > > changes back, though.
> > > 
> > > Not just overkill; if we do MAP_PRIVATE it's actively WRONG.
> > 
> > See above.
> > 
> 
> Eh?  If we MAP_PRIVATE, *and* we (intentionally) write to it, we *BETTER* not
> write anything back.

Yes. That was *my* mistake.

Ciao,
Dscho

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox