summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-08-04Rename git_checkattr() to git_check_attr()Michael Haggerty
Suggested by: Junio Hamano <gitster@pobox.com> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Fix command-line handling to match docsMichael Haggerty
According to the git-check-attr synopsis, if the '--stdin' option is used then no pathnames are expected on the command line. Change the behavior to match this description; namely, if '--stdin' is used but not '--', then treat all command-line arguments as attribute names. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Drive two tests using the same raw dataMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Add an --all option to show all attributesMichael Haggerty
Add new usage patterns git check-attr [-a | --all] [--] pathname... git check-attr --stdin [-a | --all] < <list-of-paths> which display all attributes associated with the specified file(s). Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Error out if no pathnames are specifiedMichael Haggerty
If no pathnames are passed as command-line arguments and the --stdin option is not specified, fail with the error message "No file specified". Add tests of this behavior. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Process command-line args more systematicallyMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Handle each error separatelyMichael Haggerty
This will make the code easier to refactor. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Extract a function error_with_usage()Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Introduce a new variableMichael Haggerty
Avoid reusing variable "doubledash" to mean something other than the expected "position of a double-dash, if any". Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Extract a function output_attr()Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Allow querying all attributes on a fileMichael Haggerty
Add a function, git_all_attrs(), that reports on all attributes that are set on a path. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Remove redundant checkMichael Haggerty
bootstrap_attr_stack() also checks whether attr_stack is already set. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Remove redundant call to bootstrap_attr_stack()Michael Haggerty
prepare_attr_stack() does the same thing. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Extract a function collect_all_attrs()Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Teach prepare_attr_stack() to figure out dirlen itselfMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Use git_attr_name()Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Provide access to the name attribute of git_attrMichael Haggerty
It will be present in any likely future reimplementation, and its availability simplifies other code. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Add tests of command-line parsingMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Add missing "&&"Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Disallow the empty string as an attribute nameMichael Haggerty
Previously, it was possible to have a line like "file.txt =foo" in a .gitattribute file, after which an invocation like "git check-attr '' -- file.txt" would succeed. This patch disallows both constructs. Please note that any existing .gitattributes file that tries to set an empty attribute will now trigger the error message "error: : not a valid attribute name" whereas previously the nonsense was allowed through. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04Remove anachronism from commentMichael Haggerty
Setting attributes to arbitrary values ("attribute=value") is now supported, so it is no longer necessary for this comment to justify prohibiting '=' in an attribute name. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04doc: Correct git_attr() calls in example codeMichael Haggerty
Commit 7fb0eaa2 (2010-01-17) changed git_attr() to take a string instead of a string and a length. Update the documentation accordingly. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04doc: Add a link from gitattributes(5) to git-check-attr(1)Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-24Merge branch 'maint'Junio C Hamano
* maint: tests: print failed test numbers at the end of the test run
2011-07-24tests: print failed test numbers at the end of the test runJens Lehmann
On modern multi-core processors "make test" is often run in multiple jobs. If one of them fails the test run does stop, but the concurrently running tests finish their run. It is rather easy to find out which test failed by doing a "ls -d t/trash*". But that only works when you don't use the "-i" option to "make test" because you want to get an overview of all failing tests. In that case all thrash directories are deleted end and the information which tests failed is lost. If one or more tests failed, print a list of them before the test summary: failed test(s): t1000 t6500 fixed 0 success 7638 failed 3 broken 49 total 7723 This makes it possible to just run the test suite with -i and collect all failed test scripts at the end for further examination. Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22Update draft release notes to 1.7.7Junio C Hamano
The third batch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22Merge branch 'dc/stash-con-untracked'Junio C Hamano
* dc/stash-con-untracked: stash: Add --include-untracked option to stash and remove all untracked files Conflicts: git-stash.sh
2011-07-22Merge branch 'jk/tag-contains-ab'Junio C Hamano
* jk/tag-contains-ab: Revert clock-skew based attempt to optimize tag --contains traversal git skew: a tool to find how big a clock skew exists in the history default core.clockskew variable to one day limit "contains" traversals based on commit timestamp tag: speed up --contains calculation
2011-07-22Merge branch 'dz/connect-error-report'Junio C Hamano
* dz/connect-error-report: Do not log unless all connect() attempts fail
2011-07-22Merge branch 'mz/doc-rebase-abort'Junio C Hamano
* mz/doc-rebase-abort: rebase: clarify "restore the original branch"
2011-07-22Merge branch 'bw/log-all-ref-updates-doc'Junio C Hamano
* bw/log-all-ref-updates-doc: Documentation: clearly specify what refs are honored by core.logAllRefUpdates
2011-07-22Merge branch 'js/maint-add-path-stat-pwd'Junio C Hamano
* js/maint-add-path-stat-pwd: get_pwd_cwd(): Do not trust st_dev/st_ino blindly
2011-07-22Merge branch 'ms/help-unknown'Junio C Hamano
* ms/help-unknown: help_unknown_cmd: do not propose an "unknown" cmd
2011-07-22Merge branch 'mz/doc-synopsis-verse'Junio C Hamano
* mz/doc-synopsis-verse: Documentation: use [verse] for SYNOPSIS sections Conflicts: Documentation/git-mergetool--lib.txt
2011-07-22Merge branch 'jc/checkout-reflog-fix'Junio C Hamano
* jc/checkout-reflog-fix: checkout: do not write bogus reflog entry out
2011-07-22Merge branch 'jc/maint-mergetool-read-fix'Junio C Hamano
* jc/maint-mergetool-read-fix: mergetool: check return value from read
2011-07-22Merge branch 'jn/gitweb-search'Junio C Hamano
* jn/gitweb-search: gitweb: Make git_search_* subroutines render whole pages gitweb: Clean up code in git_search_* subroutines gitweb: Split body of git_search into subroutines gitweb: Check permissions first in git_search
2011-07-22Merge branch 'jl/submodule-add-relurl-wo-upstream'Junio C Hamano
* jl/submodule-add-relurl-wo-upstream: submodule add: clean up duplicated code submodule add: allow relative repository path even when no url is set submodule add: test failure when url is not configured in superproject Conflicts: git-submodule.sh
2011-07-22Merge branch 'maint'Junio C Hamano
* maint: doc/fast-import: clarify notemodify command Documentation: minor grammatical fix in rev-list-options.txt Documentation: git-filter-branch honors replacement refs remote-curl: Add a format check to parsing of info/refs git-config: Remove extra whitespaces
2011-07-22doc/fast-import: clarify notemodify commandDmitry Ivankov
The "notemodify" fast-import command was introduced in commit a8dd2e7 (fast-import: Add support for importing commit notes, 2009-10-09) The commit log has slightly different description than the added documentation. The latter is somewhat confusing. "notemodify" is a subcommand of "commit" command used to add a note for some commit. Does this note annotate the commit produced by the "commit" command or a commit given by it's committish parameter? Which notes tree does it write notes to? The exact meaning could be deduced with old description and some notes machinery knowledge. But let's make it more obvious. This command is used in a context like "commit refs/notes/test" to add or rewrite an annotation for a committish parameter. So the advised way to add notes in a fast-import stream is: 1) import some commits (optional) 2) prepare a "commit" to the notes tree: 2.1) choose notes ref, committer, log message, etc. 2.2) create annotations with "notemodify", where each can refer to a commit being annotated via a branch name, import mark reference, sha1 and other expressions specified in the Documentation. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Acked-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-22Documentation: minor grammatical fix in rev-list-options.txtJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-21Documentation: git-filter-branch honors replacement refsPeter Collingbourne
Make it clear that git-filter-branch will honor and make permanent replacement refs as well as grafts. Signed-off-by: Peter Collingbourne <peter@pcc.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-20remote-curl: Add a format check to parsing of info/refsJulian Phillips
When parsing info/refs, no checks were applied that the file was in the requried format. Since the file is read from a remote webserver, this isn't guarenteed to be true. Add a check that the file at least only contains lines that consist of 40 characters followed by a tab and then the ref name. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19git-config: Remove extra whitespacesPavan Kumar Sunkara
Remove extra whitespaces introduced by commits 01ebb9dc and fc1905bb Signed-off-by: Pavan Kumar Sunkara <pavan.sss1991@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19Update draft release notes to 1.7.7Junio C Hamano
The second batch of topics for this cycle are now in. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-07-19Merge branch 'jc/index-pack'Junio C Hamano
* jc/index-pack: verify-pack: use index-pack --verify index-pack: show histogram when emulating "verify-pack -v" index-pack: start learning to emulate "verify-pack -v" index-pack: a miniscule refactor index-pack --verify: read anomalous offsets from v2 idx file write_idx_file: need_large_offset() helper function index-pack: --verify write_idx_file: introduce a struct to hold idx customization options index-pack: group the delta-base array entries also by type Conflicts: builtin/verify-pack.c cache.h sha1_file.c
2011-07-19Merge branch 'jn/mime-type-with-params'Junio C Hamano
* jn/mime-type-with-params: gitweb: Serve */*+xml 'blob_plain' as text/plain with $prevent_xss gitweb: Serve text/* 'blob_plain' as text/plain with $prevent_xss
2011-07-19Merge branch 'jc/submodule-sync-no-auto-vivify'Junio C Hamano
* jc/submodule-sync-no-auto-vivify: submodule add: always initialize .git/config entry submodule sync: do not auto-vivify uninteresting submodule Conflicts: git-submodule.sh
2011-07-19Merge branch 'jk/archive-tar-filter'Junio C Hamano
* jk/archive-tar-filter: upload-archive: allow user to turn off filters archive: provide builtin .tar.gz filter archive: implement configurable tar filters archive: refactor file extension format-guessing archive: move file extension format-guessing lower archive: pass archiver struct to write_archive callback archive: refactor list of archive formats archive-tar: don't reload default config options archive: reorder option parsing and config reading
2011-07-19Merge branch 'jn/gitweb-split-header-html'Junio C Hamano
* jn/gitweb-split-header-html: gitweb: Refactor git_header_html