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

Confused about git filter-branch results

From
MKMike Kelly <mike@piratehaven.org>
Date
Jan 25, 2011, 11:48 UTC
Message-ID
<20110125114840.GB9367@skull.piratehaven.org>
Hi Everyone,

I was fooling around with 'git filter-branch --env-filter ...' trying to update the timestamps on my commits (which worked), but now when I run 'git whatchanged -p master..' shows all changes to the entire project, not the differences between my branch and the master branch.

Being a novice git user, I'm not sure how much to trust that I didn't hose git in some really weird way, leaving it in a state where it doesn't quite work the way it did before.

The contents of .git/refs/original/refs/heads/ shows a file with my branch name which contains only one entry (presumably the one I updated the timestamp on) so I feel pretty sure that only the commit I wanted to change actually changed. However, the fact that 'git whatchanged -p' now behaves differently makes me worry.

Nothing went wrong during my update, however, I forgot to give a range label so it searched the entire project. In theory nothing should have changed, but...

Ultimately, my worry is that I polluted the history which I cloned, and pushing that would make people unhappy.

I can still get to my patches, so I can still do a fresh pull and reapply all my changes again, as a last resort, but I'd rather not if I don't have to.

So my questions are:
 1) Is this a problem with an easy fix?
 2) If not, can I back out my change?
 3) Is git push --dry-run the best way to find out what I changed?  Is there
    a better way to see what will be pushed?
 4) Is there a better way to update the timestamps of my commits so that my
    patches will appear as a solid block of commits in the history (as that
    is how they will be committed), not interleaved with other changes in
    the past (giving the false impression that they were applied to the
    master tree when they were not)?
Thanks in advance,

Mike (:

-- 
--------Mike@PirateHaven.org-----------------------The_glass_is_too_big--------
Next: Thomas Rast
Message 1 of 3 in “Confused about git filter-branch results”
  1. Mike KellyJan 25, 2011
  2. Thomas RastJan 25, 2011
  3. Mike KellyJan 26, 2011

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.