aboutsummaryrefslogtreecommitdiffstats
path: root/gitto/main.scm
Commit message (Collapse)AuthorAgeFilesLines
* Show status per branchGravatar Tom Willemse2013-05-051-22/+55
| | | | | | | Instead of looking at the current HEAD, look at each branch separately. This also means that if you customize the `print' method in your init file you should also go over all the branches. You can now also customize the `print' method for the `<branch>' type.
* Turn format function into a generic methodGravatar Tom Willemse2013-05-051-22/+15
| | | | | | | | | | | | | | | This changes the way formatting functions can be customized in the init file to: ,---- | (define-method (print (repo <repository>)) | (format #t "~a: ~d up; ~d down; ~a. Updated ~a~%" | (repo-name repo) (repo-pushable repo) (repo-pullable repo) | (if (repo-clean? repo) "clean" "dirty") (repo-updated repo))) `---- Note that it is possible that REPO doesn't exist, so you should always check for that first.
* Use lazy evaluation to speed-up startupGravatar Tom Willemse2013-05-051-27/+36
| | | | | | Before using goops the relevant information was gathered when it was needed, but now with goops everything is gathered at startup. So use lazy evaluation to defer that gathering until it is needed.
* Use goops to encapsulate repositoriesGravatar Tom Willemse2013-05-051-25/+61
|
* Separate repository line formatting into format-repositoryGravatar Tom Willemse2013-05-051-4/+7
| | | | | | | | | | | | | | | | | | | | | This way people can override this function in their RC files, and specify what information they would like to see where. They would do this with, for example: ,---- | (set! format-repository | (lambda (name pushable pullable clean? updated) | (format #t "~a: ~d up; ~d down; ~a. Updated ~a\n" | name pushable pullable (if clean? "clean" "dirty") | updated))) `---- To turn each line into the like of: ,---- | gitto: 1 up; 0 down; dirty. Updated 4 months ago `----
* Load an initialization file at startupGravatar Tom Willemse2013-05-051-19/+31
| | | | | This file is located either in XDG_CONFIG_HOME or, in case XDG_CONFIG_HOME is empty, in HOME/.config/gitto.
* Replace README.markdown with README.orgGravatar Tom Willemsen2013-01-201-1/+1
| | | | And add .0 to version
* Add -p option to help and fix typoGravatar Tom Willemsen2013-01-201-1/+2
| | | | | The `-p' option was already implemented, but it wasn't yet explained in the help output.
* Tiny style cleanupGravatar Tom Willemsen2012-10-171-1/+2
|
* Add check commandGravatar Tom Willemsen2012-10-171-2/+9
| | | | Checks to see if the specified directory has been registered.
* Use ? for bool valuesGravatar Tom Willemsen2012-09-261-13/+13
|
* Add --purgeGravatar Tom Willemsen2012-09-261-2/+10
| | | | | `--purge' deletes all the repositories from gitto that don't exist on the filesystem (anymore).
* Check if we know the argument to -RGravatar Tom Willemsen2012-09-181-3/+8
| | | | If we don't, fail in getopt-long.
* Don't fail with no-longer existing reposGravatar Tom Willemsen2012-09-181-2/+4
| | | | | | | When a repo is in the repositories list, but not where it should be, don't care, if we know it, delete it. Don't require the argument for delete to exist on the filesystem.
* Don't fail when a repository can't be foundGravatar Tom Willemsen2012-09-181-8/+12
| | | | Report it instead.
* Add relative directory parsingGravatar Tom Willemsen2012-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of now, when using `-r' or `-R', relative directories can be used. This *does not* include locations starting with `~', those still need to be handled by your shell. Because every repo is treated as a possible relative path, and thus passed on to `realpath', the paths have become very uniform. This means that it will now only register and unregister paths that don't have a trailing `/'. This is not true during usage, so those paths still work, but they can't be removed by gitto, and adding them again will create a duplicate entry. * gitto/Makefile (objects): Add `path.scm' and `path.go'. (.PHONY): Add `all' as a phony target. (all): New target, compiles all `.go' targets. ($(filter %.go,$(objects))): Use `env' to run guild so that include paths are setup properly. * gitto/main.scm (gitto): Use new `(gitto path)' module, it contains the `realpath' function. (register-repository): (remove-repository): Always pass REPOSITORY through `realpath' and use the result. * gitto/path.scm: New file. Loads the `libguile-gitto-path' extension and exports its `realpath' function. * src/Makefile (CFLAGS): (LDFLAGS): Use `pkg-config' to gather the necessary values for guile. (libguile-gitto-path.so): New guile extension, wraps the `readline' POSIX function. * src/gitto-path.c: New file, wraps and exports the `realpath' POSIX function from `stdlib.h'.
* Update/add docstringsGravatar Tom Willemsen2012-07-081-2/+12
|
* Add GPL license and necessary commentsGravatar Tom Willemsen2012-07-011-1/+24
|
* Handle brand-new repositories betterGravatar Tom Willemsen2012-07-011-9/+14
| | | | | | stderr from the underlying git process was not being redirected/ignored properly, now somewhat more. If EOF is encountered when asking for the last update date it is shown as "never".
* Sort repositoriesGravatar Tom Willemsen2012-07-011-1/+7
| | | | | Upon saving, sort the repositories alphabetically by `basename'. When `-l' is provided sort before output by location.
* Add Last update to normal outputGravatar Tom Willemsen2012-07-011-4/+11
| | | | | | | When viewing the status of your repositories you will now see also when your last update to the upstream branch was. If you have not fetched or pulled the latest changes from your upstream, this will not be accurate.
* Minor style changeGravatar Tom Willemsen2012-07-011-24/+23
|
* Add switch to list saved repository locationsGravatar Tom Willemsen2012-07-011-2/+12
|
* Reserve 15 columns for namesGravatar Tom Willemsen2012-07-011-1/+1
| | | | | Align data about a repository at 15 characters, for now. Looks a little bit cleaner.
* Add Makefiles, utilityGravatar Tom Willemsen2012-07-011-0/+122
Change the directory structure and add a bunch of Makefiles to make it easy to install gitto. Also add a utility to run gitto in its current state.