Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-10-31add throughput display to git-pushNicolas Pitre
This one triggers only when git-pack-objects is called with --all-progress and --stdout which is the combination used by git-push. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31add some copyright notice to the progress display codeNicolas Pitre
Some self patting on the back to keep my ego alive. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31add throughput display to index-packNicolas Pitre
... and call it "Receiving objects" when over stdin to look clearer to end users. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31add throughput to progress displayNicolas Pitre
This adds the ability for the progress code to also display transfer throughput when that makes sense. The math was inspired by commit c548cf4ee0737a321ffe94f6a97c65baf87281be from Linus. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31relax usage of the progress APINicolas Pitre
Since it is now OK to pass a null pointer to display_progress() and stop_progress() resulting in a no-op, then we can simplify the code and remove a bunch of lines by not making those calls conditional all the time. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31make struct progress an opaque typeNicolas Pitre
This allows for better management of progress "object" existence, as well as making the progress display implementation more independent from its callers. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-31prune-packed: don't call display_progress() for every fileNicolas Pitre
The progress count is per fanout directory, so it is useless to call it for every file as the count doesn't change that often. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30Documentation/git-cvsexportcommit.txt: s/mgs/msg/ in exampleMichael W. Olson
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30gitweb: Fix and simplify "split patch" detectionJakub Narebski
There are some cases when one line from "raw" git-diff output (raw format) corresponds to more than one patch in the patchset git-diff output; we call this situation "split patch". Old code misdetected subsequent patches (for different files) with the same pre-image and post-image as fragments of "split patch", leading to mislabeled from-file/to-file diff header etc. Old code used pre-image and post-image SHA-1 identifier ('from_id' and 'to_id') to check if current patch corresponds to old raw diff format line, to find if one difftree raw line coresponds to more than one patch in the patch format. Now we use post-image filename for that. This assumes that post-image filename alone can be used to identify difftree raw line. In the case this changes (which is unlikely considering current diff engine) we can add 'from_id' and 'to_id' to detect "patch splitting" together with 'to_file'. Because old code got pre-image and post-image SHA-1 identifier for the patch from the "index" line in extended diff header, diff header had to be buffered. New code takes post-image filename from "git diff" header, which is first line of a patch; this allows to simplify git_patchset_body code. A side effect of resigning diff header buffering is that there is always "diff extended_header" div, even if extended diff header is empty. Alternate solution would be to check when git splits patches, and do not check if parsed info from current patch corresponds to current or next raw diff format output line. Git splits patches only for 'T' (typechange) status filepair, and there always two patches corresponding to one raw diff line. It was not used because it would tie gitweb code to minute details of git diff output. While at it, use newly introduced parsed_difftree_line wrapper subroutine in git_difftree_body. Noticed-by: Yann Dirson <ydirson@altern.org> Diagnosed-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30git-sh-setup.sh: use "git rev-parse --show-cdup" to check for SUBDIRECTORY_OKNguyễn Thái Ngọc Duy
"git rev-parse --git-dir" trick does not play well with worktree Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30Make builtin-pack-refs.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-name-rev.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-count-objects.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-fsck.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Update manpages to reflect new short and long option aliasesJonas Fonseca
Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-for-each-ref.c use parse-opts.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-symbolic-ref.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-update-ref.c use parse_optionsPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-revert.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-describe.c use parse_optionsPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-branch.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-mv.c use parse-optionsPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Make builtin-rm.c use parse_options.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Port builtin-add.c to use the new option parser.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30parse-options: allow callbacks to take no arguments at all.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30parse-options: Allow abbreviated options when unambiguousJohannes Schindelin
When there is an option "--amend", the option parser now recognizes "--am" for that option, provided that there is no other option beginning with "--am". Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Add shortcuts for very often used options.Pierre Habouzit
It helps with consistency of the help strings, for example. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30parse-options: make some arguments optional, add callbacks.Pierre Habouzit
* add the possibility to use callbacks to parse some options, this can help implementing new options kinds with great flexibility. struct option gains a callback pointer and a `defval' where callbacks user can put either integers or pointers. callbacks also can use the `value' pointer for anything, preferably to the pointer to the final storage for the value though. * add a `flag' member to struct option to make explicit that this option may have an optional argument. The semantics depends on the option type. For INTEGERS, it means that if the switch is not used in its --long-form=<value> form, and that there is no token after it or that the token does not starts with a digit, then it's assumed that the switch has no argument. For STRING or CALLBACK it works the same, except that the condition is that the next atom starts with a dash. This is needed to implement backward compatible behaviour with existing ways to parse the command line. Its use for new options is discouraged. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Rework make_usage to print the usage message immediatelyAlex Riesen
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Add tests for parse-options.cJohannes Schindelin
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30parse-options: be able to generate usages automaticallyPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30Add a simple option parser.Pierre Habouzit
The option parser takes argc, argv, an array of struct option and a usage string. Each of the struct option elements in the array describes a valid option, its type and a pointer to the location where the value is written. The entry point is parse_options(), which scans through the given argv, and matches each option there against the list of valid options. During the scan, argv is rewritten to only contain the non-option command line arguments and the number of these is returned. Aggregation of single switches is allowed: -rC0 is the same as -r -C 0 (supposing that -C wants an arg). Every long option automatically support the option with the same name, prefixed with 'no-' to unset the switch. It assumes that initial value for strings are "NULL" and for integers is "0". Long options are supported either with '=' or without: --some-option=foo is the same as --some-option foo Acked-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-10-30shell should call the new setup_path() to setup $PATHScott R Parish
Shell currently does its own manual thing for setting up the $PATH; it can now call setup_path(). Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30include $PATH in generating list of commands for "help -a"Scott R Parish
Git had previously been using the $PATH for scripts--a previous patch moved exec'ed commands to also use the $PATH. For consistency "help -a" should also list commands in the $PATH. The main commands are still listed from the git_exec_path(), but the $PATH is walked and other git commands (probably extensions) are listed. Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30use only the $PATH for exec'ing git commandsScott R Parish
We need to correctly set up $PATH for non-c based git commands. Since we already do this, we can just use that $PATH and execvp, instead of looping over the paths with execve. This patch adds a setup_path() function to exec_cmd.c, which sets the $PATH order correctly for our search order. execv_git_cmd() is stripped down to setting up argv and calling execvp(). git.c's main() only only needs to call setup_path(). Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30list_commands(): simplify code by using chdir()Scott R Parish
The current code builds absolute path strings for each file to stat(), this can easily be avoided by chdir()ing into the directory. Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30"current_exec_path" is a misleading name, use "argv_exec_path"Scott R Parish
Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30remove unused/unneeded "pattern" argument of list_commandsScott R Parish
list_commands() currently accepts and ignores a "pattern" argument, and then hard codes a prefix as well as some magic numbers. This hardcodes the prefix inside of the function and removes the magic numbers. Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30"git" returns 1; "git help" and "git help -a" return 0Scott R Parish
Signed-off-by: Scott R Parish <srp@srparish.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30Correct handling of upload-pack in builtin-fetch-packDaniel Barkalow
The field in the args was being ignored in favor of a static constant Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Thanked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-30Speedup scanning for excluded files.Lars Knoll
Try to avoid a lot of work scanning for excluded files, by caching some more information when setting up the exclusion data structure. Speeds up 'git runstatus' on a repository containing the Qt sources by 30% and reduces the amount of instructions executed (as measured by valgrind) by a factor of 2. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29RelNotes-1.5.4: describe recent updatesJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29Teach git-pull about --[no-]ff, --no-squash and --commitLars Hjemli
These options are supported by git-merge, but git-pull didn't know about them. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29Bisect: add "skip" to the short usage string.Christian Couder
Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29Merge branch 'maint'Junio C Hamano
* maint: RelNotes-1.5.3.5: describe recent fixes merge-recursive.c: mrtree in merge() is not used before set sha1_file.c: avoid gcc signed overflow warnings Fix a small memory leak in builtin-add honor the http.sslVerify option in shell scripts
2007-10-29Remove outdated references to cogito in documentationDan McGee
Signed-off-by: Dan McGee <dpmcgee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29RelNotes-1.5.3.5: describe recent fixesJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29merge-recursive.c: mrtree in merge() is not used before setJunio C Hamano
The called function merge_trees() sets its *result, to which the address of the variable mrtree in merge() function is passed, only when index_only is set. But that is Ok as the function uses the value in the variable only under index_only iteration. However, recent gcc does not realize this. Work it around by adding a fake initializer. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29sha1_file.c: avoid gcc signed overflow warningsJunio C Hamano
With the recent gcc, we get: sha1_file.c: In check_packed_git_: sha1_file.c:527: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false sha1_file.c:527: warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false for a piece of code that tries to make sure that off_t is large enough to hold more than 2^32 offset. The test tried to make sure these do not wrap-around: /* make sure we can deal with large pack offsets */ off_t x = 0x7fffffffUL, y = 0xffffffffUL; if (x > (x + 1) || y > (y + 1)) { but gcc assumes it can do whatever optimization it wants for a signed overflow (undefined behaviour) and warns about this construct. Follow Linus's suggestion to check sizeof(off_t) instead to work around the problem. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-10-29core-tutorial: Catch up with current GitBenoit Sigoure
No longer talk about Cogito since it's deprecated. Some scripts (such as git-reset or git-branch) have undergone builtinification so adjust the text to reflect this. Fix a typo in the description of git-show-branch (merges are indicated by a `-', not by a `.'). git-pull/git-push do not seem to use the dumb git-ssh-fetch/git-ssh-upload (the text was probably missing a word). Adjust a link that wasn't rendered properly because it was wrapped. Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>