path: root/git-remote.perl
AgeCommit message (Collapse)Author
2007-09-03Teach "git remote" a mirror modeJohannes Schindelin
When using the "--mirror" option to "git remote add", the refs will not be stored in the refs/remotes/ namespace, but in the same location as on the remote side. This option probably only makes sense in a bare repository. Signed-off-by: Johannes Schindelin <> Signed-off-by: Junio C Hamano <>
2007-07-06Add -v|--verbose to git remote to show remote urlAlex Riesen
Many other commands already have such an option, and I find it practical to see where all the remotes actually come from. Signed-off-by: Alex Riesen <> Signed-off-by: Junio C Hamano <>
2007-06-13git-remote show: Also shorten non-fast-forward refs in the 'push' listingJohannes Sixt
'git-remote show remote-name' lists the refs that are pushed to the remote by showing the 'Push' line from the config file. But before showing it, it shortened 'refs/heads/here:refs/heads/there' to 'here:there'. However, if the Push line is prefixed with a plus, the ref was not shortened. Signed-off-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <> config_boolean() -> config_bool()Petr Baudis
This patch renames config_boolean() to config_bool() for consistency with the commandline interface and because it is shorter but still obvious. ;-) It also changes the return value from some obscure string to real Perl boolean, allowing for clean user code. Signed-off-by: Petr Baudis <>
2007-03-20Teach git-remote to list pushed branches.Johannes Sixt
The configured refspecs are printed almost verbatim, i.e. both the local and the remote branch name separated by a colon are printed; only the prefix 'refs/heads/' is removed, like this: Local branch(es) pushed with 'git push' master refs/tags/*:refs/tags/* next:next Signed-off-by: Johannes Sixt <> Signed-off-by: Junio C Hamano <>
2007-02-21git-remote: support remotes with a dot in the namePavel Roskin
[jc: the original from Pavel was limiting the variable names to only fetch and url, but I loosened it to take valid variable names.] Signed-off-by: Pavel Roskin <> Signed-off-by: Junio C Hamano <>
2007-02-21Allow git-remote to update named groups of remotesTheodore Ts'o
In response to a feature request from Shawn Pearce, this patch allows a user to update a named group of remotes by using "git remote update <group>", where the group is defined in the config file by remotes.<group>. The default if the named group is not specified is now fetched group remotes.default, instead of remote.fetch, which is what had been previously used. In addition, if remotes.default is not defined, all remotes defined in the config file will be used, as before, but there is now also possible to request that a particular repository to be skipped by default by using the boolean configuration parameter remote.<name>.skipDefaultUpdate. Signed-off-by: "Theodore Ts'o" <> Signed-off-by: Junio C Hamano <>
2007-02-20Teach git-remote to update existing remotes by fetching from themTheodore Ts'o
This allows users to use the command "git remote update" to update all remotes that are being tracked in the repository. Signed-off-by: "Theodore Ts'o" <> Signed-off-by: Junio C Hamano <>
2007-02-05Teach git-remote add to fetch and trackJunio C Hamano
This adds three options to 'git-remote add'. * -f (or --fetch) option tells it to also run the initial "git fetch" using the newly created remote shorthand. * -t (or --track) option tells it not to use the default wildcard to track all branches. * -m (or --master) option tells it to make the remote/$name/HEAD point at a remote tracking branch other than master. For example, with this I can say: $ git remote add -f -t master -t quick-start -m master \ jbf-um git:// to (1) create remote.jbf-um.url; (2) track master and quick-start branches (and no other); the two -t options create these two lines: fetch = +refs/heads/master:refs/remotes/jbf-um/master fetch = +refs/heads/quick-start:refs/remotes/jbf-um/quick-start (3) set up remotes/jbf-um/HEAD to point at jbf-um/master so that later I can say "git log jbf-um" Or I could do $ git remote add -t 'ap/*' andy /home/andy/git.git to make Andy's topic branches kept track of under refs/remotes/andy/ap/. Other possible improvements I considered but haven't implemented (hint, hint) are: * reject wildcard letters other than a trailing '*' to the -t parameter; * make -m optional and when the first -t parameter does not have the trailing '*' default to that value (so the above example does not need to say "-m master"); * if -m is not given, and -t parameter ends with '*' (i.e. the above defaulting did not tell us where to point HEAD at), and if we did the fetch with -f, check if 'master' was fetched and make HEAD point at it. Signed-off-by: Junio C Hamano <>
2007-02-02Teach 'git remote' how to cleanup stale tracking branches.Shawn O. Pearce
Since it can be annoying to manually cleanup 40 tracking branches which were removed by the remote system, 'git remote prune <n>' can now be used to delete any tracking branches under <n> which are no longer available on the remote system. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2007-02-02Pull out remote listing functions in git-remote.Shawn O. Pearce
I want to reuse the stale branch detection to implement a new 'git remote prune' subcommand. Easiest way to do that is to use the same logic that 'git remote show' uses to determine the stale tracking branches, then delete those. Signed-off-by: Shawn O. Pearce <> Signed-off-by: Junio C Hamano <>
2007-01-29[PATCH] Rename git-repo-config to git-config.Tom Prince
Signed-off-by: Tom Prince <> Signed-off-by: Junio C Hamano <>
2007-01-13git-remote: no longer silent on unknown commands.Quy Tonthat
Signed-off-by: Quy Tonthat <> Signed-off-by: Junio C Hamano <>
2007-01-05git-remoteJunio C Hamano
It might be handy to have a single command that helps you manage your configuration that relates to downloading from remote repositories. This currently does only about 20% of what I want it to do. $ git remote shows the list of 'remotes' you have defined somewhere, and $ git remote origin shows the details about the named remote (in this case "origin"). How the branches are tracked, if you have a tracking branch that is stale, etc. $ git add another git:// defines the default remote.another.url and remote.another.fetch entries just like a clone does; you can say "git fetch another" afterwards. For it to be useful, I think it should be enhanced to: - check overlaps of tracking branches and warn; - offer to remove stale tracking branches in one go; - offer ways to remove or rename remote; - offer ways to update an existing remote, perhaps have an interactive mode; Other enhancements might be also possible, but I do not think of anything that is absolutely necessary other than the above right now. Signed-off-by: Junio C Hamano <>