git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH] Comment -p mode for cat-file
Date: Mon, 11 Dec 2006 22:13:00 +0000	[thread overview]
Message-ID: <200612112213.00737.andyparkins@gmail.com> (raw)
In-Reply-To: <f323e83a37efd3b913004666f2fc104578a92833.1165875140.git.andyparkins@gmail.com>

Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
 builtin-cat-file.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 6c16bfa..e7997ee 100644
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
@@ -121,12 +121,16 @@ int cmd_cat_file(int argc, const char **argv, const char *prefix)
 			die("Not a valid object name %s", argv[2]);
 
 		/* custom pretty-print here */
+		/* Special print tree types using ls-tree
+		 *  git-ls-tree argv[1] */
 		if (!strcmp(type, tree_type))
 			return cmd_ls_tree(2, argv + 1, NULL);
 
+		/* For everything else, read the object itself */
 		buf = read_sha1_file(sha1, type, &size);
 		if (!buf)
 			die("Cannot read object %s", argv[2]);
+		/* if the object is a tag, use pprint_tag() above */
 		if (!strcmp(type, tag_type)) {
 			pprint_tag(sha1, buf, size);
 			return 0;
-- 
1.4.4.1.geeee8

       reply	other threads:[~2006-12-11 22:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f323e83a37efd3b913004666f2fc104578a92833.1165875140.git.andyparkins@gmail.com>
2006-12-11 22:13 ` Andy Parkins [this message]
2006-12-11 22:13 ` [PATCH] Comment diff_tree Andy Parkins
2006-12-11 22:13 ` [PATCH] Add comments to update_tree_entry() Andy Parkins

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=200612112213.00737.andyparkins@gmail.com \
    --to=andyparkins@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 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).