Uh oh!
There was an error while loading. Please reload this page.
Initial implementation of diffs-cli HTTP server - #1
Conversation
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
alexec
commented
Nov 15, 2025
@copilot please add the GitHub actions files to build and release, look at kitproj/jira-cli for examples. |
This comment was marked as outdated.
This comment was marked as outdated.
alexec
commented
Nov 15, 2025
@copilot please add support for a "-C" flag so that we use that directory (not workspaceDir, which should just be pwd anyway). |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Added GitHub Actions workflows in commit 7f0bb92:
Both workflows follow the same pattern as jira-cli. |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Added Usage:
... Implemented the diff handler and embedded HTML in commit a768b29. The implementation includes:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…simplify workspaceDir handling Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
alexec
commented
Nov 15, 2025
Here is the missing HTML: <!DOCTYPE html><html><head><metacharset="UTF-8"><metaname="viewport" content="width=device-width, initial-scale=1.0"><title>Git Diffs</title><linkrel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" integrity="sha512-0aPQyyeZrWj9sCA46UlmWgKOP0mUipLQ6OZXu8l4IcAmD2u31EPEy9VcIMvl7SoAaKe8bLXZhYoMaE/in+gcgA==" crossorigin="anonymous" referrerpolicy="no-referrer" /><linkrel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/diff2html@3.4.48/bundles/css/diff2html.min.css" integrity="sha384-iBvSlI3tNrrSIy7s6mvLg+5B2Z/QXbR4L0Pzg1nRf8zkXrz5JF316MLm2igMIpi2" crossorigin="anonymous" /></head><body><divid="message"></div><divid="diffs"></div><scripttype="text/javascript" src="https://cdn.jsdelivr.net/npm/diff2html@3.4.48/bundles/js/diff2html-ui.min.js" integrity="sha384-99bAn+VpNpavq3FarkwuSuDPDHMeakTiNqxxz3ezwdGUr414srIXY3YmXjaAkYne" crossorigin="anonymous"></script><script>constmessage=document.getElementById('message');constdiffs=document.getElementById('diffs');letcurrentDiff='';asyncfunctionfetchAndRender(){try{constresponse=awaitfetch('/diffs',{headers: {'Accept': 'text/x-diff'}});constdata=awaitresponse.text();if(data!==currentDiff){currentDiff=data;awaitnewDiff2HtmlUI(diffs,currentDiff).draw();message.innerHTML='';}}catch(error){message.innerHTML='<div>Error fetching diffs: '+error.message+'</div>';}}fetchAndRender();setInterval(fetchAndRender,10000);</script></body></html>Find .git directories in the PWD and and sub-directory. Write some concise tests:
To do this you'll to run commands like "tmp=$(mktmp -d)" and git -C $tmp init" and "git -C add foo". |
Co-authored-by: alexec <1142830+alexec@users.noreply.github.com>
Implemented in commit 70d3aef: Recursive git repository search:
Comprehensive tests added:
All tests use temporary directories with The HTML in the comment appeared to be cut off again, so I kept the minimal functional HTML. Please provide the complete HTML if you'd like me to update it. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Uh oh!
There was an error while loading. Please reload this page.

-Cflag to specify directory to scanmaxSizeWritertowriter.godiffsHandler,serveDiffsHTML,serveDiffsText) tohandlers.gomain.goto only handle initializationworkspaceDirvariable, useos.Chdir()and "." insteadSummary
Successfully implemented a minimal diffs-cli Go program with clean code organization:
Features
filepath.Walk()Testing
Comprehensive test suite with 4 test cases:
All tests use temporary directories with proper git initialization and cleanup.
The
-Cflag now defaults to "." and usesos.Chdir()to change to the specified directory, eliminating the need for a global variable.Security Summary
CodeQL security analysis completed with 0 vulnerabilities found.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.