The variable `config-exclusion-list' can be used to specify project
names that should not have their configuration overwritten by
`gitto --update-config'. It is a normal list of strings which name the
repositories that should be left alone, like so:
(set! config-exclusion-list '("repo1" "repo2" "repo3"))
- The `register-repository' procedure was using a non-existent
procedure `repository-name', this should be `repo-name'.
- The `purge' procedure was working on a collection of `<repository>'
objects, but assuming they were file names, the `repo-location'
should first be extracted before calling `file-exists?'.
Unlike some other lisps scheme's `unless' returns `#<unspecified>'
instead of nil, and `string-append' doesn't accept this as a valid
argument. So use an empty string if XDG_*_HOME has been specified and
FALLBACK otherwise.
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.
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.
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.
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
`----
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.
Because it looks cooler.
This way its easy to keep all the information about the function in
one place, and it makes it easier/more interesting to add new
functions later.
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'.
Set environment settings in `env' and have `run-gitto' use it, this
makes it easy for other commands (like make) to utilize this as well.
* env: New file, set environment variables needed to do anything with
gitto outside of an installed state.
* run-gitto: Move environment settings to `env' and just run it.
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".
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.