threads / patch / 12170

patchgit-gui: relax "dirty" version detection

Subject: [PATCH] git-gui: relax "dirty" version detection

## tl;dr

2 messages between Feb 18, 2008 and Feb 20, 2008. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Wincent Colaiuta· Feb 18, 2008, 08:36 UTC · lore

"git gui" would complain at launch if the local version of Git was "1.5.4.2.dirty". Loosen the regular expression to look for either "-dirty" or ".dirty", thus eliminating spurious warnings.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
---
 git-gui/git-gui.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-gui/git-gui.sh +1 −1
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 5d65272..238a239 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -663,7 +663,7 @@ if {![regsub {^git version } $_git_version {} _git_version]} {
 }
 
 set _real_git_version $_git_version
-regsub -- {-dirty$} $_git_version {} _git_version
+regsub -- {[\-\.]dirty$} $_git_version {} _git_version
 regsub {\.[0-9]+\.g[0-9a-f]+$} $_git_version {} _git_version
 regsub {\.rc[0-9]+$} $_git_version {} _git_version
 regsub {\.GIT$} $_git_version {} _git_version
-- 
1.5.4.2.dirty
Shawn O. Pearce· Feb 20, 2008, 01:57 UTC · re: Wincent Colaiuta · lore

Re: [PATCH] git-gui: relax "dirty" version detection

Wincent Colaiuta <win@wincent.com> wrote:
Show 5 quoted lines
> "git gui" would complain at launch if the local version of Git was
> "1.5.4.2.dirty". Loosen the regular expression to look for either
> "-dirty" or ".dirty", thus eliminating spurious warnings.
> 
> Signed-off-by: Wincent Colaiuta <win@wincent.com>
Thanks.  Its now queued in my maint branch.
-- 
Shawn.

← back to recent threads