Skip to content

armgit / ente

Public Imported from GitHub
0

💚 End-to-end encrypted cloud for everything.

[mob][photos] Remove unused git hooks

Manav Rathi9baeb93d0ed8
diff --git a/mobile/apps/photos/AGENTS.md b/mobile/apps/photos/AGENTS.md
index e5a0025f66..417dfd75eb 100644
--- a/mobile/apps/photos/AGENTS.md
+++ b/mobile/apps/photos/AGENTS.md
@@ -32,11 +32,10 @@ Regenerate Dart bindings when Rust APIs change and keep generated code in `lib/s
2. Install Rust along with `flutter_rust_bridge_codegen` via `cargo install flutter_rust_bridge_codegen`.
3. Regenerate Rust bindings whenever native APIs shift using `flutter_rust_bridge_codegen generate`.
4. Initialize and refresh git submodules with `git submodule update --init --recursive`.
-5. Point git hooks at the repository hooks directory: `git config core.hooksPath hooks`.
## Critical Practices
- `dart format .` must run before you commit so the tree stays uniformly formatted.
- Follow each edit with `flutter analyze` and resolve every warning or info message introduced by the change.
- Reuse existing UI and service components; search both `lib/ui/` and `../../packages/` before creating new primitives.
- Respect the design system—pull colors from `getEnteColorScheme(context)` and text styles from `getEnteTextTheme(context)`, caching the theme at the top of `build`.
-- Keep specs and docs in sync with code updates; when behavior shifts, revise the relevant files under `docs/` or adjacent directories.
\ No newline at end of file
+- Keep specs and docs in sync with code updates; when behavior shifts, revise the relevant files under `docs/` or adjacent directories.
diff --git a/mobile/apps/photos/CLAUDE.md b/mobile/apps/photos/CLAUDE.md
index bd8c9aea37..98ed205a8f 100644
--- a/mobile/apps/photos/CLAUDE.md
+++ b/mobile/apps/photos/CLAUDE.md
@@ -162,7 +162,6 @@ lib/
2. Install Flutter Rust Bridge: `cargo install flutter_rust_bridge_codegen`
3. Generate Rust bindings: `flutter_rust_bridge_codegen generate`
4. Update submodules: `git submodule update --init --recursive`
-5. Enable git hooks: `git config core.hooksPath hooks`
## Critical Coding Requirements
@@ -210,4 +209,4 @@ lib/
- Always follow existing code conventions and patterns in neighboring files
# Individual Preferences
-- @~/.claude/ente-photos-instructions.md
\ No newline at end of file
+- @~/.claude/ente-photos-instructions.md
diff --git a/mobile/apps/photos/README.md b/mobile/apps/photos/README.md
index 95bfd3a8f8..7245f6e2f9 100644
--- a/mobile/apps/photos/README.md
+++ b/mobile/apps/photos/README.md
@@ -50,13 +50,11 @@ You can alternatively install the build from PlayStore or F-Droid.
2. Pull in all submodules with `git submodule update --init --recursive`
-3. Enable repo git hooks `git config core.hooksPath hooks`
-
-4. Install dependencies using one of these methods:
+3. Install dependencies using one of these methods:
- **Using Melos (recommended):** Install Melos with `dart pub global activate melos`, then from any folder inside `mobile/`, run `melos run codegen:rust`. This will install dependencies and generate Rust bindings.
- **Using Flutter directly:** Run `flutter pub get`, then install [Flutter Rust Bridge](https://cjycode.com/flutter_rust_bridge/) with `cargo install flutter_rust_bridge_codegen` and run `flutter_rust_bridge_codegen generate` in both this folder and in `mobile/packages/rust`.
-5. On Android:
+4. On Android:
- For development, run `flutter run -t lib/main.dart --flavor independent`
@@ -64,7 +62,7 @@ You can alternatively install the build from PlayStore or F-Droid.
keystore](https://docs.flutter.dev/deployment/android#create-an-upload-keystore)
and run `flutter build apk --release --flavor independent`
-6. For iOS, run `flutter build ios`
+5. For iOS, run `flutter build ios`
Some common issues and troubleshooting tips are in [docs/dev](docs/dev.md).
diff --git a/mobile/apps/photos/hooks/pre-commit b/mobile/apps/photos/hooks/pre-commit
deleted file mode 100755
index 83b93f9e13..0000000000
--- a/mobile/apps/photos/hooks/pre-commit
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# This git hook fails if a user is trying to add a new file which is
-# not null safe.
-exec ./hooks/pre-commit-fdroid
-
-
-
-# If the script gets to this point, all files passed the check
-exit 0
diff --git a/mobile/apps/photos/hooks/pre-commit-fdroid b/mobile/apps/photos/hooks/pre-commit-fdroid
deleted file mode 100755
index 9b2514adc6..0000000000
--- a/mobile/apps/photos/hooks/pre-commit-fdroid
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/bin/sh
-# Get the current branch
-current_branch=$(git rev-parse --abbrev-ref HEAD)
-
-if [ "$current_branch" = "f-droid" ]; then
- # Verify that the pubspec.yaml doesn't contain certain dependencies
- WORDS=("in_app_purchase" "firebase")
- for word in ${WORDS[@]}; do
- if grep -q $word pubspec.yaml; then
- echo "The pubspec.yaml file dependency on '$word', which is not allowed on the f-droid branch."
- exit 1
- fi
- done
-fi