summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2008-08-05bash completion: Add completion for 'git clone'Libravatar Lee Marlow1-0/+26
Add completions for all long options specified in the docs --local --no-hardlinks --shared --reference --quiet --no-checkout --bare --mirror --origin --upload-pack --template= --depth Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05t9119: conditionally re-enable test depending on svn(1) versionLibravatar Eric Wong1-29/+40
I've tested this with svn 1.4.4 This also adds quoting to make it work odd characters in the trash path. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05Fix race condition in t9119-git-svn-info.shLibravatar David D. Kilzer1-4/+11
Changed the ptouch bash function to use the "Text Last Updated" date reported by 'svn info' when changing the modified time (mtime) of the file/symlink/directory in the git working directory. Previously it used the mtime of the item in the svn working directory, which caused the race condition. [ew: swapped argument order of ptouch() to minimize diff] From: David D. Kilzer <ddkilzer@kilzer.net> Signed-off-by: David D. Kilzer <ddkilzer@kilzer.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05git-svn: properly set path for "info" commandLibravatar Eric Wong1-2/+6
canonicalize_path() was previously changed to better fit SVN 1.5, but it makes the "info" command not match svn(1) in two places: 1) URL ended up with a trailing slash when run without an argument. 2) "Path: " was displayed instead of "Path: ." when run without an argument. We will also handle odd cases where a user wants to get information on a file or directory named "0", too. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05Documentation: typos / spelling fixesLibravatar Mike Ralphson7-9/+9
Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05Merge branch 'maint'Libravatar Junio C Hamano7-11/+25
* maint: RelNotes 1.5.6.5 updates diff.renamelimit is a basic diff configuration git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout. Documentation: typos / spelling fixes in older RelNotes
2008-08-05RelNotes 1.5.6.5 updatesLibravatar Junio C Hamano1-0/+13
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05diff.renamelimit is a basic diff configurationLibravatar Linus Torvalds1-4/+5
The configuration was added as a core option in 3299c6f (diff: make default rename detection limit configurable., 2005-11-15), but 9ce392f (Move diff.renamelimit out of default configuration., 2005-11-21) separated diff-related stuff out of the core. Up to that point it was Ok. When we separated the Porcelain options out of the git_diff_config in 83ad63c (diff: do not use configuration magic at the core-level, 2006-07-08), we should have been more careful. This mistake made diff-tree plumbing and git-show Porcelain to notice different set of renames when the user explicitly asked for rename detection. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05git-cvsimport.perl: Print "UNKNOWN LINE..." on stderr, not stdout.Libravatar Jim Meyering1-1/+1
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-05Documentation: typos / spelling fixes in older RelNotesLibravatar Mike Ralphson4-6/+6
Signed-off-by: Mike Ralphson <mike@abacus.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04correct access right for git-svn-dcommit testLibravatar Dmitry Potapov1-0/+1
The tests requires anonymous write access. Therefore, "anon-access = write" is added to conf/svnserve.conf. But because it was added to the end of the file, it is impossible to guarantee in what section it will be located. It turned out that on SVN 1.5, it was placed in the wrong section and as result the test failed. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Tested-by: Brad King <brad.king@kitware.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04Fix typos in INSTALLLibravatar Abhijit Menon-Sen1-2/+2
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04Fix typo in perl/Git.pmLibravatar Abhijit Menon-Sen1-1/+1
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04Fix hash slice syntax errorLibravatar Abhijit Menon-Sen1-4/+4
Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04Git.pm: localise $? in command_close_bidi_pipe()Libravatar Abhijit Menon-Sen1-0/+1
Git::DESTROY calls _close_cat_blob and _close_hash_and_insert_object, which in turn call command_close_bidi_pipe, which calls waitpid, which alters $?. If this happens during global destruction, it may alter the program's exit status unexpectedly. Making $? local to the function solves the problem. (The problem was discovered due to a failure of test #8 in t9106-git-svn-commit-diff-clobber.sh.) Signed-off-by: Abhijit Menon-Sen <ams@toroid.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04bash completion: Add completion for 'git grep'Libravatar Lee Marlow1-0/+24
Add completions for all long options specified in the docs --cached --text --ignore-case --word-regexp --invert-match --full-name --extended-regexp --basic-regexp --fixed-strings --files-with-matches --name-only --files-without-match --count --and --or --not --all-match Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-04Add output flushing before fork()Libravatar Anders Melchiorsen2-7/+7
This adds fflush(NULL) before fork() in start_command(), to keep the generic interface safe. A remaining use of fork() with no flushing is in a comment in show_tree(). Rewrite that comment to use start_command(). Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03git-svn: Abort with an error if 'fetch' parameter is invalid.Libravatar Avery Pennarun1-2/+6
Previously, if a config entry looked like this: svn-remote.svn.fetch=:refs/heads/whatever git-svn would silently do nothing if you asked it to "git svn fetch", and give a strange error if asked to "git svn dcommit". What it really wants is a line that looks like this: svn-remote.svn.fetch=:refs/remotes/whatever So we should simply abort if we get the wrong thing. On the other hand, there's actually no good reason for git-svn to enforce using the refs/remotes namespace, but the code seems to have hardcoded this in several places and I'm not brave enough to try to fix it all right now. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03Flush output in start_asyncLibravatar Anders Melchiorsen2-0/+9
This prevents double output in case stdout is redirected. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03Modify mingw_main() workaround to avoid link errorsLibravatar Steffen Prohaska1-2/+3
With MinGW's gcc.exe (GCC) 3.4.5 (mingw special) GNU ld version 2.17.50 20060824 the old define caused link errors: git.o: In function `main': C:/msysgit/git/git.c:500: undefined reference to `mingw_main' collect2: ld returned 1 exit status The modified define works. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Acked-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03Merge branch 'maint'Libravatar Junio C Hamano1-7/+5
* maint: git-name-rev: don't use printf without format
2008-08-03clone --bare: Add ".git" suffix to the directory name to clone intoLibravatar Johannes Schindelin2-2/+15
We have a tradition that bare repositories live in directories ending in ".git". To make this more a convention than just a tradition, teach "git clone --bare" to add a ".git" suffix to the directory name. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-03git-name-rev: don't use printf without formatLibravatar René Scharfe1-7/+5
printf() without an explicit format string is not a good coding practise, unless the printed string is guaranteed to not contain percent signs. While fixing this, we might as well combine the calls to fwrite() and printf(). Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02diff: chapter and part in funcname for texLibravatar Giuseppe Bilotta1-1/+1
This patch enhances the tex funcname by adding support for chapter and part sectioning commands. It also matches the starred version of the sectioning commands. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02Teach "git diff -p" Pascal/Delphi funcname patternLibravatar Avery Pennarun1-0/+6
Finds classes, records, functions, procedures, and sections. Most lines need to start at the first column, or else there's no way to differentiate a procedure's definition from its declaration. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02diff: add ruby funcname patternLibravatar Giuseppe Bilotta1-0/+1
Provide a regexp that catches class, module and method definitions in Ruby scripts, since the built-in default only finds classes. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02Fix reference to Everyday Git, which is an HTML document and not a man page.Libravatar Jon Jensen1-1/+1
Signed-off-by: Jon Jensen <jon@endpoint.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02bash completion: Add more long options for 'git log'Libravatar Lee Marlow1-0/+1
Options added: --parents --children --full-history Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02bash completion: remove unused function _git_diff_treeLibravatar Lee Marlow1-5/+0
completion for git diff-tree was removed in 5cfb4fe Signed-off-by: Lee Marlow <lee.marlow@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02clone: Add an option to set up a mirrorLibravatar Johannes Schindelin4-6/+37
The command line $ git clone --mirror $URL is now a short-hand for $ git clone --bare $URL $ (cd $(basename $URL) && git remote add --mirror origin $URL) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02Merge branch 'maint'Libravatar Junio C Hamano2-39/+47
* maint: git-name-rev: allow --name-only in combination with --stdin builtin-name-rev.c: split deeply nested part from the main function Conflicts: Documentation/git-name-rev.txt
2008-08-02git-name-rev: allow --name-only in combination with --stdinLibravatar Pieter de Bie2-4/+8
Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-02builtin-name-rev.c: split deeply nested part from the main functionLibravatar Junio C Hamano1-37/+41
The main function of this command implementation tries to do too many things. Split out a handling of single input line into a separate function to reduce nesting level and clutter. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Merge branch 'maint'Libravatar Junio C Hamano2-1/+20
2008-08-01Start 1.5.6.5 RelNotes to describe accumulated fixesLibravatar Junio C Hamano2-1/+20
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Make git-add -i accept ranges like 7-Libravatar Ciaran McCreesh2-5/+6
git-add -i ranges expect number-number. But for the supremely lazy, typing in that second number when selecting "from patch 7 to the end" is wasted effort. So treat an empty second number in a range as "until the last item". Signed-off-by: Ciaran McCreesh <ciaran.mccreesh@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Update my e-mail addressLibravatar Junio C Hamano43-43/+43
The old cox.net address is still getting mails from gitters. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01git-diff(1): "--c" -> "--cc" typo fixLibravatar Jonathan Nieder1-1/+1
git diff does not take a --c option. Signed-off-by: Jonathan Nieder <jrnieder@uchicago.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01git-submodule: move ill placed shift.Libravatar Pierre Habouzit1-1/+1
When running git submodule update -i, the "-i" is shifted before recursing into cmd_init and then again outside of the loop. This causes some /bin/sh to complain about shifting when there are no arguments left (and would discard anything written after -i too). Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01t/t4202-log.sh: add newline at end of fileLibravatar Brandon Casey1-1/+2
Some shells hang when parsing the script if the last statement is not followed by a newline. So add one. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01sort_in_topological_order(): avoid setting a commit flagLibravatar Johannes Schindelin3-8/+65
We used to set the TOPOSORT flag of commits during the topological sorting, but we can just as well use the member "indegree" for it: indegree is now incremented by 1 in the cases where the commit used to have the TOPOSORT flag. This is the same behavior as before, since indegree could not be non-zero when TOPOSORT was unset. Incidentally, this fixes the bug in show-branch where the 8th column was not shown: show-branch sorts the commits in topological order, assuming that all the commit flags are available for show-branch's private matters. But this was not true: TOPOSORT was identical to the flag corresponding to the 8th ref. So the flags for the 8th column were unset by the topological sorting. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Documentation: clarify diff --ccLibravatar Junio C Hamano2-8/+8
The definition of an "uninteresting" hunk was not in line with reality. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Propagate -u/--upload-pack option of "git clone" to transport.Libravatar Steve Haslam2-0/+30
The -u option to override the remote system's path to git-upload-pack was being ignored by "git clone"; caused by a missing call to transport_set_option to set TRANS_OPT_UPLOADPACK. Presumably this crept in when git-clone was converted from shell to C. Signed-off-by: Steve Haslam <shaslam@lastminute.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01Documentation: fix diff.external exampleLibravatar Anders Melchiorsen2-5/+7
The diff.external examples pass a flag to gnu-diff, but GNU diff does not follow the GIT_EXTERNAL_DIFF interface. Signed-off-by: Anders Melchiorsen <mail@cup.kalibalik.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01make sure parsed wildcard refspec ends with slashLibravatar Junio C Hamano2-18/+64
A wildcard refspec is internally parsed into a refspec structure with src and dst strings. Many parts of the code assumed that these do not include the trailing "/*" when matching the wildcard pattern with an actual ref we see at the remote. What this meant was that we needed to make sure not just that the prefix matched, and also that a slash followed the part that matched. But a codepath that scans the result from ls-remote and finds matching refs forgot to check the "matching part must be followed by a slash" rule. This resulted in "refs/heads/b1" from the remote side to mistakenly match the source side of "refs/heads/b/*:refs/remotes/b/*" refspec. Worse, the refspec crafted internally by "git-clone", and a hardcoded preparsed refspec that is used to implement "git-fetch --tags", violated this "parsed widcard refspec does not end with slash" rule; simply adding the "matching part must be followed by a slash" rule then would have broken codepaths that use these refspecs. This commit changes the rule to require a trailing slash to parsed wildcard refspecs. IOW, "refs/heads/b/*:refs/remotes/b/*" is parsed as src = "refs/heads/b/" and dst = "refs/remotes/b/". This allows us to simplify the matching logic because we only need to do a prefixcmp() to notice "refs/heads/b/one" matches and "refs/heads/b1" does not. Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01init: handle empty "template" parameterLibravatar Jeff King2-0/+28
If a user passes "--template=", then our template parameter is blank. Unfortunately, copy_templates() assumes it has at least one character, and does all sorts of bad things like reading from template[-1] and then proceeding to link all of '/' into the .git directory. This patch just checks for that condition in copy_templates and aborts. As a side effect, this means that --template= now has the meaning "don't copy any templates." Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-08-01builtin-revert.c: typofixLibravatar Stephan Beyer1-1/+1
Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-31Allow "non-option" revision options in parse_option-enabled commandsLibravatar Pierre Habouzit1-1/+1
Commands which use parse_options() but also call setup_revisions() must do their parsing in a two step process: 1. first, they parse all options. Anything unknown goes to parse_revision_opt() (which calls handle_revision_opt), which may claim the option or say "I don't recognize this" 2. the non-option remainder goes to setup_revisions() to actually get turned into revisions Some revision options are "non-options" in that they must be parsed in order with their revision counterparts in setup_revisions(). For example, "--all" functions as a pseudo-option expanding to all refs, and "--no-walk" affects refs after it on the command line, but not before. The revision option parser in step 1 recognizes such options and sets them aside for later parsing by setup_revisions(). However, the return value used from handle_revision_opt indicated "I didn't recognize this", which was wrong. It did, and it took appropriate action (even though that action was just deferring it for later parsing). Thus it should return "yes, I recognized this." Previously, these pseudo-options generated an error when used with parse_options parsers (currently just blame and shortlog). With this patch, they should work fine, enabling things like "git shortlog --all". Signed-off-by: Jeff King <peff@peff.net> Acked-By: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-31Teach --find-copies-harder to "git blame"Libravatar Junio C Hamano1-0/+4
It's equivalent to "-C -C" with the diff family. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-31Compact commit template messageLibravatar Jeff King2-13/+17
We recently let the user know explicitly that an empty commit message will abort the commit. However, this adds yet another line to the template; let's rephrase and re-wrap so that this fits back on two lines. This patch also makes the "fatal: empty commit message?" warning a bit less scary, since this is now a "feature" instead of an error. However, we retain the non-zero exit status to indicate to callers that nothing was committed. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>