git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: David Greaves <david@dgreaves.com>
Cc: git@vger.kernel.org
Subject: Re: Quick command reference
Date: Sun, 01 May 2005 12:27:23 -0700	[thread overview]
Message-ID: <7v4qdmu4pw.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <42750D06.70004@dgreaves.com> (David Greaves's message of "Sun, 01 May 2005 18:08:22 +0100")

>>>>> "DG" == David Greaves <david@dgreaves.com> writes:

After I sent my endorsements, I noticed some nits so I pick them
here.  As you already know, you would also need to adjust to the
big git-* renaming.

DG> 	[Eventually may be replaced with <tree> if <tree> means
DG> 	<tree/commit> in all commands]

Probably not.  I think commit-tree should insist on its first
parameter being a tree not a commit for example, so I would drop
this comment.

Also tags are included in tree/commit class for some but
probably not all commands these days.  How about coming up with
a short-and-sweet name like <tree-id> and use it instead of
<tree/commit>?  You would need <commit-id> as well because tags
can be auto-dereferenced to commits by certain commands.

DG> <type>
DG> 	Indicates that an object type is required.
DG> 	Currently one of: blob/tree/commit

That's:

	Currently one of: blob/commit/tag/tree

DG> <file>
DG> 	Indicates a filename - often includes leading path
DG> <path>
DG> 	Indicates the path of a file (is this ever useful?)

I do not know what you wanted to distinguish by having separate
<file> and <path>.  There is only one thing.

We may want to mention that Core GIT expects the commands to run
from the directory that corresponds to the root level of the
tree structure GIT_INDEX_FILE describes, and the path/file
(whichever name you pick) are expected to be relative to that
directory.  No absolute paths, no ./relative paths with leading
dot-slash.

DG> ################################################################
DG> cat-file
DG> 	cat-file (-t | <type>) <object>
DG> ...
DG> <type>
DG> 	One of: blob/tree/commit
DG> ...
DG> Output
DG> If -t is specified, one of:
DG>         blob/tree/commit

Let's not list the type but refer the reader to the top part of
the document that lists the type.

DG> ################################################################
DG> checkout-cache
DG> ... Note that the file contents are
DG> restored - NOT the file permissions.
DG> ??? l 58 checkout-cache.c says restore executable bit.

So which is correct?

DG> ################################################################
DG> diff-tree-helper
DG> 	diff-tree-helper [-z]

Update:
	diff-tree-helper [-z] [-R]

Add:
        -R	generate the patch in reverse.

DG> ################################################################
DG> fsck-cache
DG> 	fsck-cache [[--unreachable] <commit>*]

--root?

DG> ################################################################
DG> show-diff
DG> 	show-diff [-p] [-q] [-s] [-z] [paths...]

After big git-* rename this became git-diff-files; just to keep
an eye on when you do the updates.

DG> ################################################################
DG> show-files

And this one is now git-ls-files.

DG> ################################################################
DG> unpack-file
DG> 	unpack-file <blob>

Add:

    Note that the temporary file is created with mkstemp(3) and it
    would have permission 0600 or 0666 depending on your glibc
    version.  Make sure to fix the permission if you use this in
    your script.

DG> ################################################################
DG> Generating patches

Please drop the following part.  GIT_DIFF_CMD is not supported
anymore:

DG>    The first part of the above command-line can be customized via
DG>    the environment variable GIT_DIFF_CMD...
DG>    ... 
DG>    Caution:  Do not use more than two '%s' in GIT_DIFF_CMD.

Drop it also from "git Environment Variables" section.


  parent reply	other threads:[~2005-05-01 19:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-01 12:58 Quick command reference Paul Mackerras
2005-05-01 14:44 ` David Greaves
2005-05-01 15:19   ` Brian O'Mahoney
2005-05-01 15:52     ` David Greaves
2005-05-01 16:29       ` Linus Torvalds
2005-05-01 17:08         ` David Greaves
2005-05-01 18:51           ` Junio C Hamano
2005-05-01 19:27           ` Junio C Hamano [this message]
2005-05-06  6:30           ` Junio C Hamano
2005-05-06  9:32             ` GIT blame (was Re: Quick command reference) Junio C Hamano
2005-05-01 21:18         ` Quick command reference bert hubert
2005-05-01 22:11           ` David Greaves
2005-05-01 22:45           ` Linus Torvalds
2005-05-02  0:09           ` Randy.Dunlap
2005-05-01 20:10     ` H. Peter Anvin
2005-05-01 20:31       ` David Greaves

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v4qdmu4pw.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=david@dgreaves.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).