Permalink
Browse files

Fix pretty_tree to work in a subdirectory

Without this change a freshly exported branch contains the .top* files
when tg export was started from a subdirectory.

Reported-by: Per Cederqvist <ceder@lysator.liu.se>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
  • Loading branch information...
1 parent bd0a68e commit d1c89c7b3c303883528e3a2ca45d9b4daf1f1e71 Uwe Kleine-König committed Aug 24, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 tg-export.sh
View
@@ -67,10 +67,9 @@ trap 'rm -rf "$playground"' EXIT
# Output tree ID of a cleaned-up tree without tg's artifacts.
pretty_tree()
{
- (export GIT_INDEX_FILE="$playground/^index"
- git read-tree "$1"
- git update-index --force-remove ".topmsg" ".topdeps"
- git write-tree)
+ git ls-tree --full-tree "$1" \
+ | awk -F ' ' '$2 !~ /^.top/' \
+ | git mktree
}
create_tg_commit()

0 comments on commit d1c89c7

Please sign in to comment.