Giter VIP home page Giter VIP logo

Comments (23)

goerz avatar goerz commented on July 16, 2024 3

I wonder whether it might be feasible to use the pure-python gittle (or dulwich directly) to write a "fake" git executable providing the minimal requirements for the various vim plugins that rely on git, such as git-gutter and maybe even fugitive

from a-shell.

suckerSlayer avatar suckerSlayer commented on July 16, 2024 3

Any progress on Pandoc implementation? Looking forward to it ^_^

from a-shell.

holzschu avatar holzschu commented on July 16, 2024 1

Are you saying I can access files downloaded from working copy in a-shell?

Yes. The command "pickFolder" lets you access any folder in any app on your iPad (or iPhone). You have to click on the folder (so it's not automatic), but once you've done it, you are inside with all writing and reading permissions. That includes the right to erase everything with "rm -rf *", so be careful.

Once you have accessed a folder in another app, a-Shell keeps the permission, and you can access it faster with "jump + name of the folder". Use "showmarks" for a list of folders.

But perhaps there’s a way it could be installed by the user?

Yes, I could do that. Users can sideload anything they want, so a user with a Mac could add git to a-Shell. I'll think about it.

from a-shell.

personalizedrefrigerator avatar personalizedrefrigerator commented on July 16, 2024 1

@goerz It looks like it is, but I'm not sure if it satisfies the requirements for vim plugins... See #56.

from a-shell.

holzschu avatar holzschu commented on July 16, 2024 1

WorkingCopy uses libgit2, which has a different license... but no command line tool. https://github.com/libgit2/libgit2
(so there's been a lot of work on making the client interface). I heard there were developing a command line tool, which would change the situation.

from a-shell.

personalizedrefrigerator avatar personalizedrefrigerator commented on July 16, 2024 1

At present, ~/Documents/.gitconfig needs to be edited with an editor like ViM.

I tried to create the file, but it still says the same thing. Maybe there is some specific content that is looking for inside the .gitconfig?

lg2 config --global isn't implemented yet. All changes to the global .gitconfig must be done using a text editor. If you have experience working with C, you may want to contribute to lg2 here.

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

git is covered by the GPL, making it incompatible with AppStore rules. The WorkingCopy App has a functional git system (and a great user interface).

from a-shell.

somelinguist avatar somelinguist commented on July 16, 2024

FYI Pandoc is also covered by the GPL.

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

Good to know, thanks.

from a-shell.

rmchale avatar rmchale commented on July 16, 2024

That’s means git could not be packaged in a-shell. But perhaps there’s a way it could be installed by the user?

Are you saying I can access files downloaded from working copy in a-shell?

from a-shell.

ricardokl avatar ricardokl commented on July 16, 2024

I no longer have an ipad to test the app.... but thank you very much for the answer.
Perhaps then some integration with working copy could help? Or as rmchale sugested, the user could download and install somehow.

from a-shell.

ryanbooker avatar ryanbooker commented on July 16, 2024

Documents/bin appears to be in the path, but after adding a copy of git From my Mac to that folder, a-shell still couldn’t find it.

from a-shell.

ryanbooker avatar ryanbooker commented on July 16, 2024

I believe this is because PATH has:

/var/mobile/Containers/Data/Application/<APPID>/Documents/bin

rather than

/private/var/mobile/Containers/Data/Application/<APPID>/Documents/bin

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

I check for both. However, what I mean by sideloading is:

  • compile git for iOS (using a cross-compiler)
  • make it a dynamic library
  • add this dynamic library to the a-Shell project
  • compile the a-Shell project
  • install the result to your iPad
    This is not an easy process; step 1 might be especially difficult.

from a-shell.

ryanbooker avatar ryanbooker commented on July 16, 2024

Ah. Makes more sense. I was wondering "Hmm. Is iOS really just going to use a macOS binary?" :)

from a-shell.

NightMachinery avatar NightMachinery commented on July 16, 2024

I check for both. However, what I mean by sideloading is:

  • compile git for iOS (using a cross-compiler)
  • make it a dynamic library
  • add this dynamic library to the a-Shell project
  • compile the a-Shell project
  • install the result to your iPad
    This is not an easy process; step 1 might be especially difficult.

Is it necessary that a-shell be recompiled? Can’t git be made available as a downloadable binary?

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

iOS will only execute a binary or load a dynamic library if both conditions are met:

  • it is signed, with a signature specific to the application and device (computed at install time)
  • it is in a specific directory ($APPDIR/Frameworks/). That directory can only be accessed at install time.

Which is what makes adding binaries to applications so difficult. The only exception I know of is for webAssembly binaries.

from a-shell.

ricardokl avatar ricardokl commented on July 16, 2024

Back to this issue: If there's a GPL issue with the appstore, how the workingcopy app does it? Is it their own implementation of git?

from a-shell.

Emasoft avatar Emasoft commented on July 16, 2024

Any update on the git command?

from a-shell.

holzschu avatar holzschu commented on July 16, 2024

We now have the lg2 command, which is a git clone, but without the licensing issues. It's based on libgit2.

from a-shell.

Emasoft avatar Emasoft commented on July 16, 2024

I have troubles using lg2... it behaves quite differently from git..

$ lg2 config --list --show-origin
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

$ lg2 config --global user.name "Emasoft"
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

$ lg2 config --global init.defaultBranch main
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

When I try to init an empty folder, it works:

$ lg2 init ./my_project
Initialized empty Git repository in /private/var/mobile/Containers/Data/Application/
57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositories/my_project/

$ ls -al
total 0
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 .
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:22 ..
drwxr-xr-x  9 mobile  mobile  288 Mar 30 01:23 .git
$
$ cd .git
$ ls -al
total 24
drwxr-xr-x  9 mobile  mobile  288 Mar 30 01:44 .
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 ..
-rw-r--r--  1 mobile  mobile   23 Mar 30 01:23 HEAD
-rw-r--r--  1 mobile  mobile  204 Mar 30 01:44 config
-rw-r--r--  1 mobile  mobile   73 Mar 30 01:23 description
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 hooks
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 info
drwxr-xr-x  4 mobile  mobile  128 Mar 30 01:23 objects
drwxr-xr-x  4 mobile  mobile  128 Mar 30 01:23 refs
$ 
$ lg2 config user.name "Emasoft"
$ lg2 config user.email "[email protected]"
$
$ cat config
[core]
        bare = false
        repositoryformatversion = 0
        filemode = true
        precomposeunicode = true
        logallrefupdates = true
[user]
        name = Emasoft
        email = [email protected]
[init]
        defaultBranch = my_project
$ 
$ lg2 config --list --show-origin
Unable to set configuration: invalid config item name '--list'
$
$ lg2 config --global --list --show-origin
USAGE: lg2 config <KEY> [<VALUE>]
    This repository's configuration file should be located at /private/var/mobile/Co
ntainers/Data/Application/57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositorie
s/my_project/.git/config
    To update global configurations, try editing ~/Documents/.gitconfig.
$
$ lg2 config --global init.defaultBranch my_project
USAGE: lg2 config <KEY> [<VALUE>]
    This repository's configuration file should be located at /private/var/mobile/Co
ntainers/Data/Application/57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositorie
s/my_project/.git/config
    To update global configurations, try editing ~/Documents/.gitconfig.

But unfortunately no such file (~/Documents/.gitconfig) exists. :-(

from a-shell.

personalizedrefrigerator avatar personalizedrefrigerator commented on July 16, 2024

I have troubles using lg2... it behaves quite differently from git..

$ lg2 config --list --show-origin
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

$ lg2 config --global user.name "Emasoft"
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

$ lg2 config --global init.defaultBranch main
Unable to open repository '%s' '.' [-3] - could not find repository from '.'

When I try to init an empty folder, it works:

$ lg2 init ./my_project
Initialized empty Git repository in /private/var/mobile/Containers/Data/Application/
57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositories/my_project/

$ ls -al
total 0
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 .
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:22 ..
drwxr-xr-x  9 mobile  mobile  288 Mar 30 01:23 .git
$
$ cd .git
$ ls -al
total 24
drwxr-xr-x  9 mobile  mobile  288 Mar 30 01:44 .
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 ..
-rw-r--r--  1 mobile  mobile   23 Mar 30 01:23 HEAD
-rw-r--r--  1 mobile  mobile  204 Mar 30 01:44 config
-rw-r--r--  1 mobile  mobile   73 Mar 30 01:23 description
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 hooks
drwxr-xr-x  3 mobile  mobile   96 Mar 30 01:23 info
drwxr-xr-x  4 mobile  mobile  128 Mar 30 01:23 objects
drwxr-xr-x  4 mobile  mobile  128 Mar 30 01:23 refs
$ 
$ lg2 config user.name "Emasoft"
$ lg2 config user.email "[email protected]"
$
$ cat config
[core]
        bare = false
        repositoryformatversion = 0
        filemode = true
        precomposeunicode = true
        logallrefupdates = true
[user]
        name = Emasoft
        email = [email protected]
[init]
        defaultBranch = my_project
$ 
$ lg2 config --list --show-origin
Unable to set configuration: invalid config item name '--list'
$
$ lg2 config --global --list --show-origin
USAGE: lg2 config <KEY> [<VALUE>]
    This repository's configuration file should be located at /private/var/mobile/Co
ntainers/Data/Application/57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositorie
s/my_project/.git/config
    To update global configurations, try editing ~/Documents/.gitconfig.
$
$ lg2 config --global init.defaultBranch my_project
USAGE: lg2 config <KEY> [<VALUE>]
    This repository's configuration file should be located at /private/var/mobile/Co
ntainers/Data/Application/57D0B943-BFE9-4312-A6A7-78E47884B6A8/Documents/repositorie
s/my_project/.git/config
    To update global configurations, try editing ~/Documents/.gitconfig.

But unfortunately no such file (~/Documents/.gitconfig) exists. :-(

At present, ~/Documents/.gitconfig needs to be edited with an editor like ViM.

from a-shell.

Emasoft avatar Emasoft commented on July 16, 2024

At present, ~/Documents/.gitconfig needs to be edited with an editor like ViM.

I tried to create the file, but it still says the same thing. Maybe there is some specific content that is looking for inside the .gitconfig?

from a-shell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.