/usr/libexec/git-core
NameSizeModeActions
mergetools/-0755rm
git38459280755editdlrm
git-add38459280755editdlrm
git-am38459280755editdlrm
git-annotate38459280755editdlrm
git-apply38459280755editdlrm
git-archive38459280755editdlrm
git-bisect38459280755editdlrm
git-blame38459280755editdlrm
git-branch38459280755editdlrm
git-bugreport38459280755editdlrm
git-bundle38459280755editdlrm
git-cat-file38459280755editdlrm
git-check-attr38459280755editdlrm
git-check-ignore38459280755editdlrm
git-check-mailmap38459280755editdlrm
git-check-ref-format38459280755editdlrm
git-checkout38459280755editdlrm
git-checkout--worker38459280755editdlrm
git-checkout-index38459280755editdlrm
git-cherry38459280755editdlrm
git-cherry-pick38459280755editdlrm
git-clean38459280755editdlrm
git-clone38459280755editdlrm
git-column38459280755editdlrm
git-commit38459280755editdlrm
git-commit-graph38459280755editdlrm
git-commit-tree38459280755editdlrm
git-config38459280755editdlrm
git-contacts45090755editdlrm
git-count-objects38459280755editdlrm
git-credential38459280755editdlrm
git-credential-cache38459280755editdlrm
git-credential-cache--daemon38459280755editdlrm
git-credential-netrc109450755editdlrm
git-credential-store38459280755editdlrm
git-describe38459280755editdlrm
git-diagnose38459280755editdlrm
git-diff38459280755editdlrm
git-diff-files38459280755editdlrm
git-diff-index38459280755editdlrm
git-diff-tree38459280755editdlrm
git-difftool38459280755editdlrm
git-difftool--helper26090755editdlrm
git-fast-export38459280755editdlrm
git-fast-import38459280755editdlrm
git-fetch38459280755editdlrm
git-fetch-pack38459280755editdlrm
git-filter-branch158570755editdlrm
git-fmt-merge-msg38459280755editdlrm
git-for-each-ref38459280755editdlrm
git-for-each-repo38459280755editdlrm
git-format-patch38459280755editdlrm
git-fsck38459280755editdlrm
git-fsck-objects38459280755editdlrm
git-fsmonitor--daemon38459280755editdlrm
git-gc38459280755editdlrm
git-get-tar-commit-id38459280755editdlrm
git-grep38459280755editdlrm
git-hash-object38459280755editdlrm
git-help38459280755editdlrm
git-hook38459280755editdlrm
git-http-backend22494080755editdlrm
git-http-fetch22832240755editdlrm
git-http-push22914480755editdlrm
git-imap-send22921040755editdlrm
git-index-pack38459280755editdlrm
git-init38459280755editdlrm
git-init-db38459280755editdlrm
git-interpret-trailers38459280755editdlrm
git-log38459280755editdlrm
git-ls-files38459280755editdlrm
git-ls-remote38459280755editdlrm
git-ls-tree38459280755editdlrm
git-mailinfo38459280755editdlrm
git-mailsplit38459280755editdlrm
git-maintenance38459280755editdlrm
git-merge38459280755editdlrm
git-merge-base38459280755editdlrm
git-merge-file38459280755editdlrm
git-merge-index38459280755editdlrm
git-merge-octopus24770755editdlrm
git-merge-one-file36950755editdlrm
git-merge-ours38459280755editdlrm
git-merge-recursive38459280755editdlrm
git-merge-resolve12260755editdlrm
git-merge-subtree38459280755editdlrm
git-merge-tree38459280755editdlrm
git-mergetool116930755editdlrm
git-mergetool--lib107280644editdlrm
git-mktag38459280755editdlrm
git-mktree38459280755editdlrm
git-multi-pack-index38459280755editdlrm
git-mv38459280755editdlrm
git-name-rev38459280755editdlrm
git-notes38459280755editdlrm
git-pack-objects38459280755editdlrm
git-pack-redundant38459280755editdlrm
git-pack-refs38459280755editdlrm
git-patch-id38459280755editdlrm
git-prune38459280755editdlrm
git-prune-packed38459280755editdlrm
git-pull38459280755editdlrm
git-push38459280755editdlrm
git-quiltimport36930755editdlrm
git-range-diff38459280755editdlrm
git-read-tree38459280755editdlrm
git-rebase38459280755editdlrm
git-receive-pack38459280755editdlrm
git-reflog38459280755editdlrm
git-remote38459280755editdlrm
git-remote-ext38459280755editdlrm
git-remote-fd38459280755editdlrm
git-remote-ftp22996640755editdlrm
git-remote-ftps22996640755editdlrm
git-remote-http22996640755editdlrm
git-remote-https22996640755editdlrm
git-repack38459280755editdlrm
git-replace38459280755editdlrm
git-request-pull41470755editdlrm
git-rerere38459280755editdlrm
git-reset38459280755editdlrm
git-restore38459280755editdlrm
git-rev-list38459280755editdlrm
git-rev-parse38459280755editdlrm
git-revert38459280755editdlrm
git-rm38459280755editdlrm
git-send-pack38459280755editdlrm
git-sh-i18n16830644editdlrm
git-sh-i18n--envsubst22365280755editdlrm
git-sh-setup83980644editdlrm
git-shell22366880755editdlrm
git-shortlog38459280755editdlrm
git-show38459280755editdlrm
git-show-branch38459280755editdlrm
git-show-index38459280755editdlrm
git-show-ref38459280755editdlrm
git-sparse-checkout38459280755editdlrm
git-stage38459280755editdlrm
git-stash38459280755editdlrm
git-status38459280755editdlrm
git-stripspace38459280755editdlrm
git-submodule105080755editdlrm
git-submodule--helper38459280755editdlrm
git-switch38459280755editdlrm
git-symbolic-ref38459280755editdlrm
git-tag38459280755editdlrm
git-unpack-file38459280755editdlrm
git-unpack-objects38459280755editdlrm
git-update-index38459280755editdlrm
git-update-ref38459280755editdlrm
git-update-server-info38459280755editdlrm
git-upload-archive38459280755editdlrm
git-upload-pack38459280755editdlrm
git-var38459280755editdlrm
git-verify-commit38459280755editdlrm
git-verify-pack38459280755editdlrm
git-verify-tag38459280755editdlrm
git-version38459280755editdlrm
git-web--browse44010755editdlrm
git-whatchanged38459280755editdlrm
git-worktree38459280755editdlrm
git-write-tree38459280755editdlrm
scalar22909120755editdlrm
Edit: /usr/libexec/git-core/git-merge-one-file (3695B)
#!/bin/sh # # Copyright (c) Linus Torvalds, 2005 # # This is the git per-file merge script, called with # # $1 - original file SHA1 (or empty) # $2 - file in branch1 SHA1 (or empty) # $3 - file in branch2 SHA1 (or empty) # $4 - pathname in repository # $5 - original file mode (or empty) # $6 - file in branch1 mode (or empty) # $7 - file in branch2 mode (or empty) # # Handle some trivial cases.. The _really_ trivial cases have # been handled already by git read-tree, but that one doesn't # do any merges that might change the tree layout. USAGE=' ' USAGE="$USAGE " LONG_USAGE="usage: git merge-one-file $USAGE Blob ids and modes should be empty for missing files." SUBDIRECTORY_OK=Yes . git-sh-setup cd_to_toplevel require_work_tree if test $# != 7 then echo "$LONG_USAGE" exit 1 fi case "${1:-.}${2:-.}${3:-.}" in # # Deleted in both or deleted in one and unchanged in the other # "$1.." | "$1.$1" | "$1$1.") if { test -z "$6" && test "$5" != "$7"; } || { test -z "$7" && test "$5" != "$6"; } then echo "ERROR: File $4 deleted on one branch but had its" >&2 echo "ERROR: permissions changed on the other." >&2 exit 1 fi if test -n "$2" then echo "Removing $4" else # read-tree checked that index matches HEAD already, # so we know we do not have this path tracked. # there may be an unrelated working tree file here, # which we should just leave unmolested. Make sure # we do not have it in the index, though. exec git update-index --remove -- "$4" fi if test -f "$4" then rm -f -- "$4" && rmdir -p "$(expr "z$4" : 'z\(.*\)/')" 2>/dev/null || : fi && exec git update-index --remove -- "$4" ;; # # Added in one. # ".$2.") # the other side did not add and we added so there is nothing # to be done, except making the path merged. exec git update-index --add --cacheinfo "$6" "$2" "$4" ;; "..$3") echo "Adding $4" if test -f "$4" then echo "ERROR: untracked $4 is overwritten by the merge." >&2 exit 1 fi git update-index --add --cacheinfo "$7" "$3" "$4" && exec git checkout-index -u -f -- "$4" ;; # # Added in both, identically (check for same permissions). # ".$3$2") if test "$6" != "$7" then echo "ERROR: File $4 added identically in both branches," >&2 echo "ERROR: but permissions conflict $6->$7." >&2 exit 1 fi echo "Adding $4" git update-index --add --cacheinfo "$6" "$2" "$4" && exec git checkout-index -u -f -- "$4" ;; # # Modified in both, but differently. # "$1$2$3" | ".$2$3") case ",$6,$7," in *,120000,*) echo "ERROR: $4: Not merging symbolic link changes." >&2 exit 1 ;; *,160000,*) echo "ERROR: $4: Not merging conflicting submodule changes." >&2 exit 1 ;; esac src1=$(git unpack-file $2) src2=$(git unpack-file $3) case "$1" in '') echo "Added $4 in both, but differently." orig=$(git unpack-file $(git hash-object /dev/null)) ;; *) echo "Auto-merging $4" orig=$(git unpack-file $1) ;; esac git merge-file "$src1" "$orig" "$src2" ret=$? msg= if test $ret != 0 || test -z "$1" then msg='content conflict' ret=1 fi # Create the working tree file, using "our tree" version from the # index, and then store the result of the merge. git checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4" || exit 1 rm -f -- "$orig" "$src1" "$src2" if test "$6" != "$7" then if test -n "$msg" then msg="$msg, " fi msg="${msg}permissions conflict: $5->$6,$7" ret=1 fi if test $ret != 0 then echo "ERROR: $msg in $4" >&2 exit 1 fi exec git update-index -- "$4" ;; *) echo "ERROR: $4: Not handling case $1 -> $2 -> $3" >&2 ;; esac exit 1