Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Mira
ffmpeg
Commits
95a7cbb0
Commit
95a7cbb0
authored
8 years ago
by
Clément Bœsch
Browse files
Options
Downloads
Patches
Plain Diff
doc: move out merge script to tools
parent
485f75b2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/libav-merge.txt
+5
-31
5 additions, 31 deletions
doc/libav-merge.txt
tools/libav-merge-next-commit
+22
-0
22 additions, 0 deletions
tools/libav-merge-next-commit
with
27 additions
and
31 deletions
doc/libav-merge.txt
+
5
−
31
View file @
95a7cbb0
...
@@ -71,37 +71,11 @@ a different merge conflict style:
...
@@ -71,37 +71,11 @@ a different merge conflict style:
$ git config --global merge.conflictstyle diff3
$ git config --global merge.conflictstyle diff3
Here is a script to help merging the next commit in the queue:
tools/libav-merge-next-commit is a script to help merging the next commit in
the queue. It assumes a remote named libav. It has two modes: merge, and noop.
#!/bin/sh
The noop mode creates a merge with no change to the HEAD. You can pass a hash
as extra argument to reference a justification (it is common that we already
if [ "$1" != "merge" -a "$1" != "noop" ]; then
have the change done in FFmpeg).
printf "Usage: $0 <merge|noop [REF_HASH]>\n"
exit 0
fi
[ "$1" = "noop" ] && merge_opts="-s ours"
nextrev=$(git rev-list libav/master --not master --no-merges | tail -n1)
if [ -z "$nextrev" ]; then
printf "Nothing to merge..\n"
exit 0
fi
printf "Merging $(git log -n 1 --oneline $nextrev)\n"
git merge --no-commit $merge_opts --no-ff --log $nextrev
if [ "$1" = "noop" -a -n "$2" ]; then
printf "\nThis commit is a noop, see $2\n" >> .git/MERGE_MSG
fi
printf "\nMerged-by: $(git config --get user.name) <$(git config --get user.email)>\n" >> .git/MERGE_MSG
The script assumes a remote named libav.
It has two modes: merge, and noop. The noop mode creates a merge with no change
to the HEAD. You can pass a hash as extra argument to reference a justification
(it is common that we already have the change done in FFmpeg).
Also see tools/murge, you can copy and paste a 3 way conflict into its stdin
Also see tools/murge, you can copy and paste a 3 way conflict into its stdin
and it will display colored diffs. Any arguments to murge (like ones to suppress
and it will display colored diffs. Any arguments to murge (like ones to suppress
...
...
This diff is collapsed.
Click to expand it.
tools/libav-merge-next-commit
0 → 100755
+
22
−
0
View file @
95a7cbb0
#!/bin/sh
if
[
"
$1
"
!=
"merge"
-a
"
$1
"
!=
"noop"
]
;
then
printf
"Usage:
$0
<merge|noop [REF_HASH]>
\n
"
exit
0
fi
[
"
$1
"
=
"noop"
]
&&
merge_opts
=
"-s ours"
nextrev
=
$(
git rev-list libav/master
--not
master
--no-merges
|
tail
-n1
)
if
[
-z
"
$nextrev
"
]
;
then
printf
"Nothing to merge..
\n
"
exit
0
fi
printf
"Merging
$(
git log
-n
1
--oneline
$nextrev
)
\n
"
git merge
--no-commit
$merge_opts
--no-ff
--log
$nextrev
if
[
"
$1
"
=
"noop"
-a
-n
"
$2
"
]
;
then
printf
"
\n
This commit is a noop, see
$2
\n
"
>>
.git/MERGE_MSG
fi
printf
"
\n
Merged-by:
$(
git config
--get
user.name
)
<
$(
git config
--get
user.email
)
>
\n
"
>>
.git/MERGE_MSG
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment