-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
Note: Since deleting and re-cloning my local repository in Android Password Store, I am unable to reproduce this bug. Somehow, it seems it had gotten into a bad state, but a fresh clone has worked around the issue. Unfortunately I don't seem to be able to retrieve older logs from adb, so I know this will probably be hard to diagnose.
I have made some test entries in Android Password Store which I wish to revert. I can't do that in the Android app, but I can on my desktop via pass git reset --hard <commit> to an older commit on my master branch, followed by pass git push -f origin master. This can be verified to have worked by performing a fresh clone of the repository and inspecting the commit log.
Then in the Android Password Store app, after pulling the remote changes (ie. "Pull from remote", and not "Push to remote" or "Synchronise repository") and using the Hard reset to remote branch option, I type in "master" as the remote branch and it appears to work, but the password entries that should have been removed still exist.
Steps to reproduce
Steps to reproduce the behavior:
- Clone an existing pass store repository in the Android Password Store and create some new test entries. Push them back to the remote.
- On the desktop, run
pass git pullto download the new entry. Revert the most recent commit with something likepass git reset --hard HEAD^, and then push it to the remote master branch withpass git push -f origin master(adjusting "origin" and "master" as required for your remote configuration). - Create a new fresh clone of the remote repository. eg.
git clone ...andcdinto the new local repo directory. Rungit logand observe the tip of the branch (the master branch in this example). This proves the remote repository is in the desired state. - In Android Password Store, click Pull from remote, and then go to Settings -> Repository -> Local Git config & utilities -> Hard reset to remote branch and type "master" as the branch (in my case at least).
- Click "Show commit log" and notice that there are still additional commits past the tip of the the remote branch. Browse the Android Password Store entries and notice that the previously created entries still exist. Closing and re-opening the app doesn't make any difference.
I have also tried resetting the branch on my desktop, adding a new commit and then force pushing that (and pulling on Android), but even then, the "Hard reset to remote branch type" option doesn't work — the commits local only to Android were kept and simply rebased on top (presumably since I have "Rebase on pull" set to avoid a merge commit).
The only work-around I could find was to pass git reset --hard <some commit> && pass git push -f origin master on desktop, then delete the repo on Android and re-add it again.
Expected behavior
From the git man page:
git reset [<mode>] [<commit>]
...
--hard
Resets the index and working tree. Any changes to tracked files in the working tree since are discarded. Any untracked files or directories in the way of writing any tracked files are simply deleted.
I expect the test entries I added to be discarded, without having to delete my local clone of the repo and re-clone it again.
Screenshots
No response
Device information
- Device: Samsung Galaxy S22 Ultra
- OS: Android 16
- App version: 1.15.4
Additional context
No response