Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package chezmoi for openSUSE:Factory checked in at 2022-11-15 13:18:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/chezmoi (Old) and /work/SRC/openSUSE:Factory/.chezmoi.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "chezmoi" Tue Nov 15 13:18:56 2022 rev:5 rq:1035709 version:2.27.1 Changes: -------- --- /work/SRC/openSUSE:Factory/chezmoi/chezmoi.changes 2022-11-10 14:23:36.634800023 +0100 +++ /work/SRC/openSUSE:Factory/.chezmoi.new.1597/chezmoi.changes 2022-11-15 13:21:38.376867087 +0100 @@ -1,0 +2,8 @@ +Mon Nov 14 17:42:41 UTC 2022 - filippo.bona...@suse.com + +- Update to version 2.27.1: + * chore: Make generation of versioninfo.json work without tags or git repo + * feat: Remember HTTP username in URL in init command + * fix: Don't show always scripts in apply --verbose when excluded from diffs + +------------------------------------------------------------------- Old: ---- chezmoi-2.27.0.obscpio New: ---- chezmoi-2.27.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ chezmoi.spec ++++++ --- /var/tmp/diff_new_pack.2mkBLz/_old 2022-11-15 13:21:38.936869978 +0100 +++ /var/tmp/diff_new_pack.2mkBLz/_new 2022-11-15 13:21:38.940869999 +0100 @@ -17,7 +17,7 @@ Name: chezmoi -Version: 2.27.0 +Version: 2.27.1 Release: 0 Summary: A multi-host manager for dotfiles License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.2mkBLz/_old 2022-11-15 13:21:38.972870164 +0100 +++ /var/tmp/diff_new_pack.2mkBLz/_new 2022-11-15 13:21:38.976870184 +0100 @@ -2,7 +2,7 @@ <service name="obs_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://github.com/twpayne/chezmoi.git</param> - <param name="revision">v2.27.0</param> + <param name="revision">v2.27.1</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.2mkBLz/_old 2022-11-15 13:21:39.000870309 +0100 +++ /var/tmp/diff_new_pack.2mkBLz/_new 2022-11-15 13:21:39.004870329 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/twpayne/chezmoi.git</param> - <param name="changesrevision">92993ed1f980340876a1b44e39ba382c41309053</param></service></servicedata> + <param name="changesrevision">b6039e787dfffe970fec4f9165ec9ebe1b3ceaa6</param></service></servicedata> (No newline at EOF) ++++++ chezmoi-2.27.0.obscpio -> chezmoi-2.27.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/assets/chezmoi.io/docs/reference/commands/init.md new/chezmoi-2.27.1/assets/chezmoi.io/docs/reference/commands/init.md --- old/chezmoi-2.27.0/assets/chezmoi.io/docs/reference/commands/init.md 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/assets/chezmoi.io/docs/reference/commands/init.md 2022-11-11 19:25:15.000000000 +0100 @@ -7,13 +7,13 @@ HTTPS by default, or SSH if the `--ssh` option is specified, according to the following patterns: -| Pattern | HTTPS Repo | SSH repo | -| ------------------ | -------------------------------------- | ---------------------------------- | -| `user` | `https://github.com/user/dotfiles.git` | `g...@github.com:user/dotfiles.git` | -| `user/repo` | `https://github.com/user/repo.git` | `g...@github.com:user/repo.git` | -| `site/user/repo` | `https://site/user/repo.git` | `git@site:user/repo.git` | -| `sr.ht/~user` | `https://git.sr.ht/~user/dotfiles` | `g...@git.sr.ht:~user/dotfiles.git` | -| `sr.ht/~user/repo` | `https://git.sr.ht/~user/repo` | `g...@git.sr.ht:~user/repo.git` | +| Pattern | HTTPS Repo | SSH repo | +| ------------------ | ------------------------------------------- | ---------------------------------- | +| `user` | `https://u...@github.com/user/dotfiles.git` | `g...@github.com:user/dotfiles.git` | +| `user/repo` | `https://u...@github.com/user/repo.git` | `g...@github.com:user/repo.git` | +| `site/user/repo` | `https://user@site/user/repo.git` | `git@site:user/repo.git` | +| `sr.ht/~user` | `https://u...@git.sr.ht/~user/dotfiles` | `g...@git.sr.ht:~user/dotfiles.git` | +| `sr.ht/~user/repo` | `https://u...@git.sr.ht/~user/repo` | `g...@git.sr.ht:~user/repo.git` | To disable git repo URL guessing pass the `--guess-repo-url=false` option. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/assets/chezmoi.io/docs/reference/release-history.md.tmpl new/chezmoi-2.27.1/assets/chezmoi.io/docs/reference/release-history.md.tmpl --- old/chezmoi-2.27.0/assets/chezmoi.io/docs/reference/release-history.md.tmpl 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/assets/chezmoi.io/docs/reference/release-history.md.tmpl 2022-11-11 19:25:15.000000000 +0100 @@ -6,6 +6,8 @@ {{ $release.Body | replaceAllRegex "(?m)^## What's Changed$" "" | replaceAllRegex "(?m)^## Changelog\\r?$" "" + | replaceAllRegex "(?m)^## (New Contributors)\\r?$" "$1\n" + | replaceAllRegex "\\*\\*(Full Changelog)\\*\\*" "$1" | replaceAllRegex "(https://github\\.com/twpayne/chezmoi/compare/(\\S+))" "[`$2`]($1)" | replaceAllRegex "@(\\S+)" "[**$0**](https://github.com/$1)" | replaceAllRegex "pull request #(\\d+)" "pull request https://github.com/twpayne/chezmoi/pull/$1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md new/chezmoi-2.27.1/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md --- old/chezmoi-2.27.0/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/assets/chezmoi.io/docs/user-guide/manage-different-types-of-file.md 2022-11-11 19:25:15.000000000 +0100 @@ -94,6 +94,10 @@ {{ fromJson .chezmoi.stdin | setValueAtPath "key.nestedKey" "value" | toPrettyJson }} ``` +!!! warning + + Modify templates must not have a `.tmpl` extension. + Secondly, if only a small part of the file changes then consider using a template to re-generate the full contents of the file from the current state. For example, Kubernetes configurations include a current context that can be diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/assets/templates/versioninfo.json.tmpl new/chezmoi-2.27.1/assets/templates/versioninfo.json.tmpl --- old/chezmoi-2.27.0/assets/templates/versioninfo.json.tmpl 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/assets/templates/versioninfo.json.tmpl 2022-11-11 19:25:15.000000000 +0100 @@ -1,34 +1,35 @@ {{- $name := "chezmoi" -}} {{- $filename := printf "%s.exe" $name -}} -{{- /* Get the current year using the Magical Reference Date format */ -}} -{{- $currentYear := now | date "2006" -}} - -{{- $commitHash := output "git" "rev-parse" "HEAD" | trim -}} -{{- if ne "" (output "git" "diff" "--stat" | trim) -}} -{{- $commitHash = printf "%s-dirty" $commitHash -}} +{{- $comments := "" -}} +{{- if exists ".git" -}} +{{- $commitHash := output "git" "rev-parse" "HEAD" | trim -}} +{{- if ne "" (output "git" "diff" "--stat" | trim) -}} +{{- $commitHash = printf "%s-dirty" $commitHash -}} +{{- end -}} +{{- $comments = printf "commit: %s" $commitHash -}} {{- end -}} -{{- $version := semver (output "git" "describe" "--abbrev=0" "--tags" | trim) -}} -{{- $versionDict := (dict - "Major" $version.Major - "Minor" $version.Minor - "Patch" $version.Patch - "Build" 0) --}} +{{- $versionStr := "v0.0.0" -}} +{{- if and (exists ".git") (output "git" "tag" "--list" | trim) -}} +{{- $versionStr = output "git" "describe" "--abbrev=0" "--tags" | trim -}} +{{- end -}} +{{- $versionDict := dict -}} +{{- with semver $versionStr -}} +{{- $versionDict = (dict "Major" .Major "Minor" .Minor "Patch" .Patch "Build" 0) -}} +{{- end -}} {{- dict - "FixedFileInfo" (dict + "FixedFileInfo" (dict "FileVersion" $versionDict "ProductVersion" $versionDict) - "StringFileInfo" (dict - "Comments" (printf "commit: %s" $commitHash) + "StringFileInfo" (dict + "Comments" $comments "FileDescription" "Manage your dotfiles across multiple diverse machines, securely." - "FileVersion" $version.Original + "FileVersion" $versionStr "InternalName" $filename - "LegalCopyright" (printf "Copyright (c) 2018-%s Tom Payne" $currentYear) + "LegalCopyright" (printf "Copyright (c) 2018-%s Tom Payne" (now | date "2006")) "OriginalFilename" $filename "ProductName" $name - "ProductVersion" $version.Original) - | toPrettyJson -}} + "ProductVersion" $versionStr) + | toPrettyJson }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/internal/cmds/execute-template/main.go new/chezmoi-2.27.1/internal/cmds/execute-template/main.go --- old/chezmoi-2.27.0/internal/cmds/execute-template/main.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/internal/cmds/execute-template/main.go 2022-11-11 19:25:15.000000000 +0100 @@ -3,8 +3,10 @@ import ( "bytes" "context" + "errors" "flag" "fmt" + "io/fs" "net/http" "os" "os/exec" @@ -98,6 +100,16 @@ buffer := &bytes.Buffer{} funcMap := sprig.TxtFuncMap() gitHubClient := newGitHubClient(context.Background()) + funcMap["exists"] = func(name string) bool { + switch _, err := os.Stat(name); { + case err == nil: + return true + case errors.Is(err, fs.ErrNotExist): + return false + default: + panic(err) + } + } funcMap["gitHubLatestRelease"] = gitHubClient.gitHubLatestRelease funcMap["gitHubListReleases"] = gitHubClient.gitHubListReleases funcMap["gitHubTimestampFormat"] = func(layout string, timestamp github.Timestamp) string { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/debugsystem.go new/chezmoi-2.27.1/pkg/chezmoi/debugsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/debugsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/debugsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -159,13 +159,14 @@ } // RunScript implements System.RunScript. -func (s *DebugSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { - err := s.system.RunScript(scriptname, dir, data, interpreter) +func (s *DebugSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { + err := s.system.RunScript(scriptname, dir, data, options) s.logger.Err(err). Stringer("scriptname", scriptname). Stringer("dir", dir). Bytes("data", chezmoilog.Output(data, err)). - Object("interpreter", interpreter). + Object("interpreter", options.Interpreter). + Str("condition", string(options.Condition)). EmbedObject(chezmoilog.OSExecExitErrorLogObject{Err: err}). Msg("RunScript") return err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/dryrunsystem.go new/chezmoi-2.27.1/pkg/chezmoi/dryrunsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/dryrunsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/dryrunsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -107,7 +107,7 @@ } // RunScript implements System.RunScript. -func (s *DryRunSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (s *DryRunSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { s.setModified() return nil } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/dumpsystem.go new/chezmoi-2.27.1/pkg/chezmoi/dumpsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/dumpsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/dumpsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -53,6 +53,7 @@ Type dataType `json:"type" yaml:"type"` Name AbsPath `json:"name" yaml:"name"` Contents string `json:"contents" yaml:"contents"` + Condition string `json:"condition" yaml:"condition"` Interpreter *Interpreter `json:"interpreter,omitempty" yaml:"interpreter,omitempty"` } @@ -97,15 +98,18 @@ } // RunScript implements System.RunScript. -func (s *DumpSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (s *DumpSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { scriptnameStr := scriptname.String() scriptData := &scriptData{ Type: dataTypeScript, Name: NewAbsPath(scriptnameStr), Contents: string(data), } - if !interpreter.None() { - scriptData.Interpreter = interpreter + if options.Condition != ScriptConditionNone { + scriptData.Condition = string(options.Condition) + } + if !options.Interpreter.None() { + scriptData.Interpreter = options.Interpreter } return s.setData(scriptnameStr, scriptData) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/dumpsystem_test.go new/chezmoi-2.27.1/pkg/chezmoi/dumpsystem_test.go --- old/chezmoi-2.27.0/pkg/chezmoi/dumpsystem_test.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/dumpsystem_test.go 2022-11-11 19:25:15.000000000 +0100 @@ -66,9 +66,10 @@ Perm: 0o666 &^ chezmoitest.Umask, }, "script": &scriptData{ - Type: dataTypeScript, - Name: NewAbsPath("script"), - Contents: "# contents of script\n", + Type: dataTypeScript, + Name: NewAbsPath("script"), + Contents: "# contents of script\n", + Condition: "always", }, "symlink": &symlinkData{ Type: dataTypeSymlink, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/erroronwritesystem.go new/chezmoi-2.27.1/pkg/chezmoi/erroronwritesystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/erroronwritesystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/erroronwritesystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -95,7 +95,7 @@ } // RunScript implements System.RunScript. -func (s *ErrorOnWriteSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (s *ErrorOnWriteSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { return s.err } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/externaldiffsystem.go new/chezmoi-2.27.1/pkg/chezmoi/externaldiffsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/externaldiffsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/externaldiffsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -163,8 +163,12 @@ } // RunScript implements System.RunScript. -func (s *ExternalDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { - if s.filter.IncludeEntryTypeBits(EntryTypeScripts) { +func (s *ExternalDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { + bits := EntryTypeScripts + if options.Condition == ScriptConditionAlways { + bits |= EntryTypeAlways + } + if s.filter.IncludeEntryTypeBits(bits) { tempDirAbsPath, err := s.tempDir() if err != nil { return err @@ -184,7 +188,7 @@ return err } } - return s.system.RunScript(scriptname, dir, data, interpreter) + return s.system.RunScript(scriptname, dir, data, options) } // Stat implements System.Stat. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/gitdiffsystem.go new/chezmoi-2.27.1/pkg/chezmoi/gitdiffsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/gitdiffsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/gitdiffsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -201,8 +201,12 @@ } // RunScript implements System.RunScript. -func (s *GitDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { - if s.filter.IncludeEntryTypeBits(EntryTypeScripts) { +func (s *GitDiffSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { + bits := EntryTypeScripts + if options.Condition == ScriptConditionAlways { + bits |= EntryTypeAlways + } + if s.filter.IncludeEntryTypeBits(bits) { fromData, toData := []byte(nil), data fromMode, toMode := fs.FileMode(0), fs.FileMode(filemode.Executable) if !s.scriptContents { @@ -220,7 +224,7 @@ return err } } - return s.system.RunScript(scriptname, dir, data, interpreter) + return s.system.RunScript(scriptname, dir, data, options) } // Stat implements System.Stat. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/realsystem.go new/chezmoi-2.27.1/pkg/chezmoi/realsystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/realsystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/realsystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -83,7 +83,7 @@ } // RunScript implements System.RunScript. -func (s *RealSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) (err error) { +func (s *RealSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) (err error) { // Create the script temporary directory, if needed. s.createScriptTempDirOnce.Do(func() { if !s.scriptTempDir.Empty() { @@ -118,7 +118,7 @@ return } - cmd := interpreter.ExecCommand(f.Name()) + cmd := options.Interpreter.ExecCommand(f.Name()) cmd.Dir, err = s.getScriptWorkingDir(dir) if err != nil { return err diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/system.go new/chezmoi-2.27.1/pkg/chezmoi/system.go --- old/chezmoi-2.27.0/pkg/chezmoi/system.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/system.go 2022-11-11 19:25:15.000000000 +0100 @@ -13,6 +13,11 @@ "golang.org/x/sync/errgroup" ) +type RunScriptOptions struct { + Interpreter *Interpreter + Condition ScriptCondition +} + // A System reads from and writes to a filesystem, runs scripts, and persists // state. type System interface { //nolint:interfacebloat @@ -30,7 +35,7 @@ RemoveAll(name AbsPath) error Rename(oldpath, newpath AbsPath) error RunCmd(cmd *exec.Cmd) error - RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error + RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error Stat(name AbsPath) (fs.FileInfo, error) UnderlyingFS() vfs.FS WriteFile(filename AbsPath, data []byte, perm fs.FileMode) error @@ -84,7 +89,7 @@ panic("update to no update system") } -func (noUpdateSystemMixin) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (noUpdateSystemMixin) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { panic("update to no update system") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/targetstateentry.go new/chezmoi-2.27.1/pkg/chezmoi/targetstateentry.go --- old/chezmoi-2.27.0/pkg/chezmoi/targetstateentry.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/targetstateentry.go 2022-11-11 19:25:15.000000000 +0100 @@ -319,7 +319,10 @@ } runAt := time.Now().UTC() if !isEmpty(contents) { - if err := system.RunScript(t.name, actualStateEntry.Path().Dir(), contents, t.interpreter); err != nil { + if err := system.RunScript(t.name, actualStateEntry.Path().Dir(), contents, RunScriptOptions{ + Condition: t.condition, + Interpreter: t.interpreter, + }); err != nil { return false, err } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/tarwritersystem.go new/chezmoi-2.27.1/pkg/chezmoi/tarwritersystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/tarwritersystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/tarwritersystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -43,7 +43,7 @@ } // RunScript implements System.RunScript. -func (s *TarWriterSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (s *TarWriterSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { return s.WriteFile(NewAbsPath(scriptname.String()), data, 0o700) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/chezmoi/zipwritersystem.go new/chezmoi-2.27.1/pkg/chezmoi/zipwritersystem.go --- old/chezmoi-2.27.0/pkg/chezmoi/zipwritersystem.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/chezmoi/zipwritersystem.go 2022-11-11 19:25:15.000000000 +0100 @@ -47,7 +47,7 @@ } // RunScript implements System.RunScript. -func (s *ZIPWriterSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, interpreter *Interpreter) error { +func (s *ZIPWriterSystem) RunScript(scriptname RelPath, dir AbsPath, data []byte, options RunScriptOptions) error { return s.WriteFile(NewAbsPath(scriptname.String()), data, 0o700) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/initcmd.go new/chezmoi-2.27.1/pkg/cmd/initcmd.go --- old/chezmoi-2.27.0/pkg/cmd/initcmd.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/initcmd.go 2022-11-11 19:25:15.000000000 +0100 @@ -45,49 +45,49 @@ }{ { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://github.com/$1/dotfiles.git", + httpRepoGuessRepl: "https://$1...@github.com/$1/dotfiles.git", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "g...@github.com:$1/dotfiles.git", }, { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "https://github.com/$1/$2.git", + httpRepoGuessRepl: "https://$1...@github.com/$1/$2.git", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "g...@github.com:$1/$2.git", }, { rx: regexp.MustCompile(`\A([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://$1/$2/dotfiles.git", + httpRepoGuessRepl: "https://$2@$1/$2/dotfiles.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/dotfiles.git", }, { rx: regexp.MustCompile(`\A([-0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-.0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://$1/$2/$3.git", + httpRepoGuessRepl: "https://$2@$1/$2/$3.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/$3.git", }, { rx: regexp.MustCompile(`\A([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "https://$1/$2/$3.git", + httpRepoGuessRepl: "https://$2@$1/$2/$3.git", httpUsernameGuessRepl: "$2", sshRepoGuessRepl: "git@$1:$2/$3.git", }, { rx: regexp.MustCompile(`\A(https?://)([-.0-9A-Za-z]+)/([-0-9A-Za-z]+)/([-0-9A-Za-z]+)(\.git)?\z`), - httpRepoGuessRepl: "$1$2/$3/$4.git", + httpRepoGuessRepl: "$1$3@$2/$3/$4.git", httpUsernameGuessRepl: "$3", sshRepoGuessRepl: "git@$2:$3/$4.git", }, { rx: regexp.MustCompile(`\Asr\.ht/~([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://git.sr.ht/~$1/dotfiles", + httpRepoGuessRepl: "https://$1...@git.sr.ht/~$1/dotfiles", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "g...@git.sr.ht:~$1/dotfiles", }, { rx: regexp.MustCompile(`\Asr\.ht/~([-0-9A-Za-z]+)/([-0-9A-Za-z]+)\z`), - httpRepoGuessRepl: "https://git.sr.ht/~$1/$2", + httpRepoGuessRepl: "https://$1...@git.sr.ht/~$1/$2", httpUsernameGuessRepl: "$1", sshRepoGuessRepl: "g...@git.sr.ht:~$1/$2", }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/initcmd_test.go new/chezmoi-2.27.1/pkg/cmd/initcmd_test.go --- old/chezmoi-2.27.0/pkg/cmd/initcmd_test.go 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/initcmd_test.go 2022-11-11 19:25:15.000000000 +0100 @@ -26,73 +26,73 @@ }, { arg: "codeberg.org/user", - expectedHTTPRepoURL: "https://codeberg.org/user/dotfiles.git", + expectedHTTPRepoURL: "https://u...@codeberg.org/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@codeberg.org:user/dotfiles.git", }, { arg: "codeberg.org/user/dots", - expectedHTTPRepoURL: "https://codeberg.org/user/dots.git", + expectedHTTPRepoURL: "https://u...@codeberg.org/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@codeberg.org:user/dots.git", }, { arg: "gitlab.com/user", - expectedHTTPRepoURL: "https://gitlab.com/user/dotfiles.git", + expectedHTTPRepoURL: "https://u...@gitlab.com/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@gitlab.com:user/dotfiles.git", }, { arg: "gitlab.com/user/dots", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://u...@gitlab.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@gitlab.com:user/dots.git", }, { arg: "gitlab.com/user/dots.git", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://u...@gitlab.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@gitlab.com:user/dots.git", }, { arg: "http://gitlab.com/user/dots.git", - expectedHTTPRepoURL: "http://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "http://u...@gitlab.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@gitlab.com:user/dots.git", }, { arg: "https://gitlab.com/user/dots.git", - expectedHTTPRepoURL: "https://gitlab.com/user/dots.git", + expectedHTTPRepoURL: "https://u...@gitlab.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@gitlab.com:user/dots.git", }, { arg: "sr.ht/~user", - expectedHTTPRepoURL: "https://git.sr.ht/~user/dotfiles", + expectedHTTPRepoURL: "https://u...@git.sr.ht/~user/dotfiles", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@git.sr.ht:~user/dotfiles", }, { arg: "sr.ht/~user/dots", - expectedHTTPRepoURL: "https://git.sr.ht/~user/dots", + expectedHTTPRepoURL: "https://u...@git.sr.ht/~user/dots", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@git.sr.ht:~user/dots", }, { arg: "user", - expectedHTTPRepoURL: "https://github.com/user/dotfiles.git", + expectedHTTPRepoURL: "https://u...@github.com/user/dotfiles.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@github.com:user/dotfiles.git", }, { arg: "user/dots", - expectedHTTPRepoURL: "https://github.com/user/dots.git", + expectedHTTPRepoURL: "https://u...@github.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@github.com:user/dots.git", }, { arg: "user/dots.git", - expectedHTTPRepoURL: "https://github.com/user/dots.git", + expectedHTTPRepoURL: "https://u...@github.com/user/dots.git", expectedHTTPUsername: "user", expectedSSHRepoURL: "g...@github.com:user/dots.git", }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/issue1666.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/issue1666.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/issue1666.txtar 1970-01-01 01:00:00.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/issue1666.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -0,0 +1,16 @@ +[windows] skip 'UNIX only' + +# test that chezmoi apply --verbose does not display scripts that are run always, but does run them +exec chezmoi apply --verbose +cmp stdout golden/apply +! stderr . + +-- golden/apply -- +script +-- home/user/.config/chezmoi/chezmoi.toml -- +[diff] + exclude = ["always"] +-- home/user/.local/share/chezmoi/run_script.sh -- +#!/bin/sh + +echo script diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/runscriptdir_unix.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/runscriptdir_unix.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/runscriptdir_unix.txtar 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/runscriptdir_unix.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -31,7 +31,8 @@ "dir/script.sh": { "type": "script", "name": "dir/script.sh", - "contents": "#!/bin/sh\n\npwd\n" + "contents": "#!/bin/sh\n\npwd\n", + "condition": "always" } } -- home/user/.local/share/chezmoi/dir/run_script.sh -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/script_unix.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/script_unix.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/script_unix.txtar 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/script_unix.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -64,7 +64,8 @@ "script.sh": { "type": "script", "name": "script.sh", - "contents": "#!/bin/sh\n\npwd\n" + "contents": "#!/bin/sh\n\npwd\n", + "condition": "always" } } -- golden/managed -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/script_windows.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/script_windows.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/script_windows.txtar 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/script_windows.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -21,7 +21,8 @@ "script.cmd": { "type": "script", "name": "script.cmd", - "contents": "echo evidence\n" + "contents": "echo evidence\n", + "condition": "always" } } -- golden/managed -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/scriptsubdir_unix.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/scriptsubdir_unix.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/scriptsubdir_unix.txtar 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/scriptsubdir_unix.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -41,7 +41,8 @@ "anotherdir/script.sh": { "type": "script", "name": "anotherdir/script.sh", - "contents": "#!/bin/sh\n\npwd\n" + "contents": "#!/bin/sh\n\npwd\n", + "condition": "always" }, "dir": { "type": "dir", @@ -51,7 +52,8 @@ "dir/script.sh": { "type": "script", "name": "dir/script.sh", - "contents": "#!/bin/sh\n\npwd\n" + "contents": "#!/bin/sh\n\npwd\n", + "condition": "always" }, "otherdir": { "type": "dir", @@ -61,7 +63,8 @@ "otherdir/script.sh": { "type": "script", "name": "otherdir/script.sh", - "contents": "#!/bin/sh\n\npwd\n" + "contents": "#!/bin/sh\n\npwd\n", + "condition": "always" } } -- home/user/.local/share/chezmoi/anotherdir/run_after_script.sh -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/scriptsubdir_windows.txtar new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/scriptsubdir_windows.txtar --- old/chezmoi-2.27.0/pkg/cmd/testdata/scripts/scriptsubdir_windows.txtar 2022-11-08 02:55:07.000000000 +0100 +++ new/chezmoi-2.27.1/pkg/cmd/testdata/scripts/scriptsubdir_windows.txtar 2022-11-11 19:25:15.000000000 +0100 @@ -35,7 +35,8 @@ "anotherdir/script.cmd": { "type": "script", "name": "anotherdir/script.cmd", - "contents": "@echo %cd%\n" + "contents": "@echo %cd%\n", + "condition": "always" }, "dir": { "type": "dir", @@ -45,7 +46,8 @@ "dir/script.cmd": { "type": "script", "name": "dir/script.cmd", - "contents": "@echo %cd%\n" + "contents": "@echo %cd%\n", + "condition": "always" }, "otherdir": { "type": "dir", @@ -55,7 +57,8 @@ "otherdir/script.cmd": { "type": "script", "name": "otherdir/script.cmd", - "contents": "@echo %cd%\n" + "contents": "@echo %cd%\n", + "condition": "always" } } -- home/user/.local/share/chezmoi/anotherdir/run_after_script.cmd -- ++++++ chezmoi.obsinfo ++++++ --- /var/tmp/diff_new_pack.2mkBLz/_old 2022-11-15 13:21:39.340872064 +0100 +++ /var/tmp/diff_new_pack.2mkBLz/_new 2022-11-15 13:21:39.344872084 +0100 @@ -1,5 +1,5 @@ name: chezmoi -version: 2.27.0 -mtime: 1667872507 -commit: 92993ed1f980340876a1b44e39ba382c41309053 +version: 2.27.1 +mtime: 1668191115 +commit: b6039e787dfffe970fec4f9165ec9ebe1b3ceaa6 ++++++ vendor.tar.gz ++++++