chiark
/
gitweb
/
~ian
/
topgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: Use $(wildcard) for commands_in
[topgit.git]
/
tg.sh
diff --git
a/tg.sh
b/tg.sh
index 6312d0064d9fcb9529cf24b11f0aea1324bb79ae..1bc886aaee7bbcd2444e8950769b2b8932a7bbc3 100644
(file)
--- a/
tg.sh
+++ b/
tg.sh
@@
-47,8
+47,8
@@
setup_ours()
{
if [ ! -s "$git_dir/info/attributes" ] || ! grep -q topmsg "$git_dir/info/attributes"; then
{
{
if [ ! -s "$git_dir/info/attributes" ] || ! grep -q topmsg "$git_dir/info/attributes"; then
{
- echo
-e ".topmsg\t
merge=ours"
- echo
-e ".topdeps\t
merge=ours"
+ echo
".topmsg
merge=ours"
+ echo
".topdeps
merge=ours"
} >>"$git_dir/info/attributes"
fi
if ! git config merge.ours.driver >/dev/null; then
} >>"$git_dir/info/attributes"
fi
if ! git config merge.ours.driver >/dev/null; then
@@
-95,7
+95,7
@@
recurse_deps()
_cmd="$1"; shift
_name="$1"; # no shift
_depchain="$*"
_cmd="$1"; shift
_name="$1"; # no shift
_depchain="$*"
- _depsfile="$(mktemp)"
+ _depsfile="$(mktemp
-t tg-depsfile.XXXXXX
)"
git cat-file blob "$_name:.topdeps" >"$_depsfile"
_ret=0
while read _dep; do
git cat-file blob "$_name:.topdeps" >"$_depsfile"
_ret=0
while read _dep; do
@@
-111,7
+111,7
@@
recurse_deps()
# Shoo shoo, keep our environment alone!
[ -z "$_dep_is_tgish" ] ||
# Shoo shoo, keep our environment alone!
[ -z "$_dep_is_tgish" ] ||
- (
needs_update
"$_cmd" "$_dep" "$@") ||
+ (
recurse_deps
"$_cmd" "$_dep" "$@") ||
_ret=$?
eval "$_cmd"
_ret=$?
eval "$_cmd"
@@
-139,7
+139,7
@@
branch_needs_update()
# _dep needs to be synced with its base
echo ": $_dep $_depchain"
_ret=1
# _dep needs to be synced with its base
echo ": $_dep $_depchain"
_ret=1
- elif ! branch_contains "refs/top-bases/$_name" "$_dep"; then
+ elif
[ -n "$_name" ] &&
! branch_contains "refs/top-bases/$_name" "$_dep"; then
# Some new commits in _dep
echo "$_dep $_depchain"
_ret=1
# Some new commits in _dep
echo "$_dep $_depchain"
_ret=1
@@
-195,7
+195,7
@@
do_help()
sep="|"
done
sep="|"
done
- echo "TopGit v0.
1
- A different patch queue manager"
+ echo "TopGit v0.
2
- A different patch queue manager"
echo "Usage: tg ($cmds|help) ..."
elif [ -r "@sharedir@/tg-$1.txt" ] ; then
cat "@sharedir@/tg-$1.txt"
echo "Usage: tg ($cmds|help) ..."
elif [ -r "@sharedir@/tg-$1.txt" ] ; then
cat "@sharedir@/tg-$1.txt"