summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2009-03-29 03:06:12 -0400
committerBrian Cully <bjc@kublai.com>2009-03-29 03:06:12 -0400
commitf5d9260a7c3169250a1d99b27096969e204bcce7 (patch)
tree7e8f3c376b86ce4fd26e2d43a893d2ff26fe4a8d
parentbe8709c1ae10e37d9f47affb42aa73791704a6e4 (diff)
downloaddvcs-git-slides-f5d9260a7c3169250a1d99b27096969e204bcce7.tar.gz
dvcs-git-slides-f5d9260a7c3169250a1d99b27096969e204bcce7.zip
Shorten code a little.
-rwxr-xr-xread_object.pl4
1 files changed, 1 insertions, 3 deletions
diff --git a/read_object.pl b/read_object.pl
index e813cbc..22dd2cf 100755
--- a/read_object.pl
+++ b/read_object.pl
@@ -32,9 +32,7 @@ sub read_object {
sub format_object {
my ($type, $obj) = @_;
- if ($type eq 'commit') {
- $obj;
- } elsif ($type eq 'tag') {
+ if ($type eq 'commit' || $type eq 'tag') {
$obj;
} elsif ($type eq 'tree') {
format_tree($obj)