aboutsummaryrefslogtreecommitdiffstats
path: root/gitto
Commit message (Collapse)AuthorAgeFilesLines
* Add push commandGravatar Tom Willemse2014-03-042-3/+40
|
* Allow a name to be used to remove a repositoryGravatar Tom Willemse2014-03-043-10/+67
| | | | | Allow users to specify a name instead of a path to remove a repository from the repository list. Paths may also still be used.
* Extract RC loading from mainGravatar Tom Willemse2014-03-021-14/+18
|
* Simplify the remove commandGravatar Tom Willemse2014-03-021-5/+14
|
* Simplify purge commandGravatar Tom Willemse2014-03-012-4/+6
|
* Promote hookwrapper to procedureGravatar Tom Willemse2014-03-011-9/+10
|
* Extract print-configGravatar Tom Willemse2014-03-011-8/+9
|
* Simplify save-repositories-listGravatar Tom Willemse2014-03-013-18/+30
| | | | | | | | | Simplify `save-repositories-list' by extracting some of the functionality into its own procedures. Since there is now a `repository-name<?' procedure the `repository<?' procedure is renamed to `repository-location<?' for clarity and accuracy, since that is what it really checks.
* Simplify list-repository-locationsGravatar Tom Willemse2014-03-012-7/+11
| | | | | Simplify `list-repository-location' by extracting the lambda's used and defining them as separate procedures.
* Reorder variables and proceduresGravatar Tom Willemse2014-03-011-54/+56
|
* Reorder commandsGravatar Tom Willemse2014-03-011-135/+135
|
* Split known? into a couple of functionsGravatar Tom Willemse2014-03-011-6/+13
|
* Move help command to its own moduleGravatar Tom Willemse2014-03-013-29/+52
|
* Separate command operations into moduleGravatar Tom Willemse2014-03-013-35/+75
| | | | | | Separate and encapsulate operations on commands in their own module. This gives a more clearly defined API to the commands and will allow other modules to specify commands as well.
* Extract some functions from the help commandGravatar Tom Willemse2014-03-011-11/+19
| | | | | Simplify the `help' command by extracting the code into separate functions.
* Extract hooks init from configGravatar Tom Willemse2014-01-281-16/+20
|
* Give command names less room in help outputGravatar Tom Willemse2013-11-121-1/+1
| | | | | So far no command name has gone beyond 15 characters, and the purge help text was 2 characters too wide.
* Makefile: Put path and main in order of dependenceGravatar Tom Willemse2013-11-101-2/+2
| | | | | | The `main' module depends on `path', not the other way around, just to be sure to keep away compilation warnings or double compilation compile `path' first.
* Allow directory specification for config updateGravatar Tom Willemse2013-11-101-13/+24
| | | | | | Add an optional directory parameter to the `config update' and `config hooks' commands, which, if specified, will limit any updates to the given repository.
* Make sure to deal with a repositoryGravatar Tom Willemse2013-11-102-3/+13
| | | | | | | When checking when a repository is known or not be sure that there is actually a chance that we are looking at a repository. If the thing to be checked is neither a `<repository>' instance nor a string it's sure that it's also not a registered repository.
* Add warnings when compilingGravatar Tom Willemse2013-06-081-1/+4
| | | | They help catch some easy to overlook mistakes.
* Specify usage information in the commandGravatar Tom Willemse2013-06-081-39/+88
|
* Only show branches with changes by defaultGravatar Tom Willemse2013-06-071-5/+14
| | | | | Unless `show-unchanged-branches?' has been set to `#t' in the user's configuration only branches with pushable or pullable commits are shown.
* Catch wrong number of arguments caseGravatar Tom Willemse2013-06-051-3/+6
| | | | If a command gets the wrong number of arguments, tell the user.
* Use a macro to define commandsGravatar Tom Willemse2013-06-051-20/+19
|
* Add some docstringsGravatar Tom Willemse2013-05-313-5/+73
|
* Properly handle multiple values for settingsGravatar Tom Willemse2013-05-291-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes an error that would cause values to be duplicated when specifying multiple values for a setting. Prior to this commit specifying multiple values for a setting would blindly replace one occurrence and add the rest, leaving any possible other occurrences intact. When starting fresh this would not be a problem, but using it multiple times would add the same settings repeatedly. - gitto/config.scm (merge-setting): If the given value is a of type `list', replace the `%a' specifier for each item in it. - gitto/config.scm (merge-settings): Move the handling of the case of `v' being a list into `merge-setting'. - gitto/config.scm (split-setting): Rename `parse-setting' to `split-setting'. Return a cons cell instead of a list. - gitto/config.scm (read-setting): New function. - gitto/config.scm (read-config): Remove unused variable. Use `read-setting' to get the right value for each line of the config file. - gitto/config.scm (write-setting): In case we're dealing with a list, print each value separately.
* Add clean make targetGravatar Tom Willemse2013-05-271-1/+5
|
* Add user manualGravatar Tom Willemse2013-05-271-2/+2
|
* Allow multiple values for config settingsGravatar Tom Willemse2013-05-251-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting a list as a value for `global-config' will instruct gitto to place that setting in the config more than once. For example: ,---- | (set! global-config | '(("remote \"origin\"" | ("url" . "git@somehost.com:~a.git") | ("pushurl" "git@somehost.com:~a.git" | "git@someotherhost.com:user/~a.git")))) `---- Will produce output similar to: ,---- | [remote "origin"] | url = git@somehost.com:repo-name.git | pushurl = git@somehost.com:repo-name.git | pushurl = git@someotherhost.com:user/repo-name.git `---- The ordering may vary depending on what was already found in the `origin' remote's settings. gitto doesn't know or care which settings can and cannot appear more than once in a configuration, it is up to the user to provide valid values.
* Add simple hook managementGravatar Tom Willemse2013-05-252-1/+19
| | | | | | | | | | | | | Introduces a new user configuration variable `hook-alist', which specifies which hooks to link to which executables, for example: ,---- | (set! hook-alist '(("commit-msg" . "/path/to/my/commit/msg/hook"))) `---- With this setting the command `config hooks' will install `/path/to/my/commit/msg/hook' to the `commit-msg' hook of each repository not in the `config-exclusion-list' setting.
* Ask to merge settings when registering repoGravatar Tom Willemse2013-05-233-12/+60
| | | | | | | | | | The `add' command will ask the user if they would like to merge their settings with the newly registered repository's if the current input is a tty and if the user has specified some settings. The default for this is `#t', so pressing <RET> when presented with this question will merge the settings, however if the user is never asked (because the input is not a tty) no merge will happen.
* Update help messageGravatar Tom Willemse2013-05-211-7/+13
|
* Change nameGravatar Tom Willemse2013-05-204-5/+5
|
* Add simplistic command structureGravatar Tom Willemse2013-05-201-46/+38
| | | | | | | | | | | | | | | | | | | Now instead of using `gitto --register' or `gitto -r' one would use `gitto add'. Here is the list of what was and what is: --version, -v => version --help, -h => help --register, -r => add --remove, -R => remove --repositories, -l => list locations --purge, -p => purge --check, -c => check --config, -C => config --global-config => config global --update-config => config update Running gitto without arguments keeps the same functionality, though it can also be called as `gitto list'.
* Remove docstring from config-exclusion-listGravatar Tom Willemse2013-05-201-2/+1
| | | | | Apparently that is not the right place for a docstring, I must have been thinking about emacs lisp.
* Add exclusion listGravatar Tom Willemse2013-05-191-5/+9
| | | | | | | | | 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"))
* Add config management commandsGravatar Tom Willemse2013-05-173-8/+126
| | | | | These commands parse the git configuration file and, merge settings defined in the rc.scm and print out the resulting configuration.
* Split git function into separate moduleGravatar Tom Willemse2013-05-123-124/+167
|
* Fix some bugsGravatar Tom Willemse2013-05-121-2/+5
| | | | | | | | | - 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?'.
* Fix error when XDG_*_HOME is specifiedGravatar Tom Willemse2013-05-101-1/+1
| | | | | | | 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.
* 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
|