Use custom labels for the diffs #9

Merged
reynir merged 1 commit from diff-labels into main 2025-01-10 11:34:13 +00:00
Owner

Otherwise we leak the temporary file names which are also not interesting to the (innocent) user.

The change should make the diff go from:

--- /tmp/opaml_65bb7f	2025-01-09 15:28:04.769695000 +0000
+++ /tmp/opamr_41b60c	2025-01-09 15:28:04.769739000 +0000
@@ -58,5 +58,5 @@
 dev-repo: "git+https://github.com/robur-coop/albatross.git"
 url {
   src:
-    "git+https://github.com/robur-coop/albatross.git#0bc2248c2140dde933958b5ba8ac9dea38c5aa92"
+    "git+https://github.com/robur-coop/albatross.git#5b1478741560881c1d0bbfed17cce6a2c713acd1"
 }
\ No newline at end of file

to:

--- left/albatross/opam
+++ right/albatross/opam
@@ -58,5 +58,5 @@
 dev-repo: "git+https://github.com/robur-coop/albatross.git"
 url {
   src:
-    "git+https://github.com/robur-coop/albatross.git#0bc2248c2140dde933958b5ba8ac9dea38c5aa92"
+    "git+https://github.com/robur-coop/albatross.git#5b1478741560881c1d0bbfed17cce6a2c713acd1"
 }
\ No newline at end of file

There may be more meaningful names to use than "left" and "right". I put the opam package name in the path. We can as well go with "a" and "b" instead of "left" and "right" similar to what git does.

Otherwise we leak the temporary file names which are also not interesting to the (innocent) user. The change should make the diff go from: ``` --- /tmp/opaml_65bb7f 2025-01-09 15:28:04.769695000 +0000 +++ /tmp/opamr_41b60c 2025-01-09 15:28:04.769739000 +0000 @@ -58,5 +58,5 @@ dev-repo: "git+https://github.com/robur-coop/albatross.git" url { src: - "git+https://github.com/robur-coop/albatross.git#0bc2248c2140dde933958b5ba8ac9dea38c5aa92" + "git+https://github.com/robur-coop/albatross.git#5b1478741560881c1d0bbfed17cce6a2c713acd1" } \ No newline at end of file ``` to: ``` --- left/albatross/opam +++ right/albatross/opam @@ -58,5 +58,5 @@ dev-repo: "git+https://github.com/robur-coop/albatross.git" url { src: - "git+https://github.com/robur-coop/albatross.git#0bc2248c2140dde933958b5ba8ac9dea38c5aa92" + "git+https://github.com/robur-coop/albatross.git#5b1478741560881c1d0bbfed17cce6a2c713acd1" } \ No newline at end of file ``` There may be more meaningful names to use than "left" and "right". I put the opam package name in the path. We can as well go with "a" and "b" instead of "left" and "right" similar to what git does.
reynir added 1 commit 2025-01-09 15:53:23 +00:00
Otherwise we leak the temporary file names which are also not
interesting to the (innocent) user.
Author
Owner

This was motivated by the mollymawk PR @PixieDust created where the diff-to-html library renders it as the file was renamed. I don't know how that library will render this diff.

This was motivated by the mollymawk PR @PixieDust created where the diff-to-html library renders it as the file was renamed. I don't know how that library will render this diff.
Owner

looks fine to me, I learned that diff has the option --label today.

looks fine to me, I learned that diff has the option `--label` today.
Owner

Thank you. It looks good. I think the diff will just display the file names

Thank you. It looks good. I think the diff will just display the file names
reynir merged commit 840132839f into main 2025-01-10 11:34:13 +00:00
reynir deleted branch diff-labels 2025-01-10 11:34:16 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: robur/builder-web#9
No description provided.