summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add threaded versions of functions in symlinks.c.jh/threadable-symlink-checkJared Hance2012-03-022-2/+28
| | | | | | | | | | | | check_leading_path() and has_dirs_only_path() both always use the default cache, which could be a caveat for adding parallelism (which is a concern and even a GSoC proposal). Reimplement these two in terms of new threaded_check_leading_path() and threaded_has_dirs_only_path() that take their own copy of the cache. Signed-off-by: Jared Hance <jaredhance@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: do not assume that n > 1 in <rev>~$nJunio C Hamano2012-03-021-1/+1
| | | | | | | | | | | | | | We explained <rev>~<n> as <n>th generation grand-parent, but a reader got confused by the "grand-" part when <n> is 1. Reword it with "ancestor"; with the "generation" and "following only the first parents" around there, what we try to describe should be clear enough now. Noticed-by: Luke Diamand <luke@diamand.org> Helped-by: Thomas Rast <trast@inf.ethz.ch> Helped-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation fixes in git-configLibor Pechacek2012-03-012-7/+12
| | | | | | | | | Variable names must start with an alphabetic character, regexp config key matching has its limits, sentence grammar. Signed-off-by: Libor Pechacek <lpechacek@suse.cz> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Update draft release notes to 1.7.9.3Junio C Hamano2012-02-271-0/+7
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'pj/remote-set-branches-usage-fix' into maintJunio C Hamano2012-02-272-2/+2
|\ | | | | | | | | | | | | | | * pj/remote-set-branches-usage-fix: remote: fix set-branches usage and documentation Conflicts: builtin/remote.c
| * remote: fix set-branches usage and documentationpj/remote-set-branches-usage-fixPhilip Jägenstedt2012-02-192-2/+2
| | | | | | | | | | | | | | | | | | The canonical order of command line arguments is always to have dashed commands before other parameters, but the "git remote set-branches" subcommand was described to take "name" before an optional "--add". Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jn/gitweb-unborn-head' into maintJunio C Hamano2012-02-272-2/+11
|\ \ | | | | | | | | | | | | * jn/gitweb-unborn-head: gitweb: Fix "heads" view when there is no current branch
| * | gitweb: Fix "heads" view when there is no current branchjn/gitweb-unborn-headJakub Narebski2012-02-172-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a repository whose HEAD points to an unborn branch with no commits, "heads" view and "summary" view (which shows what is shown in "heads" view) compared the object names of commits at the tip of branches with the output from "git rev-parse HEAD", which caused comparison of a string with undef and resulted in a warning in the server log. This can happen if non-bare repository (with default 'master' branch) is updated not via committing but by other means like push to it, or Gerrit. It can happen also just after running "git checkout --orphan <new branch>" but before creating any new commit on this branch. Rewrite the comparison so that it also works when $head points at nothing; in such a case, no branch can be "the current branch", add a test for it. While at it, rename local variable $head to $head_at, as it points to current commit rather than current branch name (HEAD contents). The code still incorrectly shows all branches that point at the same commit as what HEAD points as "the current branch", even when HEAD is detached. Fixing this bug is outside the scope of this patch. Reported-by: Rajesh Boyapati Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'jn/ancient-meld-support' into maintJunio C Hamano2012-02-271-1/+1
|\ \ \ | | | | | | | | | | | | | | | | * jn/ancient-meld-support: mergetools/meld: Use --help output to detect --output support
| * | | mergetools/meld: Use --help output to detect --output supportjn/ancient-meld-supportJonathan Nieder2012-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In v1.7.7-rc0~3^2 (2011-08-19), git mergetool's "meld" support learned to use the --output option when calling versions of meld that are detected to support it (1.5.0 and newer, hopefully). Alas, it misdetects old versions (before 1.1.5, 2006-06-11) of meld as supporting the option, so on systems with such meld, instead of getting a nice merge helper, the operator gets a dialog box with the text "Wrong number of arguments (Got 5)". (Version 1.1.5 is when meld switched to using optparse. One consequence of that change was that errors in usage are detected and signalled through the exit status even when --help was passed.) Luckily there is a simpler check that is more reliable: the usage string printed by "meld --help" reliably reflects whether --output is supported in a given version. Use it. Reported-by: Jeff Epler <jepler@unpythonic.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'tr/merge-edit-guidance' into maintJunio C Hamano2012-02-271-0/+10
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * tr/merge-edit-guidance: merge: add instructions to the commit message when editing
| * | | | merge: add instructions to the commit message when editingtr/merge-edit-guidanceThomas Rast2012-01-311-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before f824628 (merge: use editor by default in interactive sessions, 2012-01-10), git-merge only started an editor if the user explicitly asked for it with --edit. Thus it seemed unlikely that the user would need extra guidance. After f824628 the _normal_ thing is to start an editor. Give at least an indication of why we are doing it. The sentence about justification is one of the few things about standard git that are not agnostic to the workflow that the user chose. However, f824628 was proposed by Linus specifically to discourage users from merging unrelated upstream progress into topic branches. So we may as well take another step in the same direction. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | CodingGuidelines: do not use 'which' in shell scriptsTim Henigan2012-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the code review of a recent patch, it was noted that shell scripts must not use 'which $cmd' to check the availability of the command $cmd. The output of the command is not machine parseable and its exit code is not reliable across platforms. It is better to use 'type' to accomplish this task. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | CodingGuidelines: Add a note about spaces after redirectionTim Henigan2012-02-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During code review of some patches, it was noted that redirection operators should have space before, but no space after them. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | post-receive-email: match up $LOGBEGIN..$LOGEND pairs correctlyMichael Haggerty2012-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | post-receive-email: remove unused variableMichael Haggerty2012-02-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prep_for_email neither is passed a fourth argument nor uses it. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Document accumulated fixes since 1.7.9.2Junio C Hamano2012-02-262-1/+18
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/add-refresh-unmerged' into maintJunio C Hamano2012-02-262-2/+24
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * jc/add-refresh-unmerged: refresh_index: do not show unmerged path that is outside pathspec
| * | | | | refresh_index: do not show unmerged path that is outside pathspecjc/add-refresh-unmergedJunio C Hamano2012-02-172-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running "git add --refresh <pathspec>", we incorrectly showed the path that is unmerged even if it is outside the specified pathspec, even though we did honor pathspec and refreshed only the paths that matched. Note that this cange does not affect "git update-index --refresh"; for hysterical raisins, it does not take a pathspec (it takes real paths) and more importantly itss command line options are parsed and executed one by one as they are encountered, so "git update-index --refresh foo" means "first refresh the index, and then update the entry 'foo' by hashing the contents in file 'foo'", not "refresh only entry 'foo'". Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'js/configure-libintl' into maintJunio C Hamano2012-02-261-8/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * js/configure-libintl: configure: don't use -lintl when there is no gettext support
| * | | | | | configure: don't use -lintl when there is no gettext supportjs/configure-libintlJohn Szakmeister2012-02-201-8/+12
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current configure script uses -lintl if gettext is not found in the C library, but does so before checking if there is libintl.h available in the first place, in which case we would later define NO_GETTEXT. Instead, check for the existence of libintl.h first. Only when libintl.h exists and libintl is not in libc, ask for -lintl. Signed-off-by: John Szakmeister <john@szakmeister.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Sync with 1.7.8.5Junio C Hamano2012-02-266-6/+39
|\ \ \ \ \ \
| * | | | | | Git 1.7.8.5v1.7.8.5Junio C Hamano2012-02-263-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | grep -P: Fix matching ^ and $Michał Kiedrowicz2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When "git grep" is run with -P/--perl-regexp, it doesn't match ^ and $ at the beginning/end of the line. This is because PCRE normally matches ^ and $ at the beginning/end of the whole text, not for each line, and "git grep" passes a large chunk of text (possibly containing many lines) to pcre_exec() and then splits the text into lines. This makes "git grep -P" behave differently from "git grep -E" and also from "grep -P" and "pcregrep": $ cat file a b $ git grep --no-index -P '^ ' file $ git grep --no-index -E '^ ' file file: b $ grep -c -P '^ ' file b $ pcregrep -c '^ ' file b Reported-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Michał Kiedrowicz <michal.kiedrowicz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | am: don't infloop for an empty input fileJim Meyering2012-02-262-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git-am.sh's check_patch_format function would attempt to preview the patch to guess its format, but would go into an infinite loop when the patch file happened to be empty. The solution: exit the loop when "read" fails, not when the line var, "$l1" becomes empty. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | rebase -m: only call "notes copy" when rewritten exists and is non-emptyAndrew Wong2012-02-261-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This prevents a shell error complaining rebase-merge/rewritten doesn't exist. Signed-off-by: Andrew Wong <andrew.kw.w@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | Makefile: add thread-utils.h to LIB_HDmitry V. Levin2012-02-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with commit v1.7.8-165-g0579f91, grep.h includes thread-utils.h, so the latter has to be added to LIB_H. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Acked-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | git-p4: remove bash-ism in t9800Pete Wyckoff2012-02-261-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works in both bash and dash: $ bash -c 'VAR=1 env' | grep VAR VAR=1 $ dash -c 'VAR=1 env' | grep VAR VAR=1 But environment variables assigned this way are not necessarily propagated through a function in POSIX compliant shells: $ bash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR VAR=1 $ dash -c 'f() { "$@" }; VAR=1 f "env"' | grep VAR Fix constructs like this, in particular, setting variables through test_must_fail. Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | git-p4: remove bash-ism in t9809Pete Wyckoff2012-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Plain old $# works to count the number of arguments in either bash or dash, even if the arguments have spaces. Based-on-patch-by: Vitor Antunes <vitor.hda@gmail.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | git-p4: fix submit regression with clientSpec and subdir clonePete Wyckoff2012-02-262-43/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the --use-client-spec is given to clone, and the clone path is a subset of the full tree as specified in the client, future submits will go to the wrong place. Factor out getClientSpec() so both clone/sync and submit can use it. Introduce getClientRoot() that is needed for the client spec case, and use it instead of p4Where(). Test the five possible submit behaviors (add, modify, rename, copy, delete). Reported-by: Laurent Charrière <lcharriere@promptu.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | git-p4: set useClientSpec variable on initial clonePete Wyckoff2012-02-263-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If --use-client-spec was given, set the matching configuration variable. This is necessary to ensure that future submits work properly. The alternatives of requiring the user to set it, or providing a command-line option on every submit, are error prone. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | README: point to Documentation/SubmittingPatchesMatthieu Moy2012-02-231-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was indeed not obvious for new contributors to find this document in the source tree, since there were no reference to it outside the Documentation/ directory. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Document merge.branchdesc configuration variableJunio C Hamano2012-02-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was part of the "branch description" feature in the larger "help people communicate better during their pull based workflow" topic, but was never documented. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Git 1.7.9.2v1.7.9.2Junio C Hamano2012-02-222-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | completion: use tabs for indentationPhilip Jägenstedt2012-02-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CodingGuidlines confidently declares "We use tabs for indentation." It would be a shame if it were caught lying. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | completion: remove stale "to submit patches" documentationPhilip Jägenstedt2012-02-221-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was out-of-sync with the reality of who works on this script. Defer (silently) to Documentation/SubmittingPatches like all other code. Signed-off-by: Philip Jägenstedt <philip@foolip.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Update draft release notes to 1.7.9.2Junio C Hamano2012-02-211-16/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'cb/receive-pack-keep-errors' into maintJunio C Hamano2012-02-212-11/+35
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/receive-pack-keep-errors: do not override receive-pack errors
| * | | | | | | do not override receive-pack errorscb/receive-pack-keep-errorsClemens Buchacher2012-02-132-11/+35
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Receive runs rev-list --verify-objects in order to detect missing objects. However, such errors are ignored and overridden later. Instead, consequently ignore all update commands for which an error has already been detected. Some tests in t5504 are obsoleted by this change, because invalid objects are detected even if fsck is not enabled. Instead, they now test for different error messages depending on whether or not fsck is turned on. A better fix would be to force a corruption that will be detected by fsck but not by rev-list. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'cb/transfer-no-progress' into maintJunio C Hamano2012-02-217-21/+28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/transfer-no-progress: push/fetch/clone --no-progress suppresses progress output
| * | | | | | | push/fetch/clone --no-progress suppresses progress outputcb/transfer-no-progressClemens Buchacher2012-02-137-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, progress output is disabled if stderr is not a terminal. The --progress option can be used to force progress output anyways. Conversely, --no-progress does not force progress output. In particular, if stderr is a terminal, progress output is enabled. This is unintuitive. Change --no-progress to force output off. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'jk/git-dir-lookup' into maintJunio C Hamano2012-02-215-5/+109
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jk/git-dir-lookup: standardize and improve lookup rules for external local repos
| * | | | | | | | standardize and improve lookup rules for external local reposjk/git-dir-lookupJeff King2012-02-025-5/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you specify a local repository on the command line of clone, ls-remote, upload-pack, receive-pack, or upload-archive, or in a request to git-daemon, we perform a little bit of lookup magic, doing things like looking in working trees for .git directories and appending ".git" for bare repos. For clone, this magic happens in get_repo_path. For everything else, it happens in enter_repo. In both cases, there are some ambiguous or confusing cases that aren't handled well, and there is one case that is not handled the same by both methods. This patch tries to provide (and test!) standard, sensible lookup rules for both code paths. The intended changes are: 1. When looking up "foo", we have always preferred a working tree "foo" (containing "foo/.git" over the bare "foo.git". But we did not prefer a bare "foo" over "foo.git". With this patch, we do so. 2. We would select directories that existed but didn't actually look like git repositories. With this patch, we make sure a selected directory looks like a git repo. Not only is this more sensible in general, but it will help anybody who is negatively affected by change (1) negatively (e.g., if they had "foo.git" next to its separate work tree "foo", and expect to keep finding "foo.git" when they reference "foo"). 3. The enter_repo code path would, given "foo", look for "foo.git/.git" (i.e., do the ".git" append magic even for a repo with working tree). The clone code path did not; with this patch, they now behave the same. In the unlikely case of a working tree overlaying a bare repo (i.e., a ".git" directory _inside_ a bare repo), we continue to treat it as a working tree (prefering the "inner" .git over the bare repo). This is mainly because the combination seems nonsensical, and I'd rather stick with existing behavior on the off chance that somebody is relying on it. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'jc/diff-stat-scaler' into maintJunio C Hamano2012-02-211-7/+20
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/diff-stat-scaler: diff --stat: show bars of same length for paths with same amount of changes
| * | | | | | | | | diff --stat: show bars of same length for paths with same amount of changesjc/diff-stat-scalerJunio C Hamano2012-02-141-7/+20
| | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When commit 3ed74e6 (diff --stat: ensure at least one '-' for deletions, and one '+' for additions, 2006-09-28) improved the output for files with tiny modifications, we accidentally broke the logic to ensure that two equal sized changes are shown with the bars of the same length, even when rounding errors exist. Compute the length of the graph bars, using the same "non-zero changes is shown with at least one column" scaling logic, but by scaling the sum of additions and deletions to come up with the total length of the bar (this ensures that two equal sized changes result in bars of the same length), and then scaling the smaller of the additions or deletions. The other side is computed as the difference between the two. This makes the apportioning between additions and deletions less accurate due to rounding errors, but it is much less noticeable than two files with the same amount of change showing bars of different length. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'zj/term-columns' into maintJunio C Hamano2012-02-213-22/+38
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * zj/term-columns: pager: find out the terminal width before spawning the pager
| * | | | | | | | | pager: find out the terminal width before spawning the pagerzj/term-columnsZbigniew Jędrzejewski-Szmek2012-02-133-22/+38
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | term_columns() checks for terminal width via ioctl(2) on the standard output, but we spawn the pager too early for this check to be useful. The effect of this buglet can be observed by opening a wide terminal and running "git -p help --all", which still shows 80-column output, while "git help --all" uses the full terminal width. Run the check before we spawn the pager to fix this. While at it, move term_columns() to pager.c and export it from cache.h so that callers other than the help subsystem can use it. Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'cb/maint-rev-list-verify-object' into maintJunio C Hamano2012-02-212-2/+28
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/maint-rev-list-verify-object: git rev-list: fix invalid typecast
| * | | | | | | | | git rev-list: fix invalid typecastcb/maint-rev-list-verify-objectClemens Buchacher2012-02-132-2/+28
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git rev-list passes rev_list_info, not rev_list objects. Without this fix, rev-list enables or disables the --verify-objects option depending on a read from an undefined memory location. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | | Merge branch 'cb/maint-t5541-make-server-port-portable' into maintJunio C Hamano2012-02-211-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/maint-t5541-make-server-port-portable: t5541: check error message against the real port number used