summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-08-09am: Document new --exclude=<path> optionmaximilian attems
The --exclude=<path> option is passed down to apply; document it as such. Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-09bisect: add support for bisecting bare repositoriesJon Seymour
This enhances the support for bisecting history in bare repositories. The "git bisect" command no longer needs to be run inside a repository with a working tree; it defaults to --no-checkout when run in a bare repository. Two tests are included to demonstrate this behaviour. Suggested-by: Junio C Hamano <gitster@pobox.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08helping smart-http/stateless-rpc fetch raceJunio C Hamano
A request to fetch from a client over smart HTTP protocol is served in multiple steps. In the first round, the server side shows the set of refs it has and their values, and the client picks from them and sends "I want to fetch the history leading to these commits". When the server tries to respond to this second request, its refs may have progressed by a push from elsewhere. By design, we do not allow fetching objects that are not at the tip of an advertised ref, and the server rejects such a request. The client needs to try again, which is not ideal especially for a busy server. Teach upload-pack (which is the workhorse driven by git-daemon and smart http server interface) that it is OK for a smart-http client to ask for commits that are not at the tip of any advertised ref, as long as they are reachable from advertised refs. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08xdiff/xhistogram: drop need for additional variableTay Ray Chuan
Having an additional variable (ptr) instead of changing line(1|2) and count(1|2) was for debugging purposes. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08xdiff/xhistogram: rely on xdl_trim_ends()Tay Ray Chuan
Do away with reduce_common_start_end() and use xdf->dstart and xdf->dend set by xdl_trim_ends() that similarly tells us where the first unmatched line from the start and end occurs. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08xdiff/xhistogram: rework handling of recursed resultsTay Ray Chuan
Previously we were over-complicating matters by trying to combine the recursed results. Now, terminate immediately if a recursive call failed and return its result. Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Merge branch 'oa/pull-reflog'Junio C Hamano
* oa/pull-reflog: pull: remove extra space from reflog message Conflicts: git-pull.sh
2011-08-08Merge branch 'ms/reflog-show-is-default'Junio C Hamano
* ms/reflog-show-is-default: reflog: actually default to subcommand 'show'
2011-08-08Merge branch 'jl/submodule-status-summary-doc'Junio C Hamano
* jl/submodule-status-summary-doc: Documentation/submodule: add command references and update options
2011-08-08Merge branch 'jn/gitweb-config-list-case'Junio C Hamano
* jn/gitweb-config-list-case: gitweb: Git config keys are case insensitive, make config search too
2011-08-08Merge branch 'jl/submodule-update-quiet'Junio C Hamano
* jl/submodule-update-quiet: submodule: update and add must honor --quiet flag
2011-08-08Merge branch 'js/ls-tree-error'Junio C Hamano
* js/ls-tree-error: Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails. Add a test to check that git ls-tree sets non-zero exit code on error.
2011-08-08Merge branch 'jn/gitweb-system-config'Junio C Hamano
* jn/gitweb-system-config: gitweb: Introduce common system-wide settings for convenience
2011-08-08Merge branch 'jk/reset-reflog-message-fix'Junio C Hamano
* jk/reset-reflog-message-fix: reset: give better reflog messages
2011-08-08Merge branch 'jc/diff-index-refactor'Junio C Hamano
* jc/diff-index-refactor: diff-lib: refactor run_diff_index() and do_diff_cache() diff-lib: simplify do_diff_cache()
2011-08-08receive-pack: do not overstep command line argument arrayJunio C Hamano
Previous commit added one element to the command line, without making sure the result fits there. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Merge branch 'maint'Junio C Hamano
* maint: filter-branch: Export variable `workdir' for --commit-filter Documentation/Makefile: add *.pdf to `clean' target Documentation: ignore *.pdf files
2011-08-08filter-branch: Export variable `workdir' for --commit-filterMichael Witten
According to `git help filter-branch': --commit-filter <command> ... You can use the _map_ convenience function in this filter, and other convenience functions, too... ... However, it turns out that `map' hasn't been usable because it depends on the variable `workdir', which is not propogated to the environment of the shell that runs the commit-filter <command> because the shell is created via a simple-command rather than a compound-command subshell: @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" One solution is simply to export `workdir'. However, it seems rather heavy-handed to export `workdir' to the environments of all commands, so instead this commit exports `workdir' for only the duration of the shell command in question: workdir=$workdir @SHELL_PATH@ -c "$filter_commit" "git commit-tree" \ $(git write-tree) $parentstr < ../message > ../map/$commit || die "could not write rewritten commit" Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Documentation/Makefile: add *.pdf to `clean' targetEmilio G. Cota
user-manual.pdf is not removed by `make clean'; fix it. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-08Documentation: ignore *.pdf filesEmilio G. Cota
user-manual.pdf is generated by the build and therefore should be ignored by git. Signed-off-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05fast-export: quote paths in outputJeff King
Many pathnames in a fast-import stream need to be quoted. In particular: 1. Pathnames at the end of an "M" or "D" line need quoting if they contain a LF or start with double-quote. 2. Pathnames on a "C" or "R" line need quoting as above, but also if they contain spaces. For (1), we weren't quoting at all. For (2), we put double-quotes around the paths to handle spaces, but ignored the possibility that they would need further quoting. This patch checks whether each pathname needs c-style quoting, and uses it. This is slightly overkill for (1), which doesn't actually need to quote many characters that vanilla c-style quoting does. However, it shouldn't hurt, as any implementation needs to be ready to handle quoted strings anyway. In addition to adding a test, we have to tweak a test which blindly assumed that case (2) would always use double-quotes, whether it needed to or not. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05filter-branch.sh: de-dent usage stringJunio C Hamano
"Usage: git filter-branch " that is prefixed to the first line is 25 columns long, so the "[--index-filter ..." on the second line would not align with "[--env-filter ..." on the first line to begin with. If the second and subsequent lines do not aim to align with anything on the first line, it is just fine to indent them with a single HT. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05misc-sh: fix up whitespace in some other .sh files.Jon Seymour
I found that the patched 4 files were different when this filter is applied. expand -i | unexpand --first-only This patch contains the corrected files. Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05Merge branch 'tc/minix'Junio C Hamano
* tc/minix: Makefile: add Minix configuration options.
2011-08-05Merge branch 'jc/pack-order-tweak'Junio C Hamano
* jc/pack-order-tweak: pack-objects: optimize "recency order" core: log offset pack data accesses happened
2011-08-05bisect: further style nitpicksJunio C Hamano
Fix a few remaining lines that indented with spaces. Also simplify the logic of checking out the original branch and reporting error during "bisect reset". Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05bisect: replace "; then" with "\n<tab>*then"Jon Seymour
Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-05bisect: cleanup whitespace errors in git-bisect.sh.Jon Seymour
All leading whitespace is now encoded with tabs. After this patch, the following is true: RAW=$(cat git-bisect.sh | md5sum) && ROUNDTRIP=$(cat git-bisect.sh | expand -i - | unexpand --first-only - | md5sum) && LEADING=$(sed -n "/^ */p" < git-bisect.sh | wc -l) && test $RAW = $ROUNDTRIP && test $LEADING = 0 && test -z "$(git diff -w HEAD~1 HEAD)" Signed-off-by: Jon Seymour <jon.seymour@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04test-path-utils: Add subcommand "prefix_path"Michael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04test-path-utils: Add subcommand "absolute_path"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: Normalize pathsMichael Haggerty
Normalize the path arguments (relative to the working tree root, if applicable) before looking up their attributes. This requires passing the prefix down the call chain. This fixes two test cases for different reasons: * "unnormalized paths" is fixed because the .gitattribute-file-seeking code is not confused into reading the top-level file twice. * "relative paths" is fixed because the canonical pathnames are passed to get_check_attr() or get_all_attrs(), allowing them to match the pathname patterns as expected. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Demonstrate problems with relative pathsMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: Demonstrate problems with unnormalized pathsMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-08-04git-check-attr: test that no output is written to stderrMichael Haggerty
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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>