git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to find the commit that erase a change
@ 2019-10-09  2:28 wuzhouhui
  2019-10-09  3:02 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: wuzhouhui @ 2019-10-09  2:28 UTC (permalink / raw)
  To: git; +Cc: cuifang

Hi,

I have a file which contains complicated change history. When I use
    git log -p file
to see all changes made in this file, I found that a change disappeared
for no reason.

For example, I made following change in a commit:

@@ -2,3 +2,8 @@ int main(void)
 {
        printf("hello world");
 }
+
+func(void)
+{
+       printf("a func");
+}

But when I open this file of latest version, I found the above change is
disappeared. So I decide use
    git log -p file
to see which commit erase my change. But I doesn't see any commit which
contains changes like following:

@@ -2,8 +2,3 @@ int main(void)
 {
        printf("hello world");
 }
-
-func(void)
-{
-       printf("a func");
-}

So, how to find the commit that erase my change?

Thanks. Please use Reply-All when reply this email.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-09 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09  2:28 How to find the commit that erase a change wuzhouhui
2019-10-09  3:02 ` Junio C Hamano
2019-10-09  3:51   ` wuzhouhui
2019-10-09 13:21     ` Derrick Stolee

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).