Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142553926
D44836.id137297.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44836.id137297.diff
View Options
Index: tools/tools/git/candidatematch.lua
===================================================================
--- tools/tools/git/candidatematch.lua
+++ tools/tools/git/candidatematch.lua
@@ -36,6 +36,14 @@
return result
end
+-- Execute a command and print to stdout
+local function exec_command(command)
+ local handle = io.popen(command)
+ local output = handle:read("a")
+ handle:close()
+ io.write(output)
+end
+
-- Main function
local function main()
local from_file = arg[1]
@@ -59,7 +67,7 @@
-- Print the result
for _, hash in ipairs(result_hashes) do
- print(hash)
+ exec_command("git show --pretty='%h %s' --no-patch " .. hash)
end
end
Index: tools/tools/git/mfc-candidates.sh
===================================================================
--- tools/tools/git/mfc-candidates.sh
+++ tools/tools/git/mfc-candidates.sh
@@ -152,7 +152,6 @@
workdir=$(mktemp -d /tmp/find-mfc.XXXXXXXXXX)
from_list=$workdir/commits-from
to_list=$workdir/commits-to
-candidate_list=$workdir/candidates
if [ -n "$exclude_file" ]; then
exclude_list=$workdir/commits-exclude
@@ -163,10 +162,6 @@
commits_to "$@" > $to_list
/usr/libexec/flua $(dirname $0)/candidatematch.lua \
- $from_list $to_list $exclude_list > $candidate_list
-
-while read hash; do
- git show --pretty='%h %s' --no-patch $hash
-done < $candidate_list
+ $from_list $to_list $exclude_list
rm -rf "$workdir"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 21, 10:38 PM (2 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27822650
Default Alt Text
D44836.id137297.diff (1 KB)
Attached To
Mode
D44836: mfc-candidates: move pretty printing into lua
Attached
Detach File
Event Timeline
Log In to Comment