summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-03-09Make 'traverse_tree()' use linked structure rather than 'const char *base'Libravatar Linus Torvalds3-28/+78
This makes the calling convention a bit less obvious, but a lot more flexible. Instead of allocating and extending a new 'base' string, we just link the top-most name into a linked list of the 'info' structure when traversing a subdirectory, and we can generate the basename by following the list. Perhaps even more importantly, the linked list of info structures also gives us a place to naturally save off other information than just the directory name. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-09Add 'df_name_compare()' helper functionLibravatar Linus Torvalds2-0/+36
This new helper is identical to base_name_compare(), except it compares conflicting directory/file entries as equal in order to help handling DF conflicts (thus the name). Note that while a directory name compares as equal to a regular file with the new helper, they then individually compare _differently_ to a filename that has a dot after the basename (because '\0' < '.' < '/'). So a directory called "foo/" will compare equal to a file "foo", even though "foo.c" will compare after "foo" and before "foo/" This will be used by routines that want to traverse the git namespace but then handle conflicting entries together when possible. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08Add a test for read-tree -u --reset with a D/F conflictLibravatar Jeff King1-0/+30
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08Merge branch 'ph/parseopt'Libravatar Junio C Hamano6-23/+68
* ph/parseopt: parse-options: new option type to treat an option-like parameter as an argument. parse-opt: bring PARSE_OPT_HIDDEN and NONEG to git-rev-parse --parseopt
2008-03-08Merge branch 'dp/clean-fix'Libravatar Junio C Hamano11-94/+123
* dp/clean-fix: git-clean: add tests for relative path git-clean: correct printing relative path Make private quote_path() in wt-status.c available as quote_path_relative() Revert part of d089eba (setup: sanitize absolute and funny paths in get_pathspec()) Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes) Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files) get_pathspec(): die when an out-of-tree path is given
2008-03-08Merge branch 'ml/submodule-add-existing'Libravatar Junio C Hamano2-22/+33
* ml/submodule-add-existing: git-submodule - Allow adding a submodule in-place
2008-03-08Merge branch 'mr/compat-snprintf'Libravatar Junio C Hamano5-0/+92
* mr/compat-snprintf: Add compat/snprintf.c for systems that return bogus
2008-03-08Merge branch 'sp/fetch-optim'Libravatar Junio C Hamano11-24/+338
* sp/fetch-optim: Teach git-fetch to exploit server side automatic tag following Teach fetch-pack/upload-pack about --include-tag git-pack-objects: Automatically pack annotated tags if object was packed Teach git-fetch to grab a tag at the same time as a commit Make git-fetch follow tags we already have objects for sooner Teach upload-pack to log the received need lines to an fd Free the path_lists used to find non-local tags in git-fetch Allow builtin-fetch's find_non_local_tags to append onto a list Ensure tail pointer gets setup correctly when we fetch HEAD only Remove unnecessary delaying of free_refs(ref_map) in builtin-fetch Remove unused variable in builtin-fetch find_non_local_tags
2008-03-08Merge branch 'jc/describe-always'Libravatar Junio C Hamano2-32/+44
* jc/describe-always: describe --always: fall back to showing an abbreviated object name
2008-03-08Merge branch 'jc/am'Libravatar Junio C Hamano5-16/+118
* jc/am: am: --rebasing am: remove support for -d .dotest am: read from the right mailbox when started from a subdirectory
2008-03-08Merge branch 'cr/reset-parseopt'Libravatar Junio C Hamano1-27/+20
* cr/reset-parseopt: Make builtin-reset.c use parse_options.
2008-03-08Merge branch 'jn/gitweb-pickaxe'Libravatar Junio C Hamano1-42/+43
* jn/gitweb-pickaxe: gitweb: Fix and simplify pickaxe search
2008-03-08Merge branch 'kb/maint-filter-branch-disappear'Libravatar Junio C Hamano2-1/+34
* kb/maint-filter-branch-disappear: filter-branch: handle "disappearing tree" case correctly in subdir filter
2008-03-08Merge branch 'maint' to sync with 1.5.4.4Libravatar Junio C Hamano7-14/+39
* maint: GIT 1.5.4.4 ident.c: reword error message when the user name cannot be determined Fix dcommit, rebase when rewriteRoot is in use Really make the LF after reset in fast-import optional
2008-03-08GIT 1.5.4.4Libravatar Junio C Hamano2-7/+27
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08ident.c: reword error message when the user name cannot be determinedLibravatar Santi Béjar1-1/+1
The "config --global" suggested in the message is a valid one-shot fix, and hopefully one-shot across machines that NFS mounts the home directories. This knowledge can hopefully be reused when you are forced to use git on Windows, but the fix based on GECOS would not be applicable, so it is not such a useful hint to mention the exact reason why the name cannot be determined. Signed-off-by: Santi Béjar <sbejar@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08Fix dcommit, rebase when rewriteRoot is in useLibravatar John Goerzen1-1/+6
When the rewriteRoot setting is used with git-svn, it causes the svn IDs added to commit messages to bear a different URL than is actually used to retrieve Subversion data. It is common for Subversion repositories to be available multiple ways: for instance, HTTP to the public, and svn+ssh to people with commit access. The need to switch URLs for access is fairly common as well -- perhaps someone was just given commit access. To switch URLs without having to rewrite history, one can use the old url as a rewriteRoot, and use the new one in the svn-remote url setting. This works well for svn fetching and general git commands. However, git-svn dcommit, rebase, and perhaps other commands do not work in this scenario. They scan the svn ID lines in commit messages and attempt to match them up with url lines in [svn-remote] sections in the git config. This patch allows them to match rewriteRoot options, if such options are present. Signed-off-by: John Goerzen <jgoerzen@complete.org> Acked-by: Eric Wong <normalperson@yhbt.net>
2008-03-08filter-branch: handle "disappearing tree" case correctly in subdir filterLibravatar Junio C Hamano2-1/+34
The subdirectory filter had a bug to notice that the commit in question did not have anything in the path-limited part of the tree. $commit:$path does not name an empty tree when $path does not appear in $commit. This should fix it. The additional test in t7003 is originally from Kevin Ballard but with fixups. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08merge-tool documentation: describe custom command usageLibravatar Charles Bailey1-0/+22
The configuration variables for custom merge tools were documented only in config.txt but there was no reference to the functionality in git-mergetool.txt. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08git-mergetool documentaiton: show toolnames in typewriter fontLibravatar Charles Bailey1-8/+8
Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08Really make the LF after reset in fast-import optionalLibravatar Adeodato Simó2-1/+4
cmd_from() ends with a call to read_next_command(), which is needed when using cmd_from() from commands where from is not the last element. With reset, however, "from" is the last command, after which the flow returns to the main loop, which calls read_next_command() again. Because of this, always set unread_command_buf in cmd_reset_branch(), even if cmd_from() was successful. Add a test case for this in t9300-fast-import.sh. Signed-off-by: Adeodato Simó <dato@net.com.org.es> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-08Merge branch 'aw/maint-shortlog-blank-lines'Libravatar Junio C Hamano1-2/+3
* aw/maint-shortlog-blank-lines: shortlog: take the first populated line of the description
2008-03-08Merge branch 'mh/maint-http-proxy-fix' into maintLibravatar Junio C Hamano7-12/+22
* mh/maint-http-proxy-fix: Set proxy override with http_init()
2008-03-08Merge branch 'js/maint-daemon' into maintLibravatar Junio C Hamano1-5/+13
* js/maint-daemon: daemon: ensure that base-path is an existing directory daemon: send more error messages to the syslog
2008-03-08Merge branch 'js/maint-cvsexport' into maintLibravatar Junio C Hamano2-8/+67
* js/maint-cvsexport: cvsexportcommit: be graceful when "cvs status" reorders the arguments Conflicts: t/t9200-git-cvsexportcommit.sh
2008-03-08Merge branch 'jc/maint-log-merge-left-right' into maintLibravatar Junio C Hamano1-8/+4
* jc/maint-log-merge-left-right: Fix "git log --merge --left-right"
2008-03-08Merge branch 'ew/maint-svn-cert-fileprovider' into maintLibravatar Junio C Hamano1-0/+1
* ew/maint-svn-cert-fileprovider: git-svn: Don't prompt for client cert password everytime.
2008-03-07Merge branch 'maint'Libravatar Junio C Hamano4-12/+27
* maint: unquote_c_style: fix off-by-one. test-lib: fix TERM to dumb for test repeatability config.txt: refer to --upload-pack and --receive-pack instead of --exec git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-07send-email: --no-signed-off-cc should suppress 'sob' ccLibravatar Junio C Hamano1-1/+2
The logic to countermand suppression of Cc to the signers with a more explicit --signed-off-by option done in 6564828 (git-send-email: Generalize auto-cc recipient mechanism) suffers from a double-negation error. A --signed-off-cc option, when false, should actively suppress CC: to be generated out of S-o-b lines, and it should refrain from suppressing when it is true. It also fixes "(sob) Adding cc:" status output; earlier it included the line terminator LF inside '%s', which was totally bogus. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07Merge branch 'js/reflog-delete'Libravatar Junio C Hamano8-7/+245
* js/reflog-delete: t3903-stash.sh: Add tests for new stash commands drop and pop git-reflog.txt: Document new commands --updateref and --rewrite t3903-stash.sh: Add missing '&&' to body of testcase git-stash: add new 'pop' subcommand git-stash: add new 'drop' subcommand git-reflog: add option --updateref to write the last reflog sha1 into the ref refs.c: make close_ref() and commit_ref() non-static git-reflog: add option --rewrite to update reflog entries while expiring reflog-delete: parse standard reflog options builtin-reflog.c: fix typo that accesses an unset variable Teach "git reflog" a subcommand to delete single entries
2008-03-07Merge branch 'dc/format-pretty'Libravatar Junio C Hamano8-9/+21
* dc/format-pretty: log/show/whatchanged: introduce format.pretty configuration specify explicit "--pretty=medium" with `git log/show/whatchanged` whatchanged documentation: share description of --pretty with others
2008-03-07Merge branch 'cb/mergetool'Libravatar Junio C Hamano3-76/+162
* cb/mergetool: Add a very basic test script for git mergetool Teach git mergetool to use custom commands defined at config time Changed an internal variable of mergetool to support custom commands Tidy up git mergetool's backup file behaviour
2008-03-07git-clean: add tests for relative pathLibravatar Junio C Hamano1-0/+52
This adds tests for recent change by Dmitry to fix the report "git clean" gives on removed paths, and also makes sure the command detects paths that is outside working tree. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07git-clean: correct printing relative pathLibravatar Dmitry Potapov1-18/+14
When the given path contains '..' then git-clean incorrectly printed names of files. This patch changes cmd_clean to use quote_path_relative(). Also, "failed to remove ..." message used absolutely path, but not it is corrected to use relative path. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07Make private quote_path() in wt-status.c available as quote_path_relative()Libravatar Dmitry Potapov3-45/+48
Move quote_path() from wt-status.c to quote.c and rename it as quote_path_relative(), because it is a better name for a public function. Also, instead of handcrafted quoting, quote_c_style_counted() is now used, to make its quoting more consistent with the rest of the system, also honoring core.quotepath specified in configuration. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07unquote_c_style: fix off-by-one.Libravatar Pierre Habouzit1-1/+1
The optional endp parameter to unquote_c_style() was supposed to point at a location past the closing double quote, but it was going one beyond it. git-fast-import used this function heavily and the bug caused it to misparse the input stream, especially when parsing a rename command: R "filename that needs quoting" rename-target-name Because the function erroneously ate the whitespace after the closing dq, this triggered "Missing space after source" error when it shouldn't. Thanks to Adeodato Simò for having caught this. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07test-lib: fix TERM to dumb for test repeatabilityLibravatar Junio C Hamano1-7/+17
Dscho noticed that Term::ReadLine (used by send-email) colorized its output for his TERM settings, inside t9001 tests. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07config.txt: refer to --upload-pack and --receive-pack instead of --execLibravatar Uwe Kleine-König1-4/+4
The options --upload-pack (of git-fetch-pack) and --receive-pack (of git-push) do the same as --exec (for both commands). But the former options have the more descriptive name. Signed-off-by: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07Merge branch 'ar/sgid-bsd'Libravatar Junio C Hamano3-1/+11
* ar/sgid-bsd: Do not use GUID on dir in git init --shared=all on FreeBSD
2008-03-07Merge branch 'cc/run-command'Libravatar Junio C Hamano2-10/+11
* cc/run-command: run-command: Redirect stderr to a pipe before redirecting stdout to stderr
2008-03-07Revert part of d089eba (setup: sanitize absolute and funny paths in ↵Libravatar Junio C Hamano1-10/+1
get_pathspec()) When get_pathspec() was originally made absolute-path capable, we botched the interface to it, without dying inside the function when given a path that is outside the work tree, and made it the responsibility of callers to check the condition in a roundabout way. This is made unnecessary with the previous patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07Revert part of 1abf095 (git-add: adjust to the get_pathspec() changes)Libravatar Junio C Hamano1-12/+0
When get_pathspec() was originally made absolute-path capable, we botched the interface to it, without dying inside the function when given a path that is outside the work tree, and made it the responsibility of callers to check the condition in a roundabout way. This is made unnecessary with the previous patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07Revert part of 744dacd (builtin-mv: minimum fix to avoid losing files)Libravatar Junio C Hamano1-5/+1
When get_pathspec() was originally made absolute-path capable, we botched the interface to it, without dying inside the function when given a path that is outside the work tree, and made it the responsibility of callers to check the condition in a roundabout way. This is made unnecessary with the previous patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-07get_pathspec(): die when an out-of-tree path is givenLibravatar Junio C Hamano3-4/+7
An earlier commit d089ebaa (setup: sanitize absolute and funny paths) made get_pathspec() aware of absolute paths, but with a botched interface that forced the callers to count the resulting pathspecs in order to detect an error of giving a path that is outside the work tree. This fixes it, by dying inside the function. We had ls-tree test that relied on a misfeature in the original implementation of its pathspec handling. Leading slashes were silently removed from them. However we allow giving absolute pathnames (people want to cut and paste from elsewhere) that are inside work tree these days, so a pathspec that begin with slash _should_ be treated as a full path. The test is adjusted to match the updated rule for get_pathspec(). Earlier I mistook three tests given by Robin that they should succeed, but these are attempts to add path outside work tree, which should fail loudly. These tests also have been fixed. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-06Merge branch 'maint' of git://repo.or.cz/git-gui into maintLibravatar Junio C Hamano1-0/+5
* 'maint' of git://repo.or.cz/git-gui: git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
2008-03-05gitweb: Fix and simplify pickaxe searchLibravatar Jakub Narebski1-42/+43
Instead of using "git-rev-list | git-diff-tree" pipeline for pickaxe search, use git-log with appropriate options. Besides reducing number of forks by one, this allows to use list form of open, which in turn allow to not worry about quoting arguments and to avoid forking shell. The options to git-log were chosen to reduce required changes in pickaxe git command output parsing; gitweb still parses returned commits one by one. Parsing "pickaxe" output is simplified: git_search now reuses parse_difftree_raw_line and writes affected files as they arrive using the fact that commit name goes always before [raw] diff. While at it long bug of pickaxe search was fixed, namely that the last commit found by pickaxe search was never shown. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05git-submodule - Allow adding a submodule in-placeLibravatar Mark Levedahl2-22/+33
When working in the top-level project, it is useful to create a new submodule as a git repo in a subdirectory, then add that submodule to the top-level in place. This patch allows "git submodule add <intended url> subdir" to add the existing subdir to the current project. The presumption is the user will later push / clone the subdir to the <intended url> so that future submodule init / updates will work. Absent this patch, "git submodule add" insists upon cloning the subdir from a repository at the given url, which is fine for adding an existing project in, but less useful when adding a new submodule from scratch to an existing project. The former functionality remains, and the clone is attempted if the subdir does not already exist as a valid git repo. Signed-off-by: Mark Levedahl <mlevedahl@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05shortlog: take the first populated line of the descriptionLibravatar Andy Whitcroft1-2/+3
Way back the perl version of shortlog would take the first populated line of the commit body. The builtin version mearly takes the first line. This leads to empty shortlog entries when there is some viable text in the commit. Reinstate this behaviour igoring all lines with nothing but whitespace. This is often useful when dealing with commits imported from foreign SCMs that do not tidy up the log message of useless blank lines at the beginning. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05Add compat/snprintf.c for systems that return bogusLibravatar Michal Rokos5-0/+92
Some systems (namely HPUX and Windows) return -1 when maxsize in snprintf() and in vsnprintf() is reached. So replace snprintf() and vsnprintf() functions with our own ones that return correct value upon overflow. [jc: verified that review comments by J6t have been incorporated, and tightened the check to verify the resulting buffer contents, suggested by Wayne Davison] Signed-off-by: Michal Rokos <michal.rokos@nextsoft.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-03-05Do not use GUID on dir in git init --shared=all on FreeBSDLibravatar Alex Riesen3-1/+11
It does not allow changing the bit to a non-root user. This fixes t1301-shared-repo.sh on the platform. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>