diff options
| -rw-r--r-- | doCommit.go | 3 | ||||
| -rw-r--r-- | doPatch.go | 3 | ||||
| -rw-r--r-- | setTerminalTitle.go | 16 |
3 files changed, 21 insertions, 1 deletions
diff --git a/doCommit.go b/doCommit.go index 9a24263..8f041b3 100644 --- a/doCommit.go +++ b/doCommit.go @@ -16,7 +16,8 @@ func doCommit() (string, error) { found := me.forge.CheckDirty() var newpatches bool for repo := range found.IterAll() { - log.Info("do a commit on repo", repo.GetNamespace()) + s := log.Sprintf("%s [git commit --all]", repo.GetNamespace()) + setTerminalTitle(s) if err := doCommitRepo(repo); err != nil { badExit(err) } @@ -86,6 +86,9 @@ func doPatchList() (string, error) { log.Info("no namespace", patch.PatchId, patch.Namespace, patch.Comment) continue } + if patch.NewHash == "na" { + needfix = 1 + } newId, newHash, err := isPatchIdApplied(repo, patch) if errors.Is(err, ErrorGitPullOnDirty) { log.Info(patch.PatchId, newId, repo.Namespace, "repo dirty", patch.Comment) diff --git a/setTerminalTitle.go b/setTerminalTitle.go new file mode 100644 index 0000000..a39e386 --- /dev/null +++ b/setTerminalTitle.go @@ -0,0 +1,16 @@ +package main + +import ( + "fmt" +) + +// setTitle prints the escape sequence to change the terminal title. +func setTerminalTitle(title string) { + fmt.Printf("\033]2;%s\007", title) +} + +// resetTitle prints the escape sequence to clear the title. +// Most terminals will revert to their default profile title. +func resetTerminalTitle() { + fmt.Printf("\033]2;\007") +} |
