summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-09-22Use dashless git commands in setgitperms.perlTodd Zullinger
Signed-off-by: Todd Zullinger <tmz@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-22git-remote: do not use user input in a printf format stringJohannes Sixt
'git remote show' substituted the remote name into a string that was later used as a printf format string. If a remote name contains a printf format specifier like this: $ git remote add foo%sbar . then the command $ git remote show foo%sbar would print garbage (if you are lucky) or crash. This fixes it. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-22make "git remote" report multiple URLsMichael J Gruber
This patch makes "git remote -v" and "git remote show" report multiple URLs rather than warn about them. Multiple URLs are OK for pushing into multiple repos simultaneously. Without "-v" each repo is shown once only. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20diff hunk pattern: fix misconverted "\{" tex macro introducersJunio C Hamano
Pointed out by Brandon Casey. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20diff: use extended regexp to find hunk headersJunio C Hamano
Using ERE elements such as "|" (alternation) by backquoting in BRE is a GNU extension and should not be done in portable programs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20Start draft release notes for 1.6.0.3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20git-repack uses --no-repack-object, not --no-repack-delta.Mikael Magnusson
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20Typo "bogos" in format-patch error message.Mikael Magnusson
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20builtin-clone: fix typoFabrizio Chiarello
Signed-off-by: Fabrizio Chiarello <ponch@autistici.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20Bust the ghost of long-defunct diffcore-pathspec.Yann Dirson
This concept was retired by 77882f6 (Retire diffcore-pathspec., 2006-04-10), more than 2 years ago. Signed-off-by: Yann Dirson <ydirson@altern.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-20completion: git commit should list --interactiveEric Raible
Signed-off-by: Eric Raible <raible@gmail.com> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19diff.*.xfuncname which uses "extended" regex's for hunk header selectionBrandon Casey
Currently, the hunk headers produced by 'diff -p' are customizable by setting the diff.*.funcname option in the config file. The 'funcname' option takes a basic regular expression. This functionality was designed using the GNU regex library which, by default, allows using backslashed versions of some extended regular expression operators, even in Basic Regular Expression mode. For example, the following characters, when backslashed, are interpreted according to the extended regular expression rules: ?, +, and |. As such, the builtin funcname patterns were created using some extended regular expression operators. Other platforms which adhere more strictly to the POSIX spec do not interpret the backslashed extended RE operators in Basic Regular Expression mode. This causes the pattern matching for the builtin funcname patterns to fail on those platforms. Introduce a new option 'xfuncname' which uses extended regular expressions, and advertise it _instead_ of funcname. Since most users are on GNU platforms, the majority of funcname patterns are created and tested there. Advertising only xfuncname should help to avoid the creation of non-portable patterns which work with GNU regex but not elsewhere. Additionally, the extended regular expressions may be less ugly and complicated compared to the basic RE since many common special operators do not need to be backslashed. For example, the GNU Basic RE: ^[ ]*\\(\\(public\\|static\\).*\\)$ becomes the following Extended RE: ^[ ]*((public|static).*)$ Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19diff.c: associate a flag with each pattern and use it for compiling regexBrandon Casey
This is in preparation for allowing extended regular expression patterns. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19diff.c: return pattern entry pointer rather than just the hunk header patternBrandon Casey
This is in preparation for associating a flag with each pattern which will control how the pattern is interpreted. For example, as a basic or extended regular expression. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19Merge branch 'dp/maint-rebase-fix' into maintJunio C Hamano
* dp/maint-rebase-fix: git-rebase--interactive: auto amend only edited commit git-rebase-interactive: do not squash commits on abort
2008-09-19Merge branch 'jc/maint-checkout-keep-remove' into maintJunio C Hamano
* jc/maint-checkout-keep-remove: checkout: do not lose staged removal
2008-09-19Merge branch 'jc/maint-diff-quiet' into maintJunio C Hamano
* jc/maint-diff-quiet: diff --quiet: make it synonym to --exit-code >/dev/null diff Porcelain: do not disable auto index refreshing on -C -C
2008-09-19Merge branch 'jc/maint-name-hash-clear' into maintJunio C Hamano
* jc/maint-name-hash-clear: discard_cache: reset lazy name_hash bit
2008-09-19Merge branch 'jc/maint-template-permbits' into maintJunio C Hamano
* jc/maint-template-permbits: Fix permission bits on sources checked out with an overtight umask
2008-09-19Merge branch 'mh/maint-honor-no-ssl-verify' into maintJunio C Hamano
* mh/maint-honor-no-ssl-verify: Don't verify host name in SSL certs when GIT_SSL_NO_VERIFY is set
2008-09-19sha1_file: link() returns -1 on failure, not errnoThomas Rast
5723fe7 (Avoid cross-directory renames and linking on object creation, 2008-06-14) changed the call to use link() directly instead of through a custom wrapper, but forgot that it returns 0 or -1, not 0 or errno. Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19Make git archive respect core.autocrlf when creating zip format archivesCharles Bailey
There is currently no call to git_config at the start of cmd_archive. When creating tar archives the core config is read as a side-effect of reading the tar specific config, but this doesn't happen for zip archives. The consequence is that in a configuration with core.autocrlf set, although files in a tar archive are created with crlf line endings, files in a zip archive retain unix line endings. Signed-off-by: Charles Bailey <charles@hashpling.org> Acked-by: René Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19Add new test to demonstrate git archive core.autocrlf inconsistencyCharles Bailey
Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19gitweb: avoid warnings for commits without bodyJoey Hess
In the unusual case when there is no commit message, gitweb would output an uninitialized value warning. Signed-off-by: Joey Hess <joey@kitenet.net> Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19Clarified gitattributes documentation regarding custom hunk header.Garry Dolley
The only part of the hunk header that we can change is the "TEXT" portion. Additionally, a few grammatical errors have been corrected. Signed-off-by: Garry Dolley <gdolley@ucla.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19git-svn: fix handling of even funkier branch namesEric Wong
Apparently do_switch() tolerates the lack of escaping in less funky branch names. For the really strange and scary ones, we need to escape them properly. It strangely maintains compatible with the existing handling of branch names with spaces and exclamation marks. Reported-by: m.skoric@web.de ($gmane/94677) Signed-off-by: Eric Wong <normalperson@yhbt.net>
2008-09-19git-svn: Always create a new RA when calling do_switch for svn://Alec Berryman
Not doing so caused the "Malformed network data" error when a directoy was deleted and replaced with a copy from an older version. Signed-off-by: Alec Berryman <alec@thened.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-19git-svn: factor out svnserve test code for later useAlec Berryman
Signed-off-by: Alec Berryman <alec@thened.net> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-18diff/diff-files: do not use --cc too aggressivelyJunio C Hamano
Textual diff output for unmerged paths was too eager to give condensed combined diff. Even though "diff -c" (and "diff-files -c -p") is a request to view combined diff without condensing (otherwise the user would have explicitly asked for --cc, not -c), we showed "--cc" output anyway. 0fe7c1d (built-in diff: assorted updates, 2006-04-29) claimed to be careful about doing this, but its breakage was hidden because back then "git diff" was still a shell script that did not use the codepath it introduced fully. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-16Cosmetical command name fixHeikki Orsila
If we came from git.c the first arg would be "archive". "git-archive" isn't a bug because cmd_archive() doesn't check the first arg. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-16Start conforming code to "git subcmd" style part 3Heikki Orsila
User notifications are presented as 'git cmd', and code comments are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'. Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-16t9700/test.pl: remove File::Temp requirementBrandon Casey
The object oriented version of File::Temp is a rather new incarnation it seems. The File::Temp man page for v5.8.0 says "(NOT YET IMPLEMENTED)" in the 'Objects' section. Instead of creating a file with a unique name in the system TMPDIR, we can create our own temporary file with a static name and use that instead. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-16t9700/test.pl: avoid bareword 'STDERR' in 3-argument open()Brandon Casey
Some versions of perl complain when 'STDERR' is used as the third argument in the 3-argument form of open(). Convert to the 2-argument form which is described for duping STDERR in my second edition camel book. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> on RHEL 3, Perl 5.8.0 Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-12GIT 1.6.0.2v1.6.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-12Merge branch 'ho/maint-dashless' into maintJunio C Hamano
* ho/maint-dashless: Start conforming code to "git subcmd" style part 2
2008-09-12Fix some manual typos.Ralf Wildenhues
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-11Use compatibility regex library also on FreeBSDJeff King
Commit 3632cfc24 makes the same change for Darwin; however, the problem also exists on FreeBSD. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-11Use compatibility regex library also on AIXJohannes Sixt
This augments 3632cfc24 (Use compatibility regex library on Darwin, 2008-09-07), which already carries a "Tested-by" statement for AIX, but that test was actually done with this patch included. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Tested-by: Mike Ralphson <mike@abacus.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10Update draft release notes for 1.6.0.2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10Use compatibility regex library for OSX/DarwinArjen Laarhoven
The standard libc regex library on OSX does not support alternation in POSIX Basic Regular Expression mode. This breaks the diff.funcname functionality on OSX. To fix this, we use the GNU regex library which is already present in the compat/ diretory for the MinGW port. However, simply adding compat/ to the COMPAT_CFLAGS variable causes a conflict between the system fnmatch.h and the one present in compat/. To remedy this, move the regex and fnmatch functionality to their own subdirectories in compat/ so they can be included seperately. Signed-off-by: Arjen Laarhoven <arjen@yaph.org> Tested-by: Mike Ralphson <mike@abacus.co.uk> (AIX) Tested-by: Johannes Sixt <johannes.sixt@telecom.at> (MinGW) Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10git-svn: Fixes my() parameter list syntax error in pre-5.8 PerlMarcus Griep
Signed-off-by: Marcus Griep <marcus@griep.us> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10Git.pm: Use File::Temp->tempfile instead of ->newMarcus Griep
Perl 5.8.0 ships with File::Temp 0.13, which does not have the new() interface introduced in 0.14, as pointed out by Tom G. Christensen. This modifies Git.pm to use the more established tempfile() interface and updates 'git svn' to match. Signed-off-by: Marcus Griep <marcus@griep.us> Acked-by: Eric Wong <normalperson@yhbt.net> Tested-by: Tom G. Christensen <tgc@statsbiblioteket.dk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10t7501: always use test_cmp instead of diffMiklos Vajna
This should make the output more readable (by default using diff -u) when some tests fail. Also changed the diff order from "current expected" to "expected current". Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-10Merge branch 'jc/maint-log-grep' into maintJunio C Hamano
* jc/maint-log-grep: log --author/--committer: really match only with name part
2008-09-10Merge branch 'jc/maint-hide-cr-in-diff-from-less' into maintJunio C Hamano
* jc/maint-hide-cr-in-diff-from-less: diff: Help "less" hide ^M from the output
2008-09-10Merge branch 'jc/maint-checkout-fix' into maintJunio C Hamano
* jc/maint-checkout-fix: checkout: do not check out unmerged higher stages randomly
2008-09-10Merge branch 'np/maint-safer-pack' into maintJunio C Hamano
* np/maint-safer-pack: fixup_pack_header_footer(): use nicely aligned buffer sizes index-pack: use fixup_pack_header_footer()'s validation mode pack-objects: use fixup_pack_header_footer()'s validation mode improve reliability of fixup_pack_header_footer() pack-objects: improve returned information from write_one()
2008-09-10checkout: do not lose staged removalJunio C Hamano
The logic to checkout a different commit implements the safety to never lose user's local changes. For example, switching from a commit to another commit, when you have changed a path that is different between them, need to merge your changes to the version from the switched-to commit, which you may not necessarily be able to resolve easily. By default, "git checkout" refused to switch branches, to give you a chance to stash your local changes (or use "-m" to merge, accepting the risks of getting conflicts). This safety, however, had one deliberate hole since early June 2005. When your local change was to remove a path (and optionally to stage that removal), the command checked out the path from the switched-to commit nevertheless. This was to allow an initial checkout to happen smoothly (e.g. an initial checkout is done by starting with an empty index and switching from the commit at the HEAD to the same commit). We can tighten the rule slightly to allow this special case to pass, without losing sight of removal explicitly done by the user, by noticing if the index is truly empty when the operation begins. For historical background, see: http://thread.gmane.org/gmane.comp.version-control.git/4641/focus=4646 This case is marked as *0* in the message, which both Linus and I said "it feels somewhat wrong but otherwise we cannot start from an empty index". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-09Fix permission bits on sources checked out with an overtight umaskJunio C Hamano
Two patches 9907721 (templates/Makefile: don't depend on local umask setting, 2008-02-28) and 96cda0b (templates/Makefile: install is unnecessary, just use mkdir -p, 2008-08-21) tried to prevent an overtight umask the builder/installer might have from screwing over the installation procedure, but we forgot there was another source of trouble. If the person who checked out the source tree had an overtight umask, it will leak out to the built products, which is propagated to the installation destination. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-09-09git-rebase--interactive: auto amend only edited commitDmitry Potapov
"git rebase --continue" issued after git rebase being stop by "edit" command is trying to amend the last commit using stage changes. However, if the last commit is not the commit that was marked as "edit" then it can produce unexpected results. For instance, after being stop by "edit", I have made some changes to commit message using "git commit --amend". After that I realized that I forgot to add some changes to some file. So, I said "git add file" and the "git rebase --continue". Unfortunately, it caused that the new commit message was lost. Another problem is that after being stopped at "edit", the user adds new commits. In this case, automatic amend behavior of git rebase triggered by some stage changes causes that not only that the log message of the last commit is lost but that it will contain also wrong Author and Date information. Therefore, this patch restrict automatic amend only to the situation where HEAD is the commit at which git rebase stop by "edit" command. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>