Skip to content

ln: leave the source out when the hard link destination exists - #16827

Draft
binhvq wants to merge 1 commit into
uutils:mainfrom
binhvq:ln-hard-link-exists
Draft

binhvq wants to merge 1 commit into
uutils:mainfrom
binhvq:ln-hard-link-exists

Conversation

@binhvq

@binhvq binhvq commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

When the destination of a hard link already exists, ln a b printed failed to create hard link 'b' => 'a': File exists, while GNU names only the destination for that error and keeps => 'a' for the others. This adds an AlreadyExists branch with its own message and a test covering both forms.

Closes #16826

@oech3

oech3 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Please convert this to draft until GNU does something about #16826 (comment) .

@binhvq
binhvq marked this pull request as draft November 25, 2026 09:36
@binhvq

binhvq commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Done, it's a draft now. I'll pick it up again once it's clear what GNU does with the message.

@xtqqczze

This comment was marked as resolved.

@binhvq
binhvq force-pushed the ln-hard-link-exists branch from 6a00884 to 0d40ffc Compare November 26, 2026 11:09
@binhvq

binhvq commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main.

@xtqqczze

This comment was marked as resolved.

@binhvq
binhvq force-pushed the ln-hard-link-exists branch from 2549dcc to 0b9d547 Compare November 29, 2026 21:36
@binhvq

binhvq commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Squashed into one commit, no code change.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ln: hard link onto an existing file names the source too

3 participants