GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stdin: Handle directory input by TanmayPatil105 · Pull Request #73 · uutils/diffutils

Conversation

@TanmayPatil105

@TanmayPatil105 TanmayPatil105 commented May 5, 2024

Copy link
Copy Markdown
Contributor

When handling stdin, GNU diff now behaves as follows:

  • If a file is input, it displays the current time as m_time
  • If a directory is input, it appends the other file_name to the canonicalized path of directory and reads and displays the m_time of that file

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@TanmayPatil105
stdin: Handle directory input
b8001cc
When handling stdin, GNU diff now behaves as follows:
  * If a file is input, it displays the current time as m_time
  * If a directory is input, it appends the other file_name to
    the canonicalized path of directory and reads and displays
    the m_time of that file
@codecov

codecov Bot commented May 5, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.05882% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.12%. Comparing base (d922313) to head (f21689d).
⚠️ Report is 219 commits behind head on main.

Files with missing lines Patch % Lines
src/params.rs 35.71% 5 Missing and 4 partials ⚠️
src/context_diff.rs 42.85% 2 Missing and 2 partials ⚠️
src/unified_diff.rs 42.85% 2 Missing and 2 partials ⚠️
src/main.rs 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   75.46%   75.12%   -0.35%     
==========================================
  Files          10       10              
  Lines        2935     2959      +24     
  Branches      745      754       +9     
==========================================
+ Hits         2215     2223       +8     
- Misses        547      557      +10     
- Partials      173      179       +6     
Flag Coverage Δ
macos_latest 75.86% <47.05%> (-0.36%) ⬇️
ubuntu_latest 75.10% <44.11%> (-0.36%) ⬇️
windows_latest 15.44% <45.83%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TanmayPatil105
Fix clippy warnings
4482bdb
@TanmayPatil105

TanmayPatil105 commented May 5, 2024

Copy link
Copy Markdown
Contributor Author

Okay, now this is tricky! There is no /dev/stdin on windows.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TanmayPatil105
Make handling stdin directory unix specific
f21689d
@TanmayPatil105
TanmayPatil105 force-pushed the handle-stdin-dir-input branch from b815cf0 to f21689d Compare May 6, 2024 14:48
@TanmayPatil105

TanmayPatil105 commented May 7, 2024

Copy link
Copy Markdown
Contributor Author

Hey @oSoMoN , can you review this PR?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@oSoMoN

oSoMoN commented Jun 4, 2024

Copy link
Copy Markdown
Collaborator

Sorry for the long delay @TanmayPatil105, I haven't had time to dedicate to this project in the last few weeks.
So what exactly is the use case you're addressing here? How would one pass a directory as stdin on the command line?
Also, could you please add an integration test for that use case?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@TanmayPatil105

TanmayPatil105 commented Jun 8, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

So what exactly is the use case you're addressing here? How would one pass a directory as stdin on the command line?

Yeah, that is highly unlikely. However, since GNU diff 3.9, it has started handling redirected directory inputs. Additionally, this has also been included in the tests http://git.savannah.gnu.org/cgit/diffutils.git/tree/tests/stdin#n27.

Also, could you please add an integration test for that use case?

I had a go on it but I don't think so there's a way to redirect a directory as input through code. Is there a way?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@GunterSchmidt GunterSchmidt mentioned this pull request Mar 13, 2026
Breaking: Adapt coreutils dev file structure #201
Closed
@sylvestre

sylvestre commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

sorry but it needs to be rebased

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

1 similar comment
@sylvestre

sylvestre commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

sorry but it needs to be rebased

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@TanmayPatil105 @oSoMoN @sylvestre
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.