lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Jul 2013 10:04:17 -0700
From:	Linus Torvalds <torvalds@...ux-foundation.org>
To:	"gregkh@...uxfoundation.org >> Kroah-Hartman, Greg" 
	<gregkh@...uxfoundation.org>
Cc:	Shuah Khan <shuah.kh@...sung.com>,
	Shuah Khan <shuahkhan@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [ 000/103] 3.10.3-stable review

On Wed, Jul 24, 2013 at 7:55 AM, gregkh@...uxfoundation.org >>
"Kroah-Hartman, Greg" <gregkh@...uxfoundation.org> wrote:
> On Wed, Jul 24, 2013 at 01:40:56PM +0000, Shuah Khan wrote:
>> Note: When I did a git reset --hard on 3.10.2-rc2 patch,
>> drivers/acpi/acpi_cmos_rtc.c was left as an untracked file.
>> I had to remove it before git pull succeeded for 3.10.2.
>
> Yes, that's because 3.10.2 added a new file to the tree, so this is to
> be expected.

.. well, depending on how you do it, yes.

So if you just originally apply it as a patch, and don't actually tell
git about the file, then yes, "git reset --hard" will leave the new
file alone, since git doesn't really even know about it - the same way
that "git diff" will not actually show the file at all, for the same
reason.

And then when you apply the patch again, or when you do a "git pull",
things will be unhappy, because you have that old untracked file
still.

When working with that kind of setup, you're generally best off doing
"git clean -dqfx" or similar to remove all files git doesn't know
about. Or just doing it by hand.

The alternative workflow is to tell git to track the new files added
by the patch. So if you use "git apply --index", git will not just
apply the patch, it will also add the result to the index - so you
could commit it with a single "git commit", and you can see the diff -
including new files - with "git diff --cached". And then "git reset
--hard" will also undo the new files.

So you *can* make git track the new files as you apply a patch.
Whether you actually want to is up to you.

                Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ