Re: A puzzle: reset --hard and hard links

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> It is merely because you helped Git to realize

I don't want to "help Git realize". I'm sorry but in my opinion `git
status` should not have any effects on other commands. I don't
understand how you can argue that calling `git status` is a valid fix
to "help Git".

> With another step 1.5 "append a line to the file in question", git
> should severe the link,

I don't want to sever the hard link. I want to avoid that it gets severed.

On Mon, 24 Jan 2022 at 15:07, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
> Michael Herrmann <michael@xxxxxxxxxxx> writes:
>
> > I now believe this is a bug in Git because calling `git status` fixes
> > the problem.
> >
> > 1) Create a hard link to a file in a Git repo.
> > 2) Call `git status`.
> > 3) Call `git reset --hard`.
>
> It is merely because you helped Git to realize that there is no need
> to change the contents of hte file with "reset --hard".
>
> With another step 1.5 "append a line to the file in question", git
> should severe the link, I would think, as at that point, to revert
> the contents of the file in question to its pristine state, it needs
> to modify it.
>
>
>
>
>
>



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux