git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Paolo Pettinato (ppettina)" <ppettina@cisco.com>
To: Junio C Hamano <gitster@pobox.com>, Jeff King <peff@peff.net>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git fetch bug in git 2.21+ "Could not access submodule '%s'"
Date: Wed, 14 Aug 2019 17:03:44 +0000	[thread overview]
Message-ID: <5a58b0eb-0690-c445-dbfd-bd4c5b614629@cisco.com> (raw)
In-Reply-To: <xmqqpnl766pj.fsf@gitster-ct.c.googlers.com>

Thanks for the reply!

On 14/08/2019 17:40, Junio C Hamano wrote:
>   Why is the user mucking with
> that directory in the first place, and isn't the flagging of the
> situation as an error, done with 26f80ccf ("submodule: migrate
> get_next_submodule to use repository structs", 2018-11-28), a
> bugfix?  If not, why not?

Not sure if you're implying here that this is not a bug; I'd say that:

- Mucking about with a folder that's supposed to contain a submodule is 
not something that a lot of people do (and we worked around the issue), 
and people shouldn't do that, but...

- ... regardless, I believe that "git fetch" shouldn't particularly care 
about the state of the current working directory. I didn't ask it to do 
anything with the submodules, nor have I initialised them. In my 
(limited) knowledge of git, I'd expect git fetch to do its magic 
entirely between the remote and the .git folder.

Our use case was for a submodule containing encrypted secrets; and the 
mucking about was stubbing out those secrets in a test build without 
fetching/decrypting them.

It's arguable whether this should be fixed or not; less arguable that we 
could use a better error message and consistency (1st execution fails, 
2nd does not).

  reply	other threads:[~2019-08-14 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-14  9:57 Git fetch bug in git 2.21+ "Could not access submodule '%s'" Paolo Pettinato (ppettina)
2019-08-14 15:36 ` Jeff King
2019-08-14 16:40   ` Junio C Hamano
2019-08-14 17:03     ` Paolo Pettinato (ppettina) [this message]
2019-08-14 17:56       ` Junio C Hamano
2019-08-14 19:31     ` Jeff King
2019-08-14 15:59 ` [PATCH] get_next_submodule(): format error string as an error Jeff King
2019-08-14 16:15   ` Junio C Hamano

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=5a58b0eb-0690-c445-dbfd-bd4c5b614629@cisco.com \
    --to=ppettina@cisco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).