Avidemux Forum

Participate => Documentation & Tips => Topic started by: Jan Gruuthuse on September 29, 2016, 06:07:27 AM

Title: applying a diff patch on avidemux git
Post by: Jan Gruuthuse on September 29, 2016, 06:07:27 AM
the patch should start with a similar line like:
Quotediff --git a/avidemux/
Code: [Select] <- click , the code is now selected.
Right mouse click on selection, select copy.
Paste this into notepad++, gedit or similar editor (none word processor = modifies the present code)
and save this file as update.diff (example)
place the saved file into top of avidemux2 (git of current avidemux)
now you can apply the patch
git apply update.diff
If al went fine you should be able to build the modified code.

A sample patch can be found here: slider position displayed time (http://avidemux.org/smif/index.php/topic,17181.msg77294.html#msg77294) for documentation purpose only
You should not use this after 2016/09/28, commit ab5ddb4  [nvEnc] provide probe function. The code will evolve and will probably be not valid.

Title: going back
Post by: Jan Gruuthuse on September 29, 2016, 06:09:08 AM
Going back (if you don't want the patch remaining in your git)
# Undo changes in tracked files
git reset --hard

# Remove untracked files
git clean -df

should take you back as if you did not apply the patch:
QuoteRemoving install/
Removing update.diff
Title: patch a patch
Post by: Jan Gruuthuse on September 30, 2016, 08:19:48 AM
cd ~/avidemux2
patch -p1 < ~/Downloads/dragging-slider-to-zero-does-not-rewind-video-to-zero-fix.patch
Quotepatching file avidemux/common/gui_navigate.cpp

revert patch:
patch -Rp1 < ~/Downloads/dragging-slider-to-zero-does-not-rewind-video-to-zero-fix.patch

source: slider position displayed time (http://avidemux.org/smif/index.php/topic,17181.msg77325.html#msg77325)

~/ is the home of the current user. Just in case you wonder ;)