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

Custom Merge

From
JRJose Ricardo <josericardo.jr@gmail.com>
Date
Apr 23, 2012, 12:25 UTC
Message-ID
<loom.20120423T141242-348@post.gmane.org>
Hi everyone!

In my project, I have a lot of image files, that I wanted to process using a different tool. For this, after reading some posts about custom merge drivers in this forum, I make the following modifications:

In the file .gitconfig I added the following lines:
[merge "imgfile"]
        name = Driver for image files
        driver = /usr/local/bin/git-merge-img.sh %O %A %B %L
        recursive = binary
and in the .gitinfoattributes I put:
*.png   merge=imgfile
As I can see, it works calling my custom script during a merge between
 two branches that have a .png file. Unfortunately, even after a successfully 
merge, the final image is not merged with the one in the other branch. 
In order to test it, I've called my script using three images, giving me the 
corrected result.
I don't know if it could help but instead of changing the content of the file
 I create another one with the same name during a merge operation.
Does anyone could help me pointing what could be wrong with this?
Thanks a lot!
Next: Johannes Sixt
Message 1 of 3 in “Custom Merge”
  1. Jose RicardoApr 23, 2012
  2. Johannes SixtApr 23, 2012
  3. Jose RicardoApr 23, 2012

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.