Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: go

dist: trusty
sudo: required
dist: xenial

services:
- docker
Expand All @@ -16,9 +15,6 @@ matrix:
allow_failures:
- go: tip

before_install:
- sudo apt-get update

install:
# tools
- go get github.com/golang/lint/golint
Expand Down Expand Up @@ -52,13 +48,3 @@ script:
while ! curl localhost:3000 -so /dev/null; do sleep 1; done;
./tests/${testscript};
fi

after_script:
# push logs to gist
- if [[ "${TRAVIS_GO_VERSION}" != "tip" ]]; then
echo $GISTTOKEN > ./tests/testuserhome/.gist;
mv ./tests/testuserhome/log/gin.log ./tests/testuserhome/log/gin-${TRAVIS_BRANCH}-${testscript}.log;
mv ./tests/testuserhome/log/tests.log ./tests/testuserhome/log/tests-${TRAVIS_BRANCH}-${testscript}.log;
./tests/run-cont find ./log -type f -exec gist -u 59e3b1c2fc3ff525127f9b3af81e7f4c {} \+ ;
rm ./tests/testuserhome/.gist;
fi
14 changes: 11 additions & 3 deletions git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (s RepoFileStatus) MarshalJSON() ([]byte, error) {
}
return json.Marshal(struct {
RFSAlias
Err string
Err string `json:"err"`
}{
RFSAlias: RFSAlias(s),
Err: errmsg,
Expand Down Expand Up @@ -516,9 +516,17 @@ func Commit(commitmsg string) error {

// CommitEmpty performs a commit even when there are no new changes added to the index.
// This is useful for initialising new repositories with a usable HEAD.
// (git commit --allow-empty)
// In indirect mode (non-bare repositories) simply uses git commit with the '--allow-empty' flag.
// In direct mode it uses git-annex sync.
// (git commit --allow-empty or git annex sync --commit)
func CommitEmpty(commitmsg string) error {
cmd := Command("commit", "--allow-empty", fmt.Sprintf("--message=%s", commitmsg))
msgarg := fmt.Sprintf("--message=%s", commitmsg)
var cmd shell.Cmd
if !IsDirect() {
cmd = Command("commit", "--allow-empty", msgarg)
} else {
cmd = AnnexCommand("sync", "--commit", msgarg)
}
stdout, stderr, err := cmd.OutputError()
if err != nil {
log.Write("Error during CommitEmpty")
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version=1.4
version=1.5dev