Comments (11)
This is difficult if the user changes the root directory and that contains other "folders" (i.e. not git repositories)
from mgit.
Actually this is fairly straight forward as:
gitDir(file, ".git")
file.isDirectory() && gitDir.exists() && gitDir.isDirectory()
would be a good enough heurtistic
from mgit.
Also the plan is to no longer use sqlite in the future and just do the above as required and remove the whole concept of "importing" local repos, all we really want to do is maintain a list of paths of "recently" accessed local repos.
from mgit.
@maks what's about passwords/usernames then? Putting them in remote url doesn't seem to be good practice...
from mgit.
Credentials can be stored in secure prefs and MGit already has a dependency on that library.
from mgit.
@maks two things: most Git submodules use something like this:
git: ../.git/modules/some-module
as the .git
in its directory, and if you are storing the credentials there it's still bound to a database which lists repositories to map credentials to them.
from mgit.
@kaeptmblaubaer1000 Credentials are for remotes, so they need to be mapped to them, not to specific local repos, so it doesn't matter is a local repo is a submodule or not.
This will work the same way is MGit already stores passwords for ssh keys, where it uses the name of the ssh file as the secureprefs key, see: https://github.com/maks/MGit/blob/master/app/src/main/java/me/sheimi/sgit/dialogs/EditKeyPasswordDialog.java#L79
though the new prefs keynames will be name-spaced with a prefix (eg. https_auth.*) which the current ssh password keys unfortuntately dont do.
from mgit.
@maks what's if there are multiple credentials? (e.g. if one has multiple GitHub accounts or there are different servers on the same server port)
from mgit.
A remote is a specific repo not just a service or server. If you have multiple accounts that you use with a specific remote repo then you would need to differentiate between them with different URIs.
from mgit.
@maks now I know what you mean, and it sounds good, except that I would have to enter my GitHub credentials again and again.
from mgit.
Well yes, you would need to enter your credentials each time you clone from a new remote or add a new remote to an existing local repo, but that is not something that happens very often compared other operations.
from mgit.
Related Issues (20)
- How to set key used by repository? HOT 1
- ViewFile scroll position lost after device rotation
- Ali
- Add an option to always push after commit
- Files in local repository showing as untracked
- Enhance the description or the activated feature of mgit HOT 6
- can't import a repo from android/data HOT 2
- Support bare repositories
- "Operation Not Permitted" no Clone HOT 26
- Implement 2FA of GitHub HOT 1
- Persistent notifications/tips instead of fleeting toasts
- Doesn't update files when created by another application HOT 2
- root storage location for repos can not find the dir with prefix '.' (hidden folders)
- Error Occured / Clone failed / Inflater has been closed
- 500 Internal Server Error
- hhjjjjjjhhh
- Utilize `com.android.documentsui` as file picker. HOT 3
- In-application feedback button doesn't utilize a template.
- "Select Colour Scheme" doesn't prefill either option after installation.
- Can the JGit dependency be upgraded? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mgit.