From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Luke Diamand <luke@diamand.org>,
Johannes Schindelin <johannes.schindelin@gmx.de>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH] p4: respect init.defaultBranch
Date: Sun, 08 Nov 2020 08:41:51 +0000 [thread overview]
Message-ID: <pull.782.git.1604824911359.gitgitgadget@gmail.com> (raw)
From: Johannes Schindelin <johannes.schindelin@gmx.de>
In `git p4 clone`, we hard-code the branch name `master` instead of
looking what the _actual_ initial branch name is. Let's fix that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
p4: respect init.defaultBranch
Just something I noticed while working on the big master -> main rename
in the test suite.
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-782%2Fdscho%2Fgit-p4-and-init.defaultBranch-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-782/dscho/git-p4-and-init.defaultBranch-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/782
git-p4.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-p4.py b/git-p4.py
index 4433ca53de..52ddb1d7b2 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -4186,7 +4186,7 @@ def run(self, args):
# create a master branch and check out a work tree
if gitBranchExists(self.branch):
- system([ "git", "branch", "master", self.branch ])
+ system([ "git", "branch", currentGitBranch(), self.branch ])
if not self.cloneBare:
system([ "git", "checkout", "-f" ])
else:
base-commit: 7f7ebe054af6d831b999d6c2241b9227c4e4e08d
--
gitgitgadget
next reply other threads:[~2020-11-08 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-08 8:41 Johannes Schindelin via GitGitGadget [this message]
2020-11-09 21:02 ` [PATCH] p4: respect init.defaultBranch 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=pull.782.git.1604824911359.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
--cc=luke@diamand.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).