Commit Briefs

Thomas Adam

fix interaction of 'got fetch -b', got.conf, and work tree

Without branches in got.conf for a remote, and without -b/-R options, the fallback to HEAD would only work when not invoked in a work tree. With this fix 'got fetch' should behave as described in the man page. The -b option now overrides both got.conf and the fallback to the work tree's branch. And fallback to HEAD works as expected when invoked in a repository. Also, do not strictly require remote repositories to provide a branch from the refs/heads/ namespace. In such cases users should be able to use -R to select something to fetch. ok jamsek


Thomas Adam

improve 'got fetch' behaviour when work tree's branch is not on server

Only fetch the work tree's branch if the -b option is not specified. This keeps -b functional as an override when invoked in a work tree. Our previous changes did not consider that got.conf is also a source of lists of branches to fetch, and that -b is supposed to work as an override of any default behaviour. We were implicitly appending the work tree's branch as if it was mentioned as an override on the command line, which was wrong and based on a misunderstanding of the intended behaviour. Without -b on the command line we obtain a list of branches to fetch from got.conf and use this list if it is not empty. The repository's HEAD will be fetched only if neither the -b option, nor got.conf, nor a work tree tell us what to fetch. Make the man page more clear by moving the explanation of the default behaviour into the main section of 'got fetch', leaving the -a and -b option descriptions free of such details. ok jamsek




Thomas Adam

use test(1) -eq and -ne to compare integers, and reduce quoting

This brings the rest of the regression test scripts in line with patch.sh.




Christian Weisgerber

make "got branch -d" print reference name and value

Also silence output of "got branch -d" in a regression test, from stsp. ok stsp





Stefan Sperling

add a 'reference' directive to remote repositories in got.conf(5)

Make use of this in 'got clone' to persist -R option arguments given on the command line in the cloned repository's got.conf(5) file.


Stefan Sperling

work around spurious ACK responses from git servers in got-fetch-pack

The Git server can apparently send duplicate ACK responses even though we do not enable the multi_ack capability. According to the Git protocol docs the server should only send ACKs after receiving 'done' from the client if multi_ack has been enabled. However, a duplicate ACK response can be triggered by running 'got fetch -a' in our fetch_update_tag test. This resulted in the following error: got-fetch-pack: unknown side-band received from server got: bad packet received


Stefan Sperling

allow the 'got fetch' -l option together with the -q option

Make use of this in tests to hide useless output from ssh(1).


Stefan Sperling

make 'got clone' pin the fetched branch in got.conf(5)

Avoids relying on the server-side HEAD ref by default during future fetches.



Stefan Sperling

properly handle nonexistent remote repository names given to 'got fetch'

found by jrick ok naddy


Christian Weisgerber

switch function declarations from Korn shell to Bourne/POSIX shell syntax

ok stsp



Stefan Sperling

add a -q option to tests for quiet output and use it for 'make regress'

Previous default output remains when test cases are run individually. ok tracey