From 5be42da750803a1538ae33878d23d6d1a4cca86e Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Fri, 29 Apr 2022 16:41:47 -0500 Subject: [PATCH] Change references from `master` to `main` _I recommend reviewing this with whitespace changes disabled._ Signal has renamed its primary branch to `main`. This updates references to the old name, `master`, to either reference `main` or a specific commit hash. I also fixed a couple of small whitespace issues in a file I was editing. --- .github/PULL_REQUEST_TEMPLATE.md | 7 +++---- README.md | 2 +- Scripts/reverse_integration_check.py | 14 +++++++------- SignalServiceKit/CONTRIBUTING.md | 2 +- .../src/Messages/Attachments/OWSMediaUtils.swift | 4 ++-- SignalServiceKit/src/Messages/MessageSender.swift | 12 ++++++------ .../src/Network/API/Requests/OWSRequestFactory.m | 3 ++- SignalServiceKit/src/Util/NSData+messagePadding.m | 4 ++-- .../Messages/SMKSecretSessionCipherTest.swift | 2 +- .../Views/ImageEditor/ImageEditorPaletteView.swift | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5019d80d5a..b299eb508c 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,13 +1,12 @@ ### First time contributor checklist -- [ ] I have read the [README](https://github.com/WhisperSystems/Signal-iOS/blob/master/README.md) and [CONTRIBUTING](https://github.com/WhisperSystems/Signal-iOS/blob/master/CONTRIBUTING.md) documents -- [ ] I have signed the [Contributor Licence Agreement](https://whispersystems.org/cla/) +- [ ] I have read the [README](https://github.com/signalapp/Signal-iOS/blob/main/README.md) and [CONTRIBUTING](https://github.com/signalapp/Signal-iOS/blob/main/CONTRIBUTING.md) documents +- [ ] I have signed the [Contributor Licence Agreement](https://signal.org/cla/) ### Contributor checklist -- [ ] I'm following the [code, UI and style conventions](https://github.com/WhisperSystems/Signal-iOS/blob/master/CONTRIBUTING.md#code-conventions) -- [ ] My commits are rebased on the latest master branch +- [ ] My commits are rebased on the latest main branch - [ ] My commits are in nice logical chunks - [ ] My contribution is fully baked and is ready to be merged as is - [ ] I have tested my contribution on these devices: diff --git a/README.md b/README.md index 52ead4b88d..ba6b578bd3 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Help us translate Signal! The translation effort happens on [Transifex](https:// ## Contributing Code -Instructions on how to setup your development environment and build Signal-iOS can be found in [BUILDING.md](https://github.com/signalapp/Signal-iOS/blob/master/BUILDING.md). Other useful instructions for development can be found in the [Development Guide wiki page](https://github.com/signalapp/Signal-iOS/wiki/Development-Guide). We also recommend reading the [contribution guidelines](https://github.com/signalapp/Signal-iOS/blob/master/CONTRIBUTING.md). +Instructions on how to setup your development environment and build Signal-iOS can be found in [BUILDING.md](https://github.com/signalapp/Signal-iOS/blob/main/BUILDING.md). Other useful instructions for development can be found in the [Development Guide wiki page](https://github.com/signalapp/Signal-iOS/wiki/Development-Guide). We also recommend reading the [contribution guidelines](https://github.com/signalapp/Signal-iOS/blob/main/CONTRIBUTING.md). ## Contributing Ideas diff --git a/Scripts/reverse_integration_check.py b/Scripts/reverse_integration_check.py index f75599b43c..a3c9081e51 100755 --- a/Scripts/reverse_integration_check.py +++ b/Scripts/reverse_integration_check.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # When we make a hotfix, we need to reverse integrate our hotfix back into -# master. After committing to master, this script audits that all tags have been +# main. After committing to main, this script audits that all tags have been # reverse integrated. import subprocess import logging @@ -31,12 +31,12 @@ class Version: return False -def is_on_master(): +def is_on_main(): output = subprocess.check_output( ["git", "rev-parse", "--abbrev-ref", "HEAD"], text=True ).strip() logging.debug("branch output: %s" % output) - return output == "master" + return output == "main" def main(): @@ -44,18 +44,18 @@ def main(): parser.add_argument( "--current-branch", action="store_true", - help="if unspecified, the check is only run when on the master branch", + help="if unspecified, the check is only run when on the main branch", ) args = parser.parse_args() - if not is_on_master(): + if not is_on_main(): # Don't interfere while on a feature or hotfix branch - logging.debug("not on master branch") + logging.debug("not on main branch") if not args.current_branch: return else: - logging.debug("on master branch") + logging.debug("on main branch") unmerged_tags_output = subprocess.check_output( ["git", "tag", "--no-merged", "HEAD"], text=True diff --git a/SignalServiceKit/CONTRIBUTING.md b/SignalServiceKit/CONTRIBUTING.md index e200a7cefb..1b40a7b5ff 100644 --- a/SignalServiceKit/CONTRIBUTING.md +++ b/SignalServiceKit/CONTRIBUTING.md @@ -9,4 +9,4 @@ Please go ahead and sign, putting your github username in "Address line #2", so ## Code Conventions -Follow all [Signal-iOS Code Conventions](https://github.com/signalapp/Signal-iOS/blob/master/CONTRIBUTING.md). +Follow all [Signal-iOS Code Conventions](https://github.com/signalapp/Signal-iOS/blob/main/CONTRIBUTING.md). diff --git a/SignalServiceKit/src/Messages/Attachments/OWSMediaUtils.swift b/SignalServiceKit/src/Messages/Attachments/OWSMediaUtils.swift index 4b61d13f3a..ed058bc948 100644 --- a/SignalServiceKit/src/Messages/Attachments/OWSMediaUtils.swift +++ b/SignalServiceKit/src/Messages/Attachments/OWSMediaUtils.swift @@ -1,5 +1,5 @@ // -// Copyright (c) 2021 Open Whisper Systems. All rights reserved. +// Copyright (c) 2022 Open Whisper Systems. All rights reserved. // import Foundation @@ -193,7 +193,7 @@ public class OWSMediaUtils: NSObject { /** * Media Size constraints from Signal-Android * - * https://github.com/signalapp/Signal-Android/blob/master/src/org/thoughtcrime/securesms/mms/PushMediaConstraints.java + * https://github.com/signalapp/Signal-Android/blob/c4bc2162f23e0fd6bc25941af8fb7454d91a4a35/app/src/main/java/org/thoughtcrime/securesms/mms/PushMediaConstraints.java */ @objc public static let kMaxFileSizeAnimatedImage = UInt(25 * 1024 * 1024) diff --git a/SignalServiceKit/src/Messages/MessageSender.swift b/SignalServiceKit/src/Messages/MessageSender.swift index 85e97d180e..4265531744 100644 --- a/SignalServiceKit/src/Messages/MessageSender.swift +++ b/SignalServiceKit/src/Messages/MessageSender.swift @@ -26,7 +26,7 @@ extension MessageSender { } class func ensureSessions(forMessageSends messageSends: [OWSMessageSend], - ignoreErrors: Bool) -> Promise { + ignoreErrors: Bool) -> Promise { let promise = firstly(on: .global()) { () -> Promise in var promises = [Promise]() for messageSend in messageSends { @@ -1042,9 +1042,9 @@ public extension MessageSender { } func markAddressAsUnregistered(_ address: SignalServiceAddress, - message: TSOutgoingMessage, - thread: TSThread, - transaction: SDSAnyWriteTransaction) { + message: TSOutgoingMessage, + thread: TSThread, + transaction: SDSAnyWriteTransaction) { owsAssertDebug(!Thread.isMainThread) if thread.isGroupThread { @@ -1220,7 +1220,7 @@ extension MessageSender { // Returns the per-device-message parameters used when submitting a message to // the Signal Web Service. - // See: https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java + // See: https://github.com/signalapp/Signal-Server/blob/9b3a8897cdfab4e830b3caa7f5f300ed25fedea9/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java return [ "type": messageType.rawValue, "destination": protocolAddress.name, @@ -1272,7 +1272,7 @@ extension MessageSender { // Returns the per-device-message parameters used when submitting a message to // the Signal Web Service. - // See: https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java + // See: https://github.com/signalapp/Signal-Server/blob/9b3a8897cdfab4e830b3caa7f5f300ed25fedea9/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessage.java let session = try signalProtocolStore(for: .aci).sessionStore.loadSession(for: protocolAddress, context: transaction)! return [ diff --git a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m index 917e1c43bc..d749db2ac8 100644 --- a/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m +++ b/SignalServiceKit/src/Network/API/Requests/OWSRequestFactory.m @@ -533,7 +533,8 @@ static NSString *_Nullable queryParamForIdentity(OWSIdentity identity) // Returns the per-account-message parameters used when submitting a message to // the Signal Web Service. - // See: https://github.com/signalapp/Signal-Server/blob/master/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessageList.java + // See: + // https://github.com/signalapp/Signal-Server/blob/9b3a8897cdfab4e830b3caa7f5f300ed25fedea9/service/src/main/java/org/whispersystems/textsecuregcm/entities/IncomingMessageList.java NSDictionary *parameters = @{ @"messages" : messages, @"timestamp" : @(timeStamp), @"online" : @(isOnline) }; TSRequest *request = [TSRequest requestWithUrl:[NSURL URLWithString:path] method:@"PUT" parameters:parameters]; diff --git a/SignalServiceKit/src/Util/NSData+messagePadding.m b/SignalServiceKit/src/Util/NSData+messagePadding.m index c2279ffda7..b07742a9cc 100644 --- a/SignalServiceKit/src/Util/NSData+messagePadding.m +++ b/SignalServiceKit/src/Util/NSData+messagePadding.m @@ -1,5 +1,5 @@ // -// Copyright (c) 2018 Open Whisper Systems. All rights reserved. +// Copyright (c) 2022 Open Whisper Systems. All rights reserved. // #import "NSData+messagePadding.h" @@ -30,7 +30,7 @@ - (NSData *)paddedMessageBody { // From - // https://github.com/signalapp/TextSecure/blob/master/libtextsecure/src/main/java/org/whispersystems/textsecure/internal/push/PushTransportDetails.java#L55 + // https://github.com/signalapp/Signal-Android/blob/c4bc2162f23e0fd6bc25941af8fb7454d91a4a35/libsignal/service/src/main/java/org/whispersystems/signalservice/internal/push/PushTransportDetails.java#L36-L45 // NOTE: This is dumb. We have our own padding scheme, but so does the cipher. // The +1 -1 here is to make sure the Cipher has room to add one padding byte, // otherwise it'll add a full 16 extra bytes. diff --git a/SignalServiceKit/tests/Messages/SMKSecretSessionCipherTest.swift b/SignalServiceKit/tests/Messages/SMKSecretSessionCipherTest.swift index 47a426df3f..897755a47d 100644 --- a/SignalServiceKit/tests/Messages/SMKSecretSessionCipherTest.swift +++ b/SignalServiceKit/tests/Messages/SMKSecretSessionCipherTest.swift @@ -8,7 +8,7 @@ import XCTest import Curve25519Kit import SignalCoreKit -// https://github.com/signalapp/libsignal-metadata-java/blob/master/tests/src/test/java/org/signal/libsignal/metadata/SecretSessionCipherTest.java +// https://github.com/signalapp/libsignal-metadata-java/blob/4a0e0c87ea733d5c007488671b74ace0dc5dcbef/tests/src/test/java/org/signal/libsignal/metadata/SealedSessionCipherTest.java // public class SecretSessionCipherTest extends TestCase { class SMKSecretSessionCipherTest: SSKBaseTestSwift { diff --git a/SignalUI/Views/ImageEditor/ImageEditorPaletteView.swift b/SignalUI/Views/ImageEditor/ImageEditorPaletteView.swift index 89970a92b6..c3aecf3f7c 100644 --- a/SignalUI/Views/ImageEditor/ImageEditorPaletteView.swift +++ b/SignalUI/Views/ImageEditor/ImageEditorPaletteView.swift @@ -367,7 +367,7 @@ public class ImageEditorPaletteView: UIView { let gradientLayer = CAGradientLayer() gradientView.layer.addSublayer(gradientLayer) gradientLayer.frame = gradientBounds - // See: https://github.com/signalapp/Signal-Android/blob/master/res/values/arrays.xml#L267 + // See: https://github.com/signalapp/Signal-Android/blob/42e94d8f921aba212b1ffebfae4f2590a6f3385a/res/values/arrays.xml#L267-L277 gradientLayer.colors = ImageEditorColor.gradientCGColors gradientLayer.startPoint = CGPoint.zero gradientLayer.endPoint = CGPoint(x: 0, y: gradientSize.height)