diff options
author | Rolf Theunissen <rolf.theunissen@gmail.com> | 2019-02-10 18:40:26 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2022-02-14 10:45:15 +0100 |
commit | 504001228ba6a43179a72e56ce03aa217c2bdea4 (patch) | |
tree | 4b41e609dfb1f8af9e3bffcabda30fcdfc125d38 /org.eclipse.jgit/resources | |
parent | c3fbd2cdf94e0d03453f666d1fea68c21d1be4bd (diff) | |
download | jgit-504001228ba6a43179a72e56ce03aa217c2bdea4.tar.gz jgit-504001228ba6a43179a72e56ce03aa217c2bdea4.zip |
PushCommand: consider push.default when no RefSpecs are given
When no RefSpecs are given, PushCommand until now simply fell back to
pushing the current branch to an upstream branch of the same name. This
corresponds to push.default=current. Any setting from the git config
for push.default was simply ignored.
Implement the other modes (nothing, matching, upstream, and simple),
too. Add a setter and getter for the PushDefault so that an application
can force a particular mode to be used. For backwards compatibility,
use "current" as the default setting; to figure out the value from the
git config, which defaults to "simple", call setPushDefault(null).
Bug: 351314
Change-Id: I86c5402318771e47d80b137e99947762e1150bb4
Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit/resources')
-rw-r--r-- | org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index ee97c265e9..31579c98ad 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -564,6 +564,11 @@ pushCertificateInvalidField=Push certificate has missing or invalid value for {0 pushCertificateInvalidFieldValue=Push certificate has missing or invalid value for {0}: {1} pushCertificateInvalidHeader=Push certificate has invalid header format pushCertificateInvalidSignature=Push certificate has invalid signature format +pushDefaultNothing=No refspec given and push.default=nothing; no upstream branch can be determined +pushDefaultNoUpstream=No upstream branch found for local branch ''{0}'' +pushDefaultSimple=push.default=simple requires local branch name ''{0}'' to be equal to upstream tracked branch name ''{1}'' +pushDefaultTriangularUpstream=push.default=upstream cannot be used when the push remote ''{0}'' is different from the fetch remote ''{1}'' +pushDefaultUnknown=Unknown push.default={0}; cannot push pushIsNotSupportedForBundleTransport=Push is not supported for bundle transport pushNotPermitted=push not permitted pushOptionsNotSupported=Push options not supported; received {0} |