aboutsummaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-08-31 13:23:26 +0200
committerGitHub <noreply@github.com>2019-08-31 13:23:26 +0200
commit2b14bb253c0bbc7e5010de62f2dc527186d88f0a (patch)
treeb1e4b5d0eb51007bf50b375fca6d0dedc2439904 /input
parenta9f278fdce2393e48f4d4b2029b5c0aa55056602 (diff)
parent6a0336e04b17bf232375be880a410a0531b9f7ff (diff)
downloadgit-bug-2b14bb253c0bbc7e5010de62f2dc527186d88f0a.tar.gz
Merge pull request #205 from seeduvax/issue-178
issue 178: fetch the repo dir with rev-parse --git-dir
Diffstat (limited to 'input')
-rw-r--r--input/input.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/input/input.go b/input/input.go
index 789373b0..ca787ceb 100644
--- a/input/input.go
+++ b/input/input.go
@@ -239,7 +239,7 @@ func QueryEditorInput(repo repository.RepoCommon, preQuery string) (string, erro
// launchEditorWithTemplate will launch an editor as launchEditor do, but with a
// provided template.
func launchEditorWithTemplate(repo repository.RepoCommon, fileName string, template string) (string, error) {
- path := fmt.Sprintf("%s/.git/%s", repo.GetPath(), fileName)
+ path := fmt.Sprintf("%s/%s", repo.GetPath(), fileName)
err := ioutil.WriteFile(path, []byte(template), 0644)
@@ -254,13 +254,13 @@ func launchEditorWithTemplate(repo repository.RepoCommon, fileName string, templ
// method blocks until the editor command has returned.
//
// The specified filename should be a temporary file and provided as a relative path
-// from the repo (e.g. "FILENAME" will be converted to ".git/FILENAME"). This file
+// from the repo (e.g. "FILENAME" will be converted to "[<reporoot>/].git/FILENAME"). This file
// will be deleted after the editor is closed and its contents have been read.
//
// This method returns the text that was read from the temporary file, or
// an error if any step in the process failed.
func launchEditor(repo repository.RepoCommon, fileName string) (string, error) {
- path := fmt.Sprintf("%s/.git/%s", repo.GetPath(), fileName)
+ path := fmt.Sprintf("%s/%s", repo.GetPath(), fileName)
defer os.Remove(path)
editor, err := repo.GetCoreEditor()