diff options
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-debrebase b/git-debrebase index 8fa5adb..57bfa98 100755 --- a/git-debrebase +++ b/git-debrebase @@ -187,8 +187,12 @@ sub get_tree ($) { # tree object name => ([ $name, $info ], ...) # where $name is the sort key, ie has / at end for subtrees # $info is the LHS from git-ls-tree (<mode> <type> <hash>) - # will crash if $x does not exist, so don't do that + # will crash if $x does not exist, so don't do that; + # instead pass '' to get (). my ($x) = @_; + + return () if !length $x; + our (@get_tree_memo, %get_tree_memo); my $memo = $get_tree_memo{$x}; return @$memo if $memo; |