Re: [git-users] portable git?

2013-06-27 Thread Konstantin Khomoutov
On Wed, 26 Jun 2013 13:00:13 -0700 (PDT)
supertol felixo...@gmail.com wrote:

 Is there any version of git that works as a standalone executable
 file (can still depend on libraries, ofc).
 Means, i'd be lookinf for a git.exe (+ dependencies) that i can just
 drop to a folder and use to initialize a repo in that folder, without
 having git installed and without git somehow 'polluting' the system. 
 
 A true standalone command line tool.
 
 It *seems* to work when i copy the entire git/bin folder over. Can
 anyone confirm this works, or does that have side effects?

It's a bit complicated:

1) There's a single top-level Git binary, which is simply called `git`,
   and which is responsible for handling individual commands (like
   `git push`) either by itself or by dispatching them to other
   programs.

2) Now there's a handful of legacy `git-whatever` programs, most of
   which are symlinks to that top-level `git` binary.  They are there
   to not break existing scripts which rely on their presence.

3) Some bits of Git functionality are implemented not by the main
   program but other programs.  Notable examples are `git rebase`,
   `git submodule` and `git svn`.

   On my Debian system I could do

   $ vdir /usr/lib/git-core/

   and just look at which entries are symlinks and which are regular
   files to get the idea.

4) While most of Git is implemented in C, some bits of it are
   implemented in POSIX shell (`git rebase` is a notable example),
   and others are implemented in Perl (`git svn` is a notable example).

   While the shell scripts are usually self-contained, `git svn` depends
   on the presence of a rather extensive Perl library to interact with
   Subversion servers; for this reason Git for Windows even bundles this
   whole stuff.

So, in the end:

* No, there's no single executable.
* Mere copying the main Git binary could work for some fair percent of
  Git functionality -- unless you call a Git command using the legacy
  `git-whatever` convention or attempt to call something not implemented
  by the main Git binary itself, for instance, `git rebase`.
* Everything implemented in Perl will be out of the game, for the same
  reason.

Another thing to consider is that Git does not makes any promises about
how exactly various commands it supports are implemented: for instance,
some day `git rebase` might be re-implemeted using C and hence will be
supported directly by the main Git binary.

If you really need a self-contained executable, consider looking at
Fossil [1] -- it (in my eyes) is inferiour to Git feature-wise, but its
binaries are routinely dependent only on libc, libz (but it could be
compiled in statically) and libssl if you want SSL support.
And it's self-serving, including an extensive built-in web UI.
I'm using it in several places and for simple things it works bearable,
especially if you're not too much into command-line stuff (I am, so
that's why bearable and not wonderful) ;-)

1. http://www.fossil-scm.org/

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [git-users] portable Git

2012-12-30 Thread Martin Møller Skarbiniks Pedersen
On 30 December 2012 16:01, Gabby Romano omerik...@gmail.com wrote:
 hi all - does anyone know where I can fine a portable version of Git for
 Linux so no install is needed (yum or anything) ?

Portable for me normally means something that can run from a USB-drive
on windows ?

Anyway on linux, you can just download the source and compile it.

$ ./configure  make  make install

It will be default install into your own home directory.

Regards
Martin

-- 




Re: [git-users] portable Git

2012-12-30 Thread Gabby Romano
What I meant was a zipped git which can be extracted on a target machine
and will work without any additional settings,or just adding it to the path
env var. I had it in the past but forgot how I got it..:-) .
On 30 Dec 2012 19:27, Martin Møller Skarbiniks Pedersen 
traxpla...@gmail.com wrote:

 On 30 December 2012 16:01, Gabby Romano omerik...@gmail.com wrote:
  hi all - does anyone know where I can fine a portable version of Git for
  Linux so no install is needed (yum or anything) ?

 Portable for me normally means something that can run from a USB-drive
 on windows ?

 Anyway on linux, you can just download the source and compile it.

 $ ./configure  make  make install

 It will be default install into your own home directory.

 Regards
 Martin

 --




--