Re: [PATCH v2 06/10] setup_git_env: use git_pathdup instead of xmalloc + sprintf
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 24, 2014, 13:02 UTC
- Message-ID
- <CACsJy8ACXPq+-py+vwDFg9nfB6eaC5jy+nXpHn8y6QEe88FuLg@mail.gmail.com>
- In-Reply-To
- <CAPig+cTyZxH6Ka3JVpYBP7=i=HAWoSYBt9MScwfVaTcKKmi1UA@mail.gmail.com>
On Mon, Jun 23, 2014 at 5:21 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 13 quoted lines
> On Thu, Jun 19, 2014 at 5:28 PM, Jeff King <peff@peff.net> wrote: >> This is shorter, harder to get wrong, and more clearly >> captures the intent. >> >> Signed-off-by: Jeff King <peff@peff.net> >> --- >> I wondered if there was a reason to avoid this (because we are in >> setup_git_env, which can potentially be called by git_pathdup). But the >> git_graft_file initialization below already uses it, and I >> double-checked that it is safe once git_dir is set. > > This patch will conflict textually with patch 6/28 of Duy's > nd/multiple-work-trees series [1].
I'll just steal the conflicted bit about git_object_dir and put in the re-roll. It's a better way anyway. If git_index_file change still results in conflicts, Junio can resolve it easily (I don't touch it in nd/multiple-work-trees).
-- Duy