From: Junio C Hamano <gitster@pobox.com>
To: Adam Dinwoodie <adam@dinwoodie.org>
Cc: git@vger.kernel.org
Subject: Re: git push --delete <url> <branch> fails if run outside a repository
Date: Mon, 06 Jun 2022 10:29:50 -0700 [thread overview]
Message-ID: <xmqqpmjl8zu9.fsf@gitster.g> (raw)
In-Reply-To: <20220606080528.rfugporpazoujceq@lucy.dinwoodie.org> (Adam Dinwoodie's message of "Mon, 6 Jun 2022 09:05:28 +0100")
Adam Dinwoodie <adam@dinwoodie.org> writes:
> When using `git push`, rather than specifying a remote by name, one can
> also specify a remote by URL, and this includes when the only operations
> being performed are to delete refs on the remote. This doesn't require
> any information about any local repository, but it fails unless the
> command is run from within an existing local Git repo.
>
> This seems like a bug to me: there's no reason this shouldn't work.
Perhaps.
While I fully agree with you that there is no reason this shouldn't
work, I am not sure if there is a good reason to make it work,
either. Any other push needs to have objects on _our_ side and
requiring you to be in a repository is a sure way to do so. I am
not convinced that it is worth our engineering effort to add a
special case for this, but patches that are cleanly done without
making too much damage to the existing code in readability and
maintainability are probably welcome.
Thanks.
prev parent reply other threads:[~2022-06-06 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 8:05 git push --delete <url> <branch> fails if run outside a repository Adam Dinwoodie
2022-06-06 17:29 ` Junio C Hamano [this message]
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=xmqqpmjl8zu9.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adam@dinwoodie.org \
--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.
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 NNTP newsgroup(s).