git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git log history simplification problem

From
MVMiklos Vajna <vmiklos@collabora.co.uk>
Date
Feb 4, 2014, 19:05 UTC
Message-ID
<20140204190516.GD17861@collabora.co.uk>
In-Reply-To
<20140204173713.GC17861@collabora.co.uk>
On Tue, Feb 04, 2014 at 06:37:13PM +0100, Miklos Vajna <vmiklos@collabora.co.uk> wrote:
Show 6 quoted lines
> But then I run:
> 
> git grep 'mnTitleBarHeight =' sd
> 
> and it's not there. Am I missing something, as in e.g. even with
> --full-history git-log does some simplification?

I tried to reproduce this with a repo from scratch, and it seems my problem is the following:

1) "A" creates a feature branch
2) "A" works on it, and in the meantime master progresses as well
3) "A" merges master to the feature branch
4) "A" does some additional changes, and -- in an evil way -- uses "git
commit -a --amend" to squeeze these into the merge commit
5) "B" (that's me) comes and try to find out where a string got deleted,
but can't.
Here is a reproducer script:

---- rm -rf scratch mkdir scratch cd scratch git init echo -e "a\na\na\na\na\na\na\na\n" > a git add a git commit -m init git branch feature echo "b" >> a git add a git commit -m "more master changes" git checkout feature sed -i '1iXXX' a # insert first row git add a git commit -m "feature" git merge -m merge master sed -i '1d' a # delete first row git add a git commit --amend -m "merge" ----

I now know that the XXX got removed by the merge commit, but how can I see it that I'm right? If I run 'git log --all -p' in the result, I see that XXX got inserted by one commit, now I don't have it, but I don't see any deletion, which confuses me.

Any ideas? :-)
Thanks,
Miklos
Previous: Miklos VajnaNext: Jonathan Nieder
Message 2 of 5 in “git log history simplification problem”
  1. Miklos VajnaFeb 4, 2014
  2. Miklos VajnaFeb 4, 2014
  3. Jonathan NiederFeb 4, 2014
  4. Miklos VajnaFeb 4, 2014
  5. Junio C HamanoFeb 4, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.