Staging
v0.5.2
https://github.com/git/git
Revision 1dc71a9155e209ed4da866eeb7c3064e4568532e authored by J. Bruce Fields on 11 March 2007, 03:38:13 UTC, committed by J. Bruce Fields on 11 March 2007, 04:05:01 UTC
Asciidoc appears to interpret a backslash at the end of a line as
escaping the end-of-line character, which screws up the display of
history diagrams like

 o--o--o
	\
	 o--...

The obvious fix (replacing "\" by "\\") doesn't work.  The only
workaround I've found is to include all such diagrams in a LiteralBlock.
Asciidoc claims that should be equivalent to a literal paragraph, so I
don't understand why the difference--perhaps it's an asciidoc bug.

Cc: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
1 parent ed4eb0d
Raw File
Tip revision: 1dc71a9155e209ed4da866eeb7c3064e4568532e authored by J. Bruce Fields on 11 March 2007, 03:38:13 UTC
user-manual: fix rendering of history diagrams
Tip revision: 1dc71a9
git-lost-found.sh
#!/bin/sh

USAGE=''
SUBDIRECTORY_OK='Yes'
. git-sh-setup

if [ "$#" != "0" ]
then
    usage
fi

laf="$GIT_DIR/lost-found"
rm -fr "$laf" && mkdir -p "$laf/commit" "$laf/other" || exit

git fsck --full |
while read dangling type sha1
do
	case "$dangling" in
	dangling)
		if git-rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null
		then
			dir="$laf/commit"
			git-show-branch "$sha1"
		else
			dir="$laf/other"
		fi
		echo "$sha1" >"$dir/$sha1"
		;;
	esac
done
back to top