Re: Filter-branch's "move tree to subdirectory" example fails with BSD sed?
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Apr 14, 2012, 19:25 UTC
- Message-ID
- <4F89CF11.7060309@kdbg.org>
- In-Reply-To
- <20120414160028.GD1012@gmail.com>
Am 14.04.2012 18:00, schrieb Christopher Tiwald:
> The "Move tree to subdirectory" example in the 'git filter-branch' > manpage fails on Mac OSX 10.7.3, but succeeds on Ubuntu 10.04.
Show 13 quoted lines
> git init "test" > cd "test" > mkdir -p subdirA/subdirB > echo content > subdirA/subdirB/file > git add . > git commit -m "initial commit" > git ls-files -s | sed "s-\t\"*-&newsubdir/-" > > On Mac 10.7.3 the final command outputs: > 100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 subdirA/subdirB/file > > On Ubuntu 10.04: > 100644 d95f3ad14dee633a758d2e331151e950dd13e4ed 0 newsubdir/subdirA/subdirB/file
Perhaps a literal TAB instead of \t makes the example work?
It would be difficult, though, to write this down in the manual in an unambiguous way.
-- Hannes