summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-05-25Merge branch 'js/mailinfo'Libravatar Junio C Hamano7-35/+115
* js/mailinfo: mailsplit: minor clean-up in read_line_with_nul() mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepaths mailsplit and mailinfo: gracefully handle NUL characters
2008-05-25Merge branch 'jc/add-n-u'Libravatar Junio C Hamano5-36/+53
* jc/add-n-u: Make git add -n and git -u -n output consistent "git-add -n -u" should not add but just report Conflicts: builtin-add.c builtin-mv.c cache.h read-cache.c
2008-05-25Merge branch 'ar/t6031'Libravatar Junio C Hamano1-2/+5
* ar/t6031: Fix t6031 on filesystems without working exec bit
2008-05-25Merge branch 'db/clone-in-c'Libravatar Junio C Hamano19-119/+816
* db/clone-in-c: Add test for cloning with "--reference" repo being a subset of source repo Add a test for another combination of --reference Test that --reference actually suppresses fetching referenced objects clone: fall back to copying if hardlinking fails builtin-clone.c: Need to closedir() in copy_or_link_directory() builtin-clone: fix initial checkout Build in clone Provide API access to init_db() Add a function to set a non-default work tree Allow for having for_each_ref() list extra refs Have a constant extern refspec for "--tags" Add a library function to add an alternate to the alternates file Add a lockfile function to append to a file Mark the list of refs to fetch as const Conflicts: cache.h t/t5700-clone-reference.sh
2008-05-25Merge branch 'jc/apply-whitespace'Libravatar Junio C Hamano2-72/+139
* jc/apply-whitespace: builtin-apply: do not declare patch is creation when we do not know it builtin-apply: accept patch to an empty file builtin-apply: typofix
2008-05-25Merge branch 'jc/unpack-trees-reword'Libravatar Junio C Hamano3-14/+52
* jc/unpack-trees-reword: unpack-trees: allow Porcelain to give different error messages
2008-05-25Merge branch 'ar/batch-cat'Libravatar Junio C Hamano9-82/+781
* ar/batch-cat: change quoting in test t1006-cat-file.sh builtin-cat-file.c: use parse_options() git-svn: Speed up fetch Git.pm: Add hash_and_insert_object and cat_blob Git.pm: Add command_bidi_pipe and command_close_bidi_pipe git-hash-object: Add --stdin-paths option Add more tests for git hash-object Move git-hash-object tests from t5303 to t1007 git-cat-file: Add --batch option git-cat-file: Add --batch-check option git-cat-file: Make option parsing a little more flexible git-cat-file: Small refactor of cmd_cat_file Add tests for git cat-file
2008-05-25Merge branch 'cc/bisect'Libravatar Junio C Hamano2-61/+116
* cc/bisect: bisect: use a detached HEAD to bisect bisect: trap critical errors in "bisect_start" bisect: fix left over "BISECT_START" file when starting with junk rev bisect: add test cases to check that "git bisect start" is atomic
2008-05-25Merge branch 'ap/svn'Libravatar Junio C Hamano3-1/+93
* ap/svn: git-svn: add test for --add-author-from and --use-log-author git-svn: add documentation for --add-author-from option. git-svn: Add --add-author-from option. git-svn: add documentation for --use-log-author option.
2008-05-25Merge branch 'js/cvsexportcommit'Libravatar Junio C Hamano3-7/+55
* js/cvsexportcommit: cvsexportcommit: introduce -W for shared working trees (between Git and CVS) cvsexportcommit: chomp only removes trailing whitespace Conflicts: git-cvsexportcommit.perl
2008-05-25Merge branch 'js/ignore-submodule'Libravatar Junio C Hamano11-12/+132
* js/ignore-submodule: Ignore dirty submodule states during rebase and stash Teach update-index about --ignore-submodules diff options: Introduce --ignore-submodules
2008-05-25Merge branch 'mo/cvsserver'Libravatar Junio C Hamano4-69/+826
* mo/cvsserver: Documentation: Fix skipped section level git-cvsserver: add ability to guess -kb from contents implement gitcvs.usecrlfattr git-cvsserver: add mechanism for managing working tree and current directory
2008-05-25mailsplit: minor clean-up in read_line_with_nul()Libravatar Junio C Hamano1-4/+3
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepathsLibravatar Junio C Hamano4-21/+71
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25mailsplit and mailinfo: gracefully handle NUL charactersLibravatar Johannes Schindelin5-15/+46
The function fgets() has a big problem with NUL characters: it reads them, but nobody will know if the NUL comes from the file stream, or was appended at the end of the line. So implement a custom read_line_with_nul() function. Noticed by Tommy Thorn. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25http-push: remove remote locks on exit signalsLibravatar Clemens Buchacher1-0/+22
If locks are not cleaned up the repository is inaccessible for 10 minutes. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25Reset the signal being handledLibravatar Clemens Buchacher1-1/+1
This did not cause any problems, because remove_lock_file_on_signal is only registered for SIGINT. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25Make git-cvsimport remove ['s from tags, as bad_ref_char doesn't allow them.Libravatar Paul Oliver1-0/+1
Signed-off-by: Paul Oliver <puzza007@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24Documentation: convert tutorials to man pagesLibravatar Christian Couder7-24/+87
This patch renames the following documents and at the same time converts them to the man page format: cvs-migration.txt -> gitcvs-migration.txt tutorial.txt -> gittutorial.txt tutorial-2.txt -> gittutorial-2.txt These new man pages are put in section 7, and other documents that reference the above ones are change accordingly. [jc: with help from Nanako to clean things up] Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24CodingGuidelines: Add a note to avoid assignments inside if()Libravatar Miklos Vajna1-0/+2
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-24Remove redundant code, eliminate one static variableLibravatar Heikki Orsila1-27/+17
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Merge git://git.kernel.org/pub/scm/gitk/gitkLibravatar Junio C Hamano2-23/+29
* git://git.kernel.org/pub/scm/gitk/gitk: gitk: Fix bug introduced by "gitk: Fix "wrong # coordinates" error on reload" gitk: Fix bug where current row number display stops working gitk: Move es.po where it belongs gitk: Fix "wrong # coordinates" error on reload
2008-05-23Merge branch 'pb/push'Libravatar Junio C Hamano6-35/+116
* pb/push: add special "matching refs" refspec
2008-05-23Merge branch 'bc/repack'Libravatar Junio C Hamano7-34/+154
* bc/repack: Documentation/git-repack.txt: document new -A behaviour let pack-objects do the writing of unreachable objects as loose objects add a force_object_loose() function builtin-gc.c: deprecate --prune, it now really has no effect git-gc: always use -A when manually repacking repack: modify behavior of -A option to leave unreferenced objects unpacked Conflicts: builtin-pack-objects.c
2008-05-23Merge branch 'sp/ignorecase'Libravatar Junio C Hamano2-1/+36
* sp/ignorecase: t0050: Fix merge test on case sensitive file systems t0050: Add test for case insensitive add t0050: Set core.ignorecase case to activate case insensitivity t0050: Test autodetect core.ignorecase git-init: autodetect core.ignorecase
2008-05-23Merge branch 'maint'Libravatar Junio C Hamano4-11/+18
* maint: rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref Add missing "short" alternative to --date in rev-list-options.txt git-show.txt: Not very stubby these days. Clarify repack -n documentation
2008-05-23Add log.date config variableLibravatar Heikki Orsila3-1/+18
log.date config variable sets the default date-time mode for the log command. Setting log.date value is similar to using git log's --date option. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Merge branch 'maint-1.5.4' into maintLibravatar Junio C Hamano1-6/+12
* maint-1.5.4: rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a ref
2008-05-23rev-parse --symbolic-full-name: don't print '^' if SHA1 is not a refLibravatar Johannes Sixt1-6/+12
The intention of --symbolic-full-name is to not print anything if a revision is not an exact ref. But this command: $ git-rev-parse --symbolic-full-name --not master~1 still emitted a sole '^' to stdout (provided that there's no other ref at master~1). This fixes it. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Make git add -n and git -u -n output consistentLibravatar Gustaf Hendeby1-15/+5
Output format from "git add -n $path" lists path to blobs that are going to be added on a single line, separated with SP. On the other hand, the suggested "git add -u -n" shows one path per line, like "add '<file>'\n". Of course, these two are inconsistent. Plain "git add -n" can afford to only say names of paths, as all it does is to add (update). However, "git add -u" needs to be able to express "remove" somehow. So if we need to have them formatted the same way, we need to unify with the "git add -n -u" format. Incidentally, this is consistent with how 'update-index' says it. This changes the output from "git add -n $paths" but as a general principle, output from Porcelain commands is a fair game for improvements and not for script consumption. Signed-off-by: Gustaf Hendeby <hendeby@isy.liu.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23change quoting in test t1006-cat-file.shLibravatar Michele Ballabio1-3/+3
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23builtin-cat-file.c: use parse_options()Libravatar Michele Ballabio1-73/+46
This simplifies the option parsing. Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23git-svn: Speed up fetchLibravatar Adam Roben1-22/+20
We were spending a lot of time forking/execing git-cat-file and git-hash-object. We now maintain a global Git repository object in order to use Git.pm's more efficient hash_and_insert_object and cat_blob methods. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Git.pm: Add hash_and_insert_object and cat_blobLibravatar Adam Roben1-2/+150
These functions are more efficient ways of executing `git hash-object -w` and `git cat-file blob` when you are dealing with many files/objects. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Git.pm: Add command_bidi_pipe and command_close_bidi_pipeLibravatar Adam Roben1-0/+56
command_bidi_pipe hands back the stdin and stdout file handles from the executed command. command_close_bidi_pipe closes these handles and terminates the process. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23git-hash-object: Add --stdin-paths optionLibravatar Adam Roben3-2/+80
This allows multiple paths to be specified on stdin. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Add more tests for git hash-objectLibravatar Adam Roben1-27/+93
Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-23Move git-hash-object tests from t5303 to t1007Libravatar Adam Roben1-0/+0
This is a more appropriate location according to t/README. Signed-off-by: Adam Roben <aroben@apple.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Updated status to show 'Not currently on any branch' in redLibravatar Chris Parsons3-5/+13
This provides additional warning to users when attempting to commit to a detached HEAD. It is configurable in color.status.nobranch. Signed-off-by: Chris Parsons <chris@edendevelopment.co.uk> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Add test for cloning with "--reference" repo being a subset of source repoLibravatar Johan Herland1-0/+5
The first test in this series tests "git clone -l -s --reference B A C", where repo B is a superset of repo A (A has one commit, B has the same commit plus another). In this case, all objects to be cloned are already present in B. However, we should also test the case where the "--reference" repo is a _subset_ of the source repo (e.g. "git clone -l -s --reference A B C"), i.e. some objects are not available in the "--reference" repo, and will have to be found in the source repo. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Add a test for another combination of --referenceLibravatar Johan Herland1-0/+21
In this case, the reference repository has some useful loose objects, but not all useful objects, and we make sure that we can find the objects we fetch from the repository we're cloning in the new repository, instead of potentially being distracted by the reference repository. Doing the wrong thing in a builtin-clone implementation would lead to this looking for an object in the wrong place, not finding it (because it's only in the right place), and crashing. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Test that --reference actually suppresses fetching referenced objectsLibravatar Daniel Barkalow1-1/+8
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Add missing "short" alternative to --date in rev-list-options.txtLibravatar Heikki Orsila1-1/+1
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22git-show.txt: Not very stubby these days.Libravatar Jon Loeliger1-2/+0
Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22Clarify repack -n documentationLibravatar Shawn O. Pearce1-2/+5
While repacking a local repository a coworker thought the -n option was necessary to git-repack to keep it from updating some unknown file on the central server we all share. Explaining further what the option is (not) doing helps to make it clear the option does not impact any remote repositories the user may have configured. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22pull --rebase: exit early when the working directory is dirtyLibravatar Johannes Schindelin2-0/+23
When rebasing fails during "pull --rebase", you cannot just clean up the working directory and call "pull --rebase" again, since the remote branch was already fetched. Therefore, die early when the working directory is dirty. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22gitweb: Convert string to internal form before chopping in chop_strLibravatar Anders Waldenborg1-0/+4
Fix chop_str not to cut in middle of utf8 multibyte chars. Without this fix at least author name in short log may cut in middle of a multibyte char. When the result comes to esc_html to_utf8 is called again, which doesn't find valid utf8 and decodes using $fallback_encoding making it even worse. This also have the nice side effect that it actually tries to show the first 10 _characters_, not the number of characters that happened to fit into 10 bytes. Signed-off-by: Anders Waldenborg <anders@0x63.nu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22bisect: use a detached HEAD to bisectLibravatar Christian Couder2-47/+45
When "git bisect" was first written, it was not possible to checkout a detached HEAD. The detached feature appeared latter. That's why before this patch the "git bisect" process used a "bisect" branch to checkout new revisions to be tested (and also a "new-bisect" one to check if the checkouts could work). This patch makes "git bisect" checkout revisions to be tested on a detached HEAD. This simplifies the code a bit. The tests to check that "git bisect" does not start if a "bisect" or a "new-bisect" branch exists are removed as they are not relevant any more. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22bisect: trap critical errors in "bisect_start"Libravatar Christian Couder2-12/+28
Before this patch, when using "git bisect start" with mistaken revs or when the checkout of the branch we want to test failed, we exited after having written files like ".git/BISECT_START", ".git/BISECT_NAMES" and after having written "refs/bisect/bad" and "refs/bisect/good-*" refs. With this patch we trap all errors that can happen when writing the new state and when we are in "bisect_next". So that we can try to clean up everything in case of problems, using "bisect_clean_state". This patch also contains a "bisect_write" cleanup to make it exit on error and return 0 otherwise. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-22bisect: fix left over "BISECT_START" file when starting with junk revLibravatar Christian Couder2-10/+8
Before this patch, when using for example: $ git bisect start <stuff1> <stuff2> with <stuff1> or <stuff2> that cannot be parsed as a revision, we could leave a ".git/BISECT_START" file, from a previous "git bisect start", alone. This patch makes sure that it does not happen by removing the "BISECT_START" file in "bisect_clean_state" and then always writing it again at the end of "bisect_start". Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>