git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Brandon Williams <bmwill@google.com>
To: Stefan Beller <sbeller@google.com>
Cc: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 6/7] submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree
Date: Fri, 10 Aug 2018 15:02:51 -0700	[thread overview]
Message-ID: <20180810220251.GC211322@google.com> (raw)
In-Reply-To: <CAGZ79kb+QyCuBw+e8ShU3Ts9GL+bhzb=i2F+5B0jb9eWk5Sj1w@mail.gmail.com>

On 08/10, Stefan Beller wrote:
> > > +             cfg_file = xstrfmt("%s/config", subrepo.gitdir);
> >
> > As I mentioned here:
> > https://public-inbox.org/git/20180807230637.247200-1-bmwill@google.com/T/#t
> >
> > This lines should probably be more like:
> >
> >   cfg_file = repo_git_path(&subrepo, "config");
> >
> 
> Why? You did not mention the benefits for writing it this way
> here or on the reference. Care to elaborate?

Its more future proof especially because we have the difference bettwen
commondir and gitdir for worktrees.  Using the "repo_git_path" function
handles path rewritting when using worktrees.  Here (when working with
worktrees) "subrepo.gitdir" refers to the worktree specific gitdir while
"subrepo.commondir" refers to the global common gitdir where the
repository config actually lives.

-- 
Brandon Williams

  reply	other threads:[~2018-08-10 22:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 22:23 [PATCH 0/7] Resend of sb/submodule-update-in-c Stefan Beller
2018-08-03 22:23 ` [PATCH 1/7] git-submodule.sh: align error reporting for update mode to use path Stefan Beller
2018-08-03 22:23 ` [PATCH 2/7] git-submodule.sh: rename unused variables Stefan Beller
2018-08-03 22:23 ` [PATCH 3/7] builtin/submodule--helper: factor out submodule updating Stefan Beller
2018-08-03 22:23 ` [PATCH 4/7] builtin/submodule--helper: store update_clone information in a struct Stefan Beller
2018-08-03 22:23 ` [PATCH 5/7] builtin/submodule--helper: factor out method to update a single submodule Stefan Beller
2018-08-03 22:23 ` [PATCH 6/7] submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree Stefan Beller
2018-08-10 21:47   ` Brandon Williams
2018-08-10 21:52     ` Stefan Beller
2018-08-10 22:02       ` Brandon Williams [this message]
2018-08-03 22:23 ` [PATCH 7/7] submodule--helper: introduce new update-module-mode helper Stefan Beller
2018-08-03 22:36 ` [PATCH 0/7] Resend of sb/submodule-update-in-c Junio C Hamano
2018-08-13 22:42 ` Stefan Beller
2018-08-13 22:42   ` [PATCH 1/7] git-submodule.sh: align error reporting for update mode to use path Stefan Beller
2018-08-13 22:42   ` [PATCH 2/7] git-submodule.sh: rename unused variables Stefan Beller
2018-08-13 22:42   ` [PATCH 3/7] builtin/submodule--helper: factor out submodule updating Stefan Beller
2018-08-13 22:42   ` [PATCH 4/7] builtin/submodule--helper: store update_clone information in a struct Stefan Beller
2018-08-13 22:42   ` [PATCH 5/7] builtin/submodule--helper: factor out method to update a single submodule Stefan Beller
2018-08-13 22:42   ` [PATCH 6/7] submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree Stefan Beller
2018-08-13 22:42   ` [PATCH 7/7] submodule--helper: introduce new update-module-mode helper Stefan Beller
2018-08-18 16:10     ` Duy Nguyen
2018-08-20 19:44       ` Stefan Beller
2018-08-14 21:01   ` [PATCH 0/7] Resend of sb/submodule-update-in-c Junio C Hamano
2018-08-14 21:24     ` Stefan Beller

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=20180810220251.GC211322@google.com \
    --to=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@google.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).