summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* environment.c: remove unused variableJonathan Nieder2010-10-031-3/+1
| | | | | | | | After v1.6.0-rc0~230^2^ (environment.c: remove unused function, 2008-06-19), git_refs_dir is not used any more. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix typo in pack-objects' usageJohannes Schindelin2010-09-301-1/+1
| | | | | | Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Make sure that git_getpass() never returns NULLJohannes Schindelin2010-09-301-2/+6
| | | | | | | | | The result of git_getpass() is used without checking for NULL, so let's just die() instead of returning NULL. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t0004 (unwritable files): simplify error handlingJonathan Nieder2010-09-301-38/+14
| | | | | | | | | | | | | | | | Instead of ... normal test script ... status=$? ... cleanup ... (exit $status) set up cleanup commands with test_when_finished. This makes the test script a little shorter, and more importantly, it ensures errors during cleanup are reported. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* rev-list-options: clarify --parents and --childrenMichael J Gruber2010-09-301-4/+4
| | | | | | | | Make it clearer that --parents resp. --children list the parent resp. child commits next to each commit, so that I understand next time. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* MinGW: avoid collisions between "tags" and "TAGS"Junio C Hamano2010-09-291-6/+9
| | | | | | | | | | | | On case insensitive filesystems, "tags" and "TAGS" target will try to overwrite the same file. Allow MinGW to use "ETAGS" instead. These two targets do produce real files; do not put them on .PHONY target list. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* diff: trivial fix for --output file error messageMatthieu Moy2010-09-291-1/+1
| | | | | | | | The option argument is either after the equal sign in --output=... or in the next command-line argument. optarg is the reliable way to access it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* user-manual: fix anchor name Finding-comments-With-given-ContentMichael J Gruber2010-09-291-1/+1
| | | | | | | | | | | Change the anchor name to Finding-commits-With-given-Content so that it corresponds to the actual content there. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* user-manual: be consistent in illustrations to 'git rebase'Kirill Smelkov2010-09-291-2/+2
| | | | | | | | Since we use a-b-c for mywork commits in one place, I think it would be logical to also use a-b-c too in other illustration on this topic. Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* stash: simplify parsing fixesJon Seymour2010-09-291-21/+7
| | | | | | | | | | | | | | This patch simplifies Brian's fix for the recent regression by: * eliminating the extra loop * eliminating use of git rev-parse for parsing flags * making use of the for opt idiom for the retained loop * eliminating the redundant -- case The patch has been tested with the tests in current maint. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.3.1v1.7.3.1Junio C Hamano2010-09-294-3/+18
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* stash: fix git stash branch regression when branch creation failsJon Seymour2010-09-292-4/+4
| | | | | | | | | "git stash branch <branch> <stash>" started discarding the stash when the branch creation fails. It should have kept the stash intact when aborting. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* stash drops the stash even if creating the branch fails because it already ↵Tomas Carnecky2010-09-291-0/+11
| | | | | | | | | | | | | | exists This bug was disovered by someone on IRC when he tried to $ git stash branch <branch> <stash> while <branch> already existed. In that case the stash is dropped even though it isn't applied on any branch, so the stash is effectively lost. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Fix missing 'does' in man-page for 'git checkout'Linus Torvalds2010-09-271-8/+8
| | | | | | Reported-by: Rainer Standke <rainer.standke@krankikom.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* dir.c: squelch false uninitialized memory warningPat Notz2010-09-271-1/+1
| | | | | | | GCC 4.4.4 on MacOS incorrectly warns about potential use of uninitialized memory. Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-send-email.perl: ensure $domain is defined before using itBrandon Casey2010-09-271-1/+1
| | | | | | | | | | | valid_fqdn() may attempt to operate on an undefined value if Net::Domain::domainname fails to determine the domain name. This causes perl to emit unpleasant warnings. So, add a check for whether $domain has been defined before using it. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* wt-status.c: don't leak directory entries when processing untracked,ignoredBrandon Casey2010-09-271-10/+6
| | | | | | | | | | | | | When iterating through the list of directory entries, searching for untracked entries, only the entries added to the string_list were free'd. The rest (tracked or not matching the pathspec) were leaked. Ditto for the "ignored" loop. Rearrange the loops so that all entries are free'd. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t6050 (replace): fix bogus "fetch branch with replacement" testChristian Couder2010-09-271-3/+10
| | | | | | | | | | | | | | | The test was missing some "&&" at the end of some lines and it was wrong because, as the replacement refs were not fetched, the commits from the parallel branch should not show up. This was found by Elijah Newren. This is fixed by checking that after the branch from HASH6 is fetched, the commits from the parallel branch don't show up, and then by fetching the replacement refs and checking that they do show up afterwards. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Documentation: Refer to git-commit-tree in git-filter-branch helpWesley J. Landaker2010-09-271-1/+1
| | | | | | | | | | Currently, the help for git filter-branch refers users of --env-filter to git-commit for information about environment variables affecting commits. However, this information is not contained in the git-commit help, but is very explicitly detailed in git-commit-tree. Signed-off-by: Wesley J. Landaker <wjl@icecavern.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* update comment and documentation for :/foo syntaxMatthieu Moy2010-09-272-1/+4
| | | | | | | | The documentation in revisions.txt did not match the implementation, and the comment in sha1_name.c was incomplete. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Improvements to `git checkout -h`Daniel Knittl-Frank2010-09-271-6/+6
| | | | | | | | be a little more verbose about what each option does Signed-off-by: Daniel Knittl-Frank <knittl89+git@googlemail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* contrib/completion: --no-index option to git diffMichael J Gruber2010-09-271-1/+1
| | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* prefer test -h over test -L in shell scriptsJeff King2010-09-273-5/+5
| | | | | | | | Even though "-L" is POSIX, the former is more portable, and we tend to prefer it already. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* CodingGuidelines: spell Arithmetic Expansion with $(($var))Junio C Hamano2010-09-271-0/+4
| | | | | | | | | POSIX wants shells to support both "N" and "$N" and requires them to yield the same answer to $((N)) and $(($N)), but we should aim for portability in a case like this, especially when the price we pay to do so is so small, i.e. a few extra dollars. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t1503: Fix arithmetic expansion syntax error when using dashRamsay Jones2010-09-271-2/+2
| | | | | | | | | | | | | On systems which have dash as /bin/sh, such as Ubuntu, the final test (master@{n} for various n) fails with a syntax error while processing an arithmetic expansion. The syntax error is caused by using a bare name ('N') as a variable reference in the expression. In order to avoid the syntax error, we spell the variable reference as '$N' rather than simply 'N'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* strbuf.h: fix comment typoPat Notz2010-09-271-1/+1
| | | | | Signed-off-by: Pat Notz <patnotz@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-stash: fix flag parsingBrian Gernhardt2010-09-262-8/+15
| | | | | | | | | | Currently git-stash uses `git rev-parse --no-revs -- "$@"` to set its FLAGS variable. This is the same as `FLAGS="-- $@"`. It should use `git rev-parse --no-revs --flags "$@"`, but that eats any "-q" or "--quiet" argument. So move the check for quiet before rev-parse. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t3903-stash: improve testing of git-stash showBrandon Casey2010-09-261-4/+58
| | | | | | | | | | | | | Recently, the 'stash show' functionality was broken for the case when a stash-like argument was supplied. Since, commit 9bf09e, 'stash show' when supplied a stash-like argument prints nothing and still exists with a zero status. Unfortunately, the flaw slipped through the test suite cracks since the output of 'stash show' was not verified to be correct. Improve and expand on the existing tests so that this flaws is detected. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Git 1.7.3v1.7.3Junio C Hamano2010-09-183-14/+8
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/ls-files-x-doc'Junio C Hamano2010-09-181-5/+6
|\ | | | | | | | | | | | | | | | | * js/ls-files-x-doc: ls-files documentation: reword for consistency git-ls-files.txt: clarify -x/--exclude option Conflicts: Documentation/git-ls-files.txt
| * ls-files documentation: reword for consistencyJunio C Hamano2010-09-151-4/+4
| | | | | | | | | | | | | | | | Similar to descriptions of other options, state what -x does in imperative mood. Start sentences for -X and --exclude-per-directory options in capital letters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * git-ls-files.txt: clarify -x/--exclude optionJay Soffian2010-09-151-2/+3
| | | | | | | | | | | | | | | | | | | | Since b5227d8, -x/--exclude does not apply to cached files. This is easy to miss unless you read the discussion in the EXCLUDE PATTERNS section. Clarify that the option applies to untracked files and direct the reader to EXCLUDE PATTERNS. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-rebase--interactive.sh: replace cut with ${v%% *}Chris Johnsen2010-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some versions of cut do not cope well with lines that do not end in an LF. In this case, we can completely avoid cut by using the ${var%% *} parameter expansion (suggested by Brandon Casey). I found this problem when t3404's "avoid unnecessary reset" failed due to the "rebase -i" not avoiding updating the tested timestamp. On a Mac OS X 10.4.11 system: % printf '%s' 'foo bar' | /usr/bin/cut -d ' ' -f 1 cut: stdin: Illegal byte sequence Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t/t7300: workaround ancient touch by rearranging argumentsBrandon Casey2010-09-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The ancient touch on Solaris 7 thinks that a decimal number supplied as the first argument specifies a date_time to give to the files specified by the remaining arguments. In this case, it fails to parse '1' as a proper date_time and exits with a failure status. Workaround this flaw by rearranging the arguments supplied to touch so that a non-digit appears first and touch will not be confused. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'bg/fix-t7003'Junio C Hamano2010-09-161-38/+41
|\ \ | | | | | | | | | | | | * bg/fix-t7003: t7003: Use test_commit instead of custom function
| * | t7003: Use test_commit instead of custom functionBrian Gernhardt2010-09-131-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | t7003-filter-branch.sh had a make_commit() function that was identical to test_commit() in test-lib.sh except that it used tr to create a lowercase file name from the uppercase branch name instead of appending ".t". Not only is this unneeded code duplication, it also was something simply waiting to fail on case-insensitive file systems. So replace all uses of make_commit with test_commit. While we're editing the setup, chain it together with && so that failures early in the sequence don't get lost and add a commit graph. Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Git 1.7.3 rc2v1.7.3-rc2Junio C Hamano2010-09-152-3/+9
| | |
* | | Merge branch 'dr/maint-ls-tree-prefix-recursion-fix'Junio C Hamano2010-09-152-0/+11
|\ \ \ | | | | | | | | | | | | | | | | * dr/maint-ls-tree-prefix-recursion-fix: ls-tree $di $dir: do not mistakenly recurse into directories
| * | | ls-tree $di $dir: do not mistakenly recurse into directoriesJunio C Hamano2010-09-122-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When applying two pathspecs, one of which is named as a prefix to the other, we mistakenly recursed into the shorter one. Noticed and fixed by David Reis. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'os/fix-rebase-diff-no-prefix'Junio C Hamano2010-09-151-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * os/fix-rebase-diff-no-prefix: Add --src/dst-prefix to git-formt-patch in git-rebase.sh
| * | | | Add --src/dst-prefix to git-formt-patch in git-rebase.shOded Shimon2010-09-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the case of "diff.noprefix" in git-config, git-format-patch should still output diff with standard prefixes for git-am Signed-off-by: Oded Shimon <ods15@ods15.dyndns.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jl/fix-test'Junio C Hamano2010-09-1535-491/+604
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jl/fix-test: t1020: Get rid of 'cd "$HERE"' at the start of each test t2016 (checkout -p): add missing && t1302 (core.repositoryversion): style tweaks t2105 (gitfile): add missing && t1450 (fsck): remove dangling objects tests: subshell indentation stylefix Several tests: cd inside subshell instead of around
| * | | | | t1020: Get rid of 'cd "$HERE"' at the start of each testJens Lehmann2010-09-091-41/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To achieve that, all cd commands which weren't inside a subshell had to be put into a new one. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | t2016 (checkout -p): add missing &&Jonathan Nieder2010-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the set_state command is not likely to fail, it is best to stay in the habit of checking for failures. Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | t1302 (core.repositoryversion): style tweaksJonathan Nieder2010-09-091-24/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test is from 2007, which is late enough for the style to be recognizably modern but still a while ago. Freshen it up to follow new best practices: - guard setup commands with test_expect_setup, so errors at that stage can be caught; - use <<\EOF in preference to <<EOF, to save reviewers the trouble of looking for variable interpolations; - use test_cmp instead of test "$foo" = "$bar", for better output with -v on failure; - indent commands in subshells and let them span multiple lines; - combine the two "gitdir required mode" tests that do not make as much sense alone. Cc: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | t2105 (gitfile): add missing &&Jonathan Nieder2010-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure early failures are not masked by later successes. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Acked-by: Brad King <brad.king@kitware.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | t1450 (fsck): remove dangling objectsJonathan Nieder2010-09-091-58/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fsck test is generally careful to remove the corrupt objects it inserts, but dangling objects are left behind due to some typos and omissions. It is better to clean up more completely, to simplify the addition of later tests. So: - guard setup and cleanup with test_expect_success to catch typos and errors; - check both stdout and stderr when checking for empty fsck output; - use test_cmp empty file in place of test $(wc -l <file) = 0, for better debugging output when running tests with -v; - add a remove_object () helper and use it to replace broken object removal code that forgot about the fanout in .git/objects; - disable gc.auto, to avoid tripping up object removal if the number of objects ever reaches that threshold. - use test_when_finished to ensure cleanup tasks are run and succeed when tests fail; - add a new final test that no breakage or dangling objects was left behind. While at it, add a brief description to test_description of the history that is expected to persist between tests. Part of a campaign to clean up subshell usage in tests. Cc: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | tests: subshell indentation stylefixJonathan Nieder2010-09-0922-192/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Format the subshells introduced by the previous patch (Several tests: cd inside subshell instead of around, 2010-09-06) like so: ( cd subdir && ... ) && This is generally easier to read and has the nice side-effect that this patch will show what commands are used in the subshell, making it easier to check for lost environment variables and similar behavior changes. Cc: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | Merge branch 'jl/maint-fix-test'Junio C Hamano2010-09-0632-260/+256
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jl/maint-fix-test: Several tests: cd inside subshell instead of around Conflicts: t/t9600-cvsimport.sh
| | * | | | | Several tests: cd inside subshell instead of aroundJens Lehmann2010-09-0632-260/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed all places where it was a straightforward change from cd'ing into a directory and back via "cd .." to a cd inside a subshell. Found these places with "git grep -w "cd \.\.". Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>