From d1cc4621eda62222fbc929a7f65c89b6be678c2e Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 17 Jul 2010 18:46:48 -0700 Subject: [PATCH 1/2] Documentation: Explain git-mergetool's use of temporary files 'git mergetool' creates '*.orig' backup files in its default configuration. Mention this in its documentation. Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- Documentation/git-mergetool.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/git-mergetool.txt b/Documentation/git-mergetool.txt index 55735faf7b..e4ed016146 100644 --- a/Documentation/git-mergetool.txt +++ b/Documentation/git-mergetool.txt @@ -72,6 +72,16 @@ success of the resolution after the custom tool has exited. This is the default behaviour; the option is provided to override any configuration settings. +TEMPORARY FILES +--------------- +`git mergetool` creates `*.orig` backup files while resolving merges. +These are safe to remove once a file has been merged and its +`git mergetool` session has completed. + +Setting the `mergetool.keepBackup` configuration variable to `false` +causes `git mergetool` to automatically remove the backup as files +are successfully merged. + Author ------ Written by Theodore Y Ts'o From c173dad58787a7f11a526dbcdaa5a2fe9ff1c87f Mon Sep 17 00:00:00 2001 From: Ralf Thielow Date: Mon, 19 Jul 2010 18:26:12 +0200 Subject: [PATCH 2/2] update-server-info: Shorten read_pack_info_file() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The correct responses to a D and a T line in .git/objects/info/packs are the same, so combine their case arms. In both cases we already ‘goto’ out of the switch so while at it, remove a redundant ‘break’ to avoid yet another line of code. Signed-off-by: Ralf Thielow Reviewed-by: Jonathan Nieder gmail.com> Signed-off-by: Junio C Hamano --- server-info.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/server-info.c b/server-info.c index 4098ca2b5c..9ec744e9f2 100644 --- a/server-info.c +++ b/server-info.c @@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile) goto out_stale; break; case 'D': /* we used to emit D but that was misguided. */ - goto out_stale; - break; case 'T': /* we used to emit T but nobody uses it. */ goto out_stale; - break; default: error("unrecognized: %s", line); break;