git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Clément Poulain" <clement.poulain@ensimag.imag.fr>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	git@vger.kernel.org,
	Diane Gasselin <diane.gasselin@ensimag.imag.fr>,
	Axel Bonnet <axel.bonnet@ensimag.imag.fr>
Subject: Re: [PATCH v2 1/4] sha1_name: add get_sha1_with_context()
Date: Wed, 9 Jun 2010 02:13:37 -0400	[thread overview]
Message-ID: <20100609061337.GA14007@coredump.intra.peff.net> (raw)
In-Reply-To: <AANLkTinI_ghLE5U3tQ0JFmvuU8DySLFtdl03sv0uW-Ab@mail.gmail.com>

On Wed, Jun 09, 2010 at 12:30:31AM +0200, Clément Poulain wrote:

> Le 8 juin 2010 19:57, Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> a écrit :
> > This patch produces uncompilable code for me:
> >
> > cc1: warnings being treated as errors
> > In file included from builtin.h:6,
> >                 from fast-import.c:147:
> > cache.h: In function ‘get_sha1_with_context’:
> > cache.h:748: error: implicit declaration of function ‘get_sha1_with_context_1’
> >
> > Forgot to add get_sha1_with_context_1 to cache.h?
> 
> Uh, we compiled it almost ten times on both our pc and ensibm (our
> school server), whithout any problems. Seems that we need to check our
> compilation configurations.

Note the "warnings being treated as errors". Matthieu is compiling with
-Werror (and presumably -Wall). We strive to be warning-free in git, and
I think many of the developers compile with "-Wall -Werror".

> Right. But the aim was to skip one function call (see the call-stack below)
> _with_mode => _with_mode_1 => _with_context_1
> whereas:
>  _with_context => _with_context_1

Perhaps that was your goal, but my goal when I suggested it was to give
us a cleaner codebase. We don't want a proliferation of get_sha1_with_*
functions. Introducing _with_context instead of _with_tree or _with_path
was meant not to make things worse. But collapsing _with_mode into
_with_context actively makes things better.

> >> +                     orc->path[sizeof(orc->path)] = '\0';
> >
> > Same here.
> 
> That's true. Stupid error, we copied this line without checking it.

Oops, that's my fault for introducing the bug in the first place (I had
originally had an snprintf and changed it to strncpy at the last
minute). :)

-Peff

  reply	other threads:[~2010-06-09  6:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 13:49 [PATCH v2 0/4] git-gui blame: use textconv Clément Poulain
2010-06-08 13:49 ` [PATCH v2 1/4] sha1_name: add get_sha1_with_context() Clément Poulain
2010-06-08 13:49   ` [PATCH v2 2/4] textconv: support for cat_file Clément Poulain
2010-06-08 13:49     ` [PATCH v2 3/4] git gui: use textconv filter for diff and blame Clément Poulain
2010-06-08 13:49       ` [PATCH v2 4/4] t/t8007: test textconv support for cat-file Clément Poulain
2010-06-08 18:12     ` [PATCH v2 2/4] textconv: support for cat_file Matthieu Moy
2010-06-08 17:57   ` [PATCH v2 1/4] sha1_name: add get_sha1_with_context() Matthieu Moy
2010-06-08 22:30     ` Clément Poulain
2010-06-09  6:13       ` Jeff King [this message]
2010-06-09  7:29         ` Matthieu Moy

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=20100609061337.GA14007@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=axel.bonnet@ensimag.imag.fr \
    --cc=clement.poulain@ensimag.imag.fr \
    --cc=diane.gasselin@ensimag.imag.fr \
    --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).