Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-12-18 08:56:48 +0300
committerJunio C Hamano <gitster@pobox.com>2008-12-18 08:56:48 +0300
commitb4955fb611ce407ef0e522862c60ae0472dbfe5e (patch)
tree1818fb0364fdd7473dfc4e7d0edaf93aa9286f82 /git-gui/git-gui.sh
parent1df27132493171294d0d2b53bd75bb8e131eea2b (diff)
parente612120d232a5ef04dcf22fc92741565ebb4d0c8 (diff)
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui 0.12 git-gui: Get rid of the last remnants of GIT_CONFIG_LOCAL git-gui: Update Hungarian translation for 0.12 git-gui: Fixed typos in Swedish translation. git-gui: Updated Swedish translation (515t0f0u). git gui: update Italian translation git-gui: Update Japanese translation for 0.12 git-gui: Starting translation for Norwegian git-gui: Update German (completed) translation. git-gui: Update po template to include 'Mirroring %s' message git-gui: Fix commit encoding handling. git-gui: Fix handling of relative paths in blame.
Diffstat (limited to 'git-gui/git-gui.sh')
-rwxr-xr-xgit-gui/git-gui.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 8a4b42dbd7..e018e076f8 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -2630,6 +2630,20 @@ proc usage {} {
exit 1
}
+proc normalize_relpath {path} {
+ set elements {}
+ foreach item [file split $path] {
+ if {$item eq {.}} continue
+ if {$item eq {..} && [llength $elements] > 0
+ && [lindex $elements end] ne {..}} {
+ set elements [lrange $elements 0 end-1]
+ continue
+ }
+ lappend elements $item
+ }
+ return [eval file join $elements]
+}
+
# -- Not a normal commit type invocation? Do that instead!
#
switch -- $subcommand {
@@ -2648,7 +2662,7 @@ blame {
foreach a $argv {
if {$is_path || [file exists $_prefix$a]} {
if {$path ne {}} usage
- set path $_prefix$a
+ set path [normalize_relpath $_prefix$a]
break
} elseif {$a eq {--}} {
if {$path ne {}} {
@@ -2671,7 +2685,7 @@ blame {
unset is_path
if {$head ne {} && $path eq {}} {
- set path $_prefix$head
+ set path [normalize_relpath $_prefix$head]
set head {}
}
@@ -3315,7 +3329,6 @@ by %s:
{^GIT_PAGER$} -
{^GIT_TRACE$} -
{^GIT_CONFIG$} -
- {^GIT_CONFIG_LOCAL$} -
{^GIT_(AUTHOR|COMMITTER)_DATE$} {
append msg " - $name\n"
incr ignored_env