git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[TopGit PATCH] Use the topological order when exporting explicitly listed branches.

From
MKmartin f. krafft <madduck@debian.org>
Date
Nov 20, 2008, 09:38 UTC
Message-ID
<1227173902-21180-1-git-send-email-madduck@debian.org>
From: Niko Tyni <ntyni@debian.org>

When exporting explicitly listed branches (tg export -b), the branch dependencies were not taken into account.

Signed-off-by: martin f. krafft <madduck@debian.org>
Tested-by: martin f. krafft <madduck@debian.org>
---
Arguably, lines 178:189 need to be refactored due to the code duplication, but
the patch does what it should for now.
 tg-export.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tg-export.sh b/tg-export.sh
index 52af88d..037b991 100644
--- a/tg-export.sh
+++ b/tg-export.sh
@@ -181,9 +181,9 @@ if [ -z "$branches" ]; then
 	recurse_deps driver "$name"
 	(_ret=0; _dep="$name"; _name=""; _dep_is_tgish=1; driver)
 else
-	echo "$branches" | tr ',' '\n' | while read _dep; do
-		_dep_is_tgish=1
-		$driver
+	echo "$branches" | tr ',' '\n' | while read name; do
+		recurse_deps driver "$name"
+		(_ret=0; _dep="$name"; _name=""; _dep_is_tgish=1; driver)
 	done
 	name="$(echo "$branches" | sed 's/.*,//')"
 fi
-- 
1.5.6.5
Next: Petr Baudis
Message 1 of 3 in “Use the topological order when exporting explicitly listed branches.”
  1. Use the topological order when exporting explicitly listed branches.martin f. krafft, Nov 20, 2008
  2. Petr BaudisNov 20, 2008
  3. martin f krafftNov 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.