Revision 89a70b80ebabd237bb407f9321f24677f4f1d16d authored by Johannes Schindelin on 03 January 2018, 16:54:54 UTC, committed by Junio C Hamano on 03 January 2018, 23:55:50 UTC
When cleaning up files in the $HOME directory, it really makes sense to
quote the path, especially in Git's test suite, where the HOME directory
is *guaranteed* to contain spaces in its name.

It would appear that those two tests pass even without cleaning up the
files, but really more by pure chance than by design (the cleanup seems
not actually to be necessary).

However, if anybody would have a left-over `trash/` directory in Git's
`t/` directory, these tests would fail, because they would all of a
sudden try to delete that directory, but without the `-r` (recursive)
flag. That is how this issue was found.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 567c53d
Raw File
branch.tcl
# git-gui branch (create/delete) support
# Copyright (C) 2006, 2007 Shawn Pearce

proc load_all_heads {} {
	global some_heads_tracking

	set rh refs/heads
	set rh_len [expr {[string length $rh] + 1}]
	set all_heads [list]
	set fd [git_read for-each-ref --format=%(refname) $rh]
	while {[gets $fd line] > 0} {
		if {!$some_heads_tracking || ![is_tracking_branch $line]} {
			lappend all_heads [string range $line $rh_len end]
		}
	}
	close $fd

	return [lsort $all_heads]
}

proc load_all_tags {} {
	set all_tags [list]
	set fd [git_read for-each-ref \
		--sort=-taggerdate \
		--format=%(refname) \
		refs/tags]
	while {[gets $fd line] > 0} {
		if {![regsub ^refs/tags/ $line {} name]} continue
		lappend all_tags $name
	}
	close $fd
	return $all_tags
}

proc radio_selector {varname value args} {
	upvar #0 $varname var
	set var $value
}
back to top