resolve-ChangeLogs fails when run from anywhere other than the git root 1. do a git rebase with some changelog conflicts 2. cd into a sub directory (like WebCore) 3. Run resolve-ChangeLogs It fails with: WARNING: LayoutTests/ChangeLog does not need merging. WARNING: WebCore/ChangeLog does not need merging. Even though if you were at the git root, it would succeed. I believe the problem is in sub findUnmergedChangeLogs(): git diff -r --name-status --diff-filter=U -C -C -M [~/Projects/WebKit/WebCore] U LayoutTests/ChangeLog U WebCore/ChangeLog Notice how the returned paths are root-relative. Evan Martin suggested we just add cd $(git rev-parse --show-cdup) to the top of the script, but I expect that would break: resolve-ChangeLogs ChangeLog ../LayoutTests/ChangeLog (not that we handle that case very well to begin with, since git doesn't like ..) I looked at fixing this, but honestly I could not easily tell what half the variables in the darn script meant. $_[0] I can only assume is the first argument? And who knows what File::Spec->catfile($_[0], "ChangeLog"); is supposed to do? (Maybe that grabs the contents of the file?)
(In reply to comment #0) > I looked at fixing this, but honestly I could not easily tell what half the > variables in the darn script meant. $_[0] I can only assume is the first > argument? And who knows what File::Spec->catfile($_[0], "ChangeLog"); is > supposed to do? (Maybe that grabs the contents of the file?) man perlvar [search for @_] man File::Spec [search for catfile] I'll see what I can do the next time I get a ChangeLog conflict.
Thank you for the pointers (and being sympathetic to my frustration w/ the script).
*** This bug has been marked as a duplicate of 18599 ***