git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Neal Groothuis <ngroot@lo-cal.org>
Cc: git@vger.kernel.org
Subject: Re: Finding all commits which modify a file
Date: Sun, 22 Jan 2012 12:03:19 +0800	[thread overview]
Message-ID: <CALUzUxpy+XdfMYqX8TGnpQ72FfvpF_VYP-19fTDLrD-=9CN3uw@mail.gmail.com> (raw)
In-Reply-To: <46043.208.70.151.129.1327095331.squirrel@mail.lo-cal.org>

On Sat, Jan 21, 2012 at 5:35 AM, Neal Groothuis <ngroot@lo-cal.org> wrote:
> Hello,
>
> I'm trying to find /all/ commits that change a file in the
> repository...and its proving to be trickier than I thought. :-)
>
> The situation that we were dealing with is this:
>
> - Person A and person B both pull from the same central repository.
>
> - Person A makes a change to file foo.txt and bar.txt, commits, and pushes
> to the central repository.
>
> - Person B makes a similar change to bar.txt and commits it.
>
> - Person B does a fetch and merge.  Since both A and B made changes to
> bar.txt, this requires conflicts to be resolved manually.
>
> - B reverts A's changes to foo.txt. (If B is coming from a different
> revision control system, this may happen due to confusion about how merges
> are handled.)

How is this "revert" done? Was it done at the conflict resolution
level or with a git-revert invocation?

Nonetheless, either way, A's commit would be still be present in the
log history.

>[snip]
> Graphically:
>
>    A1
>   /  ^
>  v    \
>  C1   B2<-B3
>  ^    /
>   \  v
>    B1
>
> B1, B2, and B3 have the same version of foo.txt as C1, A1 modifies it.

Just to clarify, is C1 the commit that both A and B both share when
they first pull in the first step? And B2 is the merge?

-- 
Cheers,
Ray Chuan

  parent reply	other threads:[~2012-01-22  4:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-20 21:35 Finding all commits which modify a file Neal Groothuis
2012-01-21 23:16 ` Neal Kreitzinger
2012-01-23 16:14   ` Neal Groothuis
2012-01-24  0:58     ` Santi Béjar
2012-01-24  1:15       ` Santi Béjar
2012-01-24  1:15       ` Linus Torvalds
2012-01-24  1:36         ` Santi Béjar
2012-01-24 18:35           ` Santi Béjar
2012-01-24  1:40       ` Junio C Hamano
2012-01-24 16:34       ` Neal Groothuis
2012-01-24 18:10         ` Santi Béjar
2012-01-25 16:23           ` Neal Groothuis
2012-01-26 22:42             ` Junio C Hamano
2012-01-22  4:03 ` Tay Ray Chuan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-02 14:55 Neal Groothuis
2012-02-02 19:13 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALUzUxpy+XdfMYqX8TGnpQ72FfvpF_VYP-19fTDLrD-=9CN3uw@mail.gmail.com' \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ngroot@lo-cal.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).