From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: "Clément Poulain" <clement.poulain@ensimag.imag.fr>
Cc: git@vger.kernel.org, spearce@spearce.org, drizzd@aon.at,
Diane Gasselin <diane.gasselin@ensimag.imag.fr>,
Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Subject: Re: [RFC/PATCH 1/4] sha1_name: creating context cache
Date: Sun, 06 Jun 2010 17:56:41 +0200 [thread overview]
Message-ID: <vpqpr045f46.fsf@bauges.imag.fr> (raw)
In-Reply-To: <1275823848-7151-2-git-send-email-clement.poulain@ensimag.imag.fr> ("Clément Poulain"'s message of "Sun\, 6 Jun 2010 13\:30\:45 +0200")
Clément Poulain <clement.poulain@ensimag.imag.fr> writes:
> This cache keeps the global context for the last sha1 looked up, especially its pathname. The textconv is indeed defined by the diff driver, which is associated with a pathname, not a blob
Please, wrap your message to make it fit in 80 characters (M-q under
Emacs can help). This applies to the cover email too, but is
particularly important for this one, since it'll become the commit
message if the patch is accepted.
> diff --git a/cache.h b/cache.h
> index 0f4263c..26a1faf 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -730,6 +730,14 @@ static inline unsigned int hexval(unsigned char c)
> #define MINIMUM_ABBREV 4
> #define DEFAULT_ABBREV 7
>
> +struct object_resolve_context {
> + unsigned char tree[20];
> + char path[PATH_MAX];
> + unsigned mode;
> +};
> +extern struct object_resolve_context object_context;
Is it really a good idea to make this a global variable? As I
understand it, the semantics of this variable is that it contains
information on the last sha1 name parsed (BTW, you probably want to
add a comment here explaining that). Wouldn't it be more robust to
have this value returned by the function doing the parsing?
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2010-06-06 16:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-06 11:30 [RFC/PATCH 0/4] git-gui blame: use textconv Clément Poulain
2010-06-06 11:30 ` [RFC/PATCH 1/4] sha1_name: creating context cache Clément Poulain
2010-06-06 11:30 ` [RFC/PATCH 2/4] textconv: support for cat-file Clément Poulain
2010-06-06 11:30 ` [RFC/PATCH 3/4] git-gui: use textconv filter for diff and blame Clément Poulain
2010-06-06 11:30 ` [RFC/PATCH 4/4] t/t8007: test textconv support for cat-file Clément Poulain
2010-06-06 15:56 ` Matthieu Moy [this message]
2010-06-06 22:15 ` [RFC/PATCH 1/4] sha1_name: creating context cache Jeff King
2010-06-07 8:34 ` Clément Poulain
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=vpqpr045f46.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=axel.bonnet@ensimag.imag.fr \
--cc=clement.poulain@ensimag.imag.fr \
--cc=diane.gasselin@ensimag.imag.fr \
--cc=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.