git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Karthik Nayak <karthik.188@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] cache: modify for "cat-file --literally -t"
Date: Sun, 8 Mar 2015 18:25:28 -0400	[thread overview]
Message-ID: <CAPig+cT-AG2pnHJnkUcnHXzWu9jp2Q7ZBE7Re5jimFU7mOWLhQ@mail.gmail.com> (raw)
In-Reply-To: <1425579499-18780-1-git-send-email-karthik.188@gmail.com>

On Thu, Mar 5, 2015 at 1:18 PM, Karthik Nayak <karthik.188@gmail.com> wrote:
> cache: modify for "cat-file --literally -t"

It is desirable for the first line of the commit message to explain,
as well as possible, the intent of the patch. The bulk of the commit
message then elaborates. Unfortunately, this line says almost nothing.
All patches modify, so writing "modify" here is not helpful and merely
wastes precious horizontal real estate. A more informative summary
might say something like:

    cache: add object_info::typename in support of 'cat-file --literally'

> Add a "struct strbuf *typename" to object_info to hold the
> typename when the literally option is used. Add a flag to
> notify functions when literally is used.

It's good to split up changes such that each patch comprises one
logical step, however, this patch does not really do anything on its
own, so having it stand-alone doesn't make much sense. It would make
more sense to fold it into the patch which actually requires these
changes.

> Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
> ---
> diff --git a/cache.h b/cache.h
> index 4d02efc..949ef4c 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -830,6 +830,7 @@ extern int is_ntfs_dotgit(const char *name);
>
>  /* object replacement */
>  #define LOOKUP_REPLACE_OBJECT 1
> +#define LOOKUP_LITERALLY 2
>  extern void *read_sha1_file_extended(const unsigned char *sha1, enum object_type *type, unsigned long *size, unsigned flag);
>  static inline void *read_sha1_file(const unsigned char *sha1, enum object_type *type, unsigned long *size)
>  {
> @@ -1296,6 +1297,7 @@ struct object_info {
>         unsigned long *sizep;
>         unsigned long *disk_sizep;
>         unsigned char *delta_base_sha1;
> +       struct strbuf *typename;
>
>         /* Response */
>         enum {
> --
> 2.3.1.167.g7f4ba4b.dirty

  reply	other threads:[~2015-03-08 22:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 18:16 [PATCH v3 0/3] cat-file: add "--literally" option karthik nayak
2015-03-05 18:18 ` [PATCH v3 1/3] cache: modify for "cat-file --literally -t" Karthik Nayak
2015-03-08 22:25   ` Eric Sunshine [this message]
2015-03-09 12:56     ` karthik nayak
2015-03-05 18:19 ` [PATCH v3 2/3] sha1_file: implement changes " Karthik Nayak
2015-03-05 23:45   ` Junio C Hamano
2015-03-06 17:41     ` karthik nayak
2015-03-06 19:28       ` Junio C Hamano
2015-03-07 10:04         ` karthik nayak
2015-03-08  8:09           ` Junio C Hamano
2015-03-08  8:48             ` karthik nayak
2015-03-08  9:03               ` Junio C Hamano
2015-03-08 10:49                 ` karthik nayak
2015-03-08 19:09                   ` Junio C Hamano
2015-03-09 13:08                     ` karthik nayak
2015-03-05 18:19 ` [PATCH v3 3/3] cat-file: add "--literally" option Karthik Nayak
2015-03-08 22:50   ` Eric Sunshine
2015-03-09 12:53     ` karthik nayak

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=CAPig+cT-AG2pnHJnkUcnHXzWu9jp2Q7ZBE7Re5jimFU7mOWLhQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=karthik.188@gmail.com \
    /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).