Source

git / git-merge-one-file.sh

Author Commit Message Labels Comments Date
Junio C Hamano
Merge branch 'kb/p4merge' Adjust the order mergetools feeds the files to the p4merge backend to match the p4 convention. * kb/p4merge: merge-one-file: force content conflict for "both sides added" case git-merge-one-file: send "ERROR:" messages to stderr git-merge-one-file: style cleanup merge-one-file: remove stale comment mergetools/p4merge: create a base if none available mergetools/p4merge: swap LOCAL and …
Junio C Hamano
merge-one-file: force content conflict for "both sides added" case Historically, we tried to be lenient to "both sides added, slightly differently" case and as long as the files can be merged using a made-up common ancestor cleanly, since f7d24bbefb06 (merge with /dev/null as base, instead of punting O==empty case, 2005-11-07). This was later further refined to use a better made-up common file with fd66dbf5297a (merge-one-file: use empty- or common-base condinti…
Kevin Bracey
git-merge-one-file: send "ERROR:" messages to stderr Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kevin Bracey
git-merge-one-file: style cleanup Update style to match Documentation/CodingGuidelines. Signed-off-by: Kevin Bracey <kevin@bracey.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
merge-one-file: remove stale comment The "funny filename" comment was from b539c5e8fbd3 (git-merge-one: new merge world order., 2005-12-07) where the removed code just before that new comment ended with: merge "$4" "$orig" "$src2" (yes, we used to use "merge" program from the RCS suite). The comment refers to one of the bad side effect the old code used to have and warns against such a practice, i.e. it was talking about t…
Kevin Bracey
mergetools/p4merge: create a base if none available Originally, with no base, Git gave P4Merge $LOCAL as a dummy base: p4merge "$LOCAL" "$LOCAL" "$REMOTE" "$MERGED" Commit 0a0ec7bd changed this to: p4merge "empty file" "$LOCAL" "$REMOTE" "$MERGED" to avoid the problem of being unable to save in some circumstances with similar inputs. Unfortunately this approach produces much worse results on differing inputs. P4Merge really regards the b…
David Aguilar
git-merge-one-file: use a lowercase "usage:" string Make the usage string consistent with Git. Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
Merge branch 'js/maint-merge-one-file-osx-expr' into maint * js/maint-merge-one-file-osx-expr: merge-one-file: fix "expr: non-numeric argument"
Junio C Hamano
Merge branch 'js/maint-merge-one-file-osx-expr' * js/maint-merge-one-file-osx-expr: merge-one-file: fix "expr: non-numeric argument"
Jay Soffian
merge-one-file: fix "expr: non-numeric argument" When invoking expr to compare two numbers, don't quote the variables which are the output of 'wc -c'. On OS X, this output includes spaces, which expr balks at: $ sz0=`wc -c </etc/passwd` $ sz1=`wc -c </etc/passwd` $ echo "'$sz0'" ' 3667' $ expr "$sz0" \< "$sz1" \* 2 expr: non-numeric argument $ expr $sz0 \< $sz1 \* 2 1 Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signe…
Junio C Hamano
Merge branch 'jk/merge-one-file-working-tree' into maint * jk/merge-one-file-working-tree: merge-one-file: fix broken merges with alternate work trees add tests for merge-index / merge-one-file
Junio C Hamano
Merge branch 'jk/merge-one-file-working-tree' * jk/merge-one-file-working-tree: merge-one-file: fix broken merges with alternate work trees add tests for merge-index / merge-one-file
Jeff King
merge-one-file: fix broken merges with alternate work trees The merge-one-file tool predates the invention of GIT_WORK_TREE. By the time GIT_WORK_TREE was invented, most people were using the merge-recursive strategy, which handles resolving internally. Therefore these features have had very little testing together. For the most part, merge-one-file just works with GIT_WORK_TREE; most of its heavy lifting is done by plumbing commands which do respect GIT_…
Junio C Hamano
build: propagate $DIFF to scripts git-merge-one-file expects to run "-u" capable "diff", but using $DIFF is not the right way to do so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Gary V. Vaughan
Do not use "diff" found on PATH while building and installing Some of the flags used with the first diff found in PATH cause the vendor diff to choke. Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jonathan Nieder
Show usage string for 'git merge-one-file -h' Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alex Riesen
Clarify kind of conflict in merge-one-file helper Not as verbose as the recursive merge driver, but better still. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
git-merge-one-file: fix longstanding stupid thinko When a merge result creates a new file, and when our side already has a file in the path, taking the merge result may clobber the untracked file. However, the logic to detect this situation was totally the wrong way. We should complain when the file exists, not when the file does not exist. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
Support a merge with conflicting gitlink change merge-recursive did not support merging trees that have conflicting changes in submodules they contain, and died. Support it exactly the same way as how it handles conflicting symbolic link changes --- mark it as a conflict, take the tentative result from the current side, and letting the caller resolve the conflict, without dying in merge_file() function. Also reword the error message issued wh…
Junio C Hamano
Fix merge-one-file for our-side-added/our-side-removed cases When commit ed93b449 changed the script so that it does not touch untracked working tree file, we forgot that we still needed to resolve the index entry (otherwise they are left unmerged). Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
Rewrite "git-frotz" to "git frotz" This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano
War on whitespace This uses "git-apply --whitespace=strip" to fix whitespace errors that have crept in to our source files over time. There are a few files that need to have trailing whitespaces (most notably, test vectors). The results still passes the test, and build result in Documentation/ area is unchanged. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin
Use git-merge-file in git-merge-one-file, too Would you believe? I edited git-merge-one-file (note the missing ".sh"!) when I submitted the patch which became commit e2b7008752... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano
merge: loosen overcautious "working file will be lost" check. The three-way merge complained unconditionally when a path that does not exist in the index is involved in a merge when it existed in the working tree. If we are merging an old version that had that path tracked, but the path is not tracked anymore, and if we are merging that old version in, the result will be that the path is not tracked. In that case we should not complain. Signed-off-by: Jun…
Pavel Roskin
Fix more typos, primarily in the code The only visible change is that git-blame doesn't understand "--compability" anymore, but it does accept "--compatibility" instead, which is already documented. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Mark Wooding
Shell utilities: Guard against expr' magic tokens. Some words, e.g., `match', are special to expr(1), and cause strange parsing effects. Track down all uses of expr and mangle the arguments so that this isn't a problem. Signed-off-by: Mark Wooding <mdw@distorted.org.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Alex Riesen
trivial: remove the dots at the end of file names from merge-one-file to make the output more friendly to mouse copy-paste. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano
git-merge-one: new merge world order. This does two things: - Use new --stage=2 option to create the working tree file with leading paths and correct permission bits using checkout-index, as before. - Make sure we do not confuse "merge" program when the file being merged has an unfortunate name, '-L'. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano
git-merge-one-file: resurrect leading path creation. Since we do not use git-update-index followed by git-checkout-index -u to create the half-merged file on conflicting case anymore, we need to make sure the leading directories are created here. Maybe a better solution would be to allow update-index to add to higher stage, and checkout-index to extract from such, but that is a change slightly bigger than I would like to have so close to 1.0, so th…
Junio C Hamano
merge-one-file: make sure we do not mismerge symbolic links. We ran "merge" command on O->A, O->B, A!=B case without verifying the path involved is not a symlink. Signed-off-by: Junio C Hamano <junkio@cox.net>
  1. Prev
  2. 1
  3. 2
  4. Next