Re: [PATCH] Added description for reversing git-update-index using --index-info

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

 



Andy Parkins <andyparkins@xxxxxxxxx> writes:

> +One particular use of --index-info is to reverse the effect of
> +"git-update-index frotz":
> +
> +------------
> +git ls-tree HEAD frotz | git update-index --index-info
> +------------
> +
> +This makes the index hold the file frotz from HEAD rather than from the
> +working copy.

Up to this point is good, but I am unhappy about the next example.

> +------------
> +git ls-tree -r HEAD | git update-index --index-info
> +------------
> +
> +Will undo everything except "git add" from the index, as
> +"git-ls-tree -r" lists everything in the last commit.

While this is correct in the mechanical sense, it _sucks_ as an
example, especially since you do not mention that the user would
most likely need to do 'git update-index --refresh' afterwards
to make the result useful.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]