summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-11-06Migrate git-am.sh to use git-rev-parse --parseoptPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Migrate git-clone to use git-rev-parse --parseoptPierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Migrate git-clean.sh to use git-rev-parse --parseopt.Pierre Habouzit
Also minor consistency tweaks in how errors are caught. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseoptPierre Habouzit
If you set OPTIONS_SPEC, git-sh-setups uses git-rev-parse --parseopt automatically. It also diverts usage to re-exec $0 with the -h option as parse-options.c will catch that. If you need git-rev-parse --parseopt to keep the `--` the user may have passed to your command, set OPTIONS_KEEPDASHDASH to a non empty value in your script. Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.Pierre Habouzit
Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Merge branch 'maint'Junio C Hamano
* maint: Remove a couple of duplicated include grep with unmerged index git-daemon: fix remote port number in log entry git-svn: t9114: verify merge commit message in test git-svn: fix dcommit clobbering when committing a series of diffs
2007-11-06Fix comment in strbuf.h to use correct name strbuf_avail()Steffen Prohaska
Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Remove a couple of duplicated includeMarco Costalba
Signed-off-by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06grep with unmerged indexJunio C Hamano
We called flush_grep() every time we saw an unmerged entry in the index. If we happen to find an unmerged entry before we saw more than two paths, we incorrectly declared that the user had too many non-paths options in front. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06Merge branch 'gp/maint-diffdoc' into maintJunio C Hamano
* gp/maint-diffdoc: git-diff.txt: add section "output format" describing the diff formats
2007-11-06Some better parse-options documentation.Pierre Habouzit
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06git-daemon: fix remote port number in log entryGerrit Pape
The port number in struct sockaddr_in needs to be converted from network byte order to host byte order (on some architectures). Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-06gc: --prune prunes unreferenced objects.Junio C Hamano
Brandon Casey correctly points out that we repack with -A without --prune and with -a with --prune, so it is not just unreferenced loose objects that are pruned away when the option is given. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05t3502: Disambiguate between file and rev by adding --Brian Gernhardt
On a case insensitive file system, this test fails because git-diff doesn't know if it is asking for the file "A" or the tag "a". Adding "--" at the end of the ambiguous commands allows the test to finish properly. Signed-off-by: Brian Gernhardt <benji@silverinsanity.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05Add more tests for git-cleanShawn Bohrer
Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05Use parseopts in builtin-pushDaniel Barkalow
Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05git-svn: t9114: verify merge commit message in testEric Wong
It's possible that we end up with an incorrect commit message in this test after making changes to fix the clobber bug in dcommit. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05git-svn: fix dcommit clobbering when committing a series of diffsEric Wong
Our revision number sent to SVN is set to the last revision we committed if we've made any previous commits in a dcommit invocation. Although our SVN Editor code uses the delta of two (old) trees to generate information to send upstream, it'll still send complete resultant files upstream; even if the tree they're based against is out-of-date. The combination of sending a file that does not include the latest changes, but set with a revision number of a commit we just made will cause SVN to accept the resultant file even if it was generated against an old tree. More trouble was caused when fixing this because we were rebasing uncessarily at times. We used git-diff-tree to check the imported SVN revision against our HEAD, not the last tree we committed to SVN. The unnecessary rebasing caused merge commits upstream to SVN to fail. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-05Split off the pretty print stuff into its own fileJohannes Schindelin
The file commit.c got quite large, but it does not have to be: the code concerning pretty printing is pretty well contained. In fact, this commit just splits it off into pretty.c, leaving commit.c with just 672 lines. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04Fix an infinite loop in sq_quote_buf().Johannes Sixt
sq_quote_buf() treats single-quotes and exclamation marks specially, but it incorrectly parsed the input for single-quotes and backslashes. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04Merge branch 'jc/format-patch-encoding'Junio C Hamano
* jc/format-patch-encoding: test format-patch -s: make sure MIME content type is shown as needed format-patch -s: add MIME encoding header if signer's name requires so
2007-11-04Merge branch 'jc/revert-merge'Junio C Hamano
* jc/revert-merge: cherry-pick/revert -m: add tests revert/cherry-pick: work on merge commits as well Conflicts: builtin-revert.c
2007-11-04Merge branch 'ss/mailsplit'Junio C Hamano
* ss/mailsplit: Make mailsplit and mailinfo strip whitespace from the start of the input
2007-11-04Merge branch 'np/pack'Junio C Hamano
* np/pack: pack-objects: get rid of an ugly cast make the pack index version configurable Conflicts: builtin-pack-objects.c
2007-11-04Merge branch 'jn/gitweb'Junio C Hamano
* jn/gitweb: gitweb: Use config file for repository description and URLs gitweb: Read repo config using 'git config -z -l' gitweb: Add tests for overriding gitweb config with repo config gitweb: Use href(-replay=>1, action=>...) to generate alternate views gitweb: Use href(-replay=>1, page=>...) to generate pagination links gitweb: Easier adding/changing parameters to current URL gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb test gitweb: Add 'status_str' to parse_difftree_raw_line output gitweb: Always set 'from_file' and 'to_file' in parse_difftree_raw_line
2007-11-04Merge branch 'np/fetch'Junio C Hamano
* np/fetch: git-fetch: more terse fetch output
2007-11-04Merge branch 'maint'Junio C Hamano
* maint: RelNotes-1.5.3.5: fix typo Delay pager setup in git blame git-cvsimport: really convert underscores in branch names to dots with -u
2007-11-04git-reset: do not be confused if there is nothing to resetJohannes Schindelin
The purpose of the function update_index_from_diff() (which is the callback function we give do_diff_cache()) is to update those index entries which differ from the given commit. Since do_diff_cache() plays games with the in-memory index, this function discarded the cache and reread it. Then, back in the function read_from_tree() we wrote the index. Of course, this broke down when there were no changes and update_index_from_diff() was not called, and therefore the mangled index was not discarded. The solution is to move the index writing into the function update_index_from_diff(). Noticed by Björn Steinbrink. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04git-clone: honor "--" to end argument parsingHeikki Orsila
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
2007-11-04RelNotes-1.5.3.5: fix typoDavid D Kilzer
Signed-off-by: David D Kilzer <ddkilzer@kilzer.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04git-svn: sort the options in the --help message.Benoit Sigoure
"git svn <cmd> --help" gave options in the order they were found in a Perl hash, which meant "randomly" to humans. Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr> Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04builtin-fetch: Add "-q" as a synonym for "--quiet"Steven Grimm
"-q" is the very first option described in the git-fetch manpage, and it isn't supported. Signed-off-by: Steven Grimm <koreth@midwinter.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04Delay pager setup in git blameMike Hommey
This avoids to launch the pager when git blame fails for any reason. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04git-cvsimport: really convert underscores in branch names to dots with -uGerrit Pape
The documentation states for the -u option that underscores in tag and branch names are converted to dots, but this was actually implemented for the tag names only. Kurt Roeckx reported this through http://bugs.debian.org/446495 Signed-off-by: Gerrit Pape <pape@smarden.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-04errors: "strict subset" -> "ancestor"J. Bruce Fields
The term "ancestor" is a bit more intuitive (and more consistent with the documentation) than the term "strict subset". Also, remove superfluous "ref", capitalize, and add some carriage returns, changing: error: remote 'refs/heads/master' is not a strict subset of local ref 'refs/heads/master'. maybe you are not up-to-date and need to pull first? error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git' to: error: remote 'refs/heads/master' is not an ancestor of local 'refs/heads/master'. Maybe you are not up-to-date and need to pull first? error: failed to push to 'ssh://linux-nfs.org/~bfields/exports/git.git' Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03git-fetch: more terse fetch outputNicolas Pitre
This makes the fetch output much more terse and prettier on a 80 column display, based on a consensus reached on the mailing list. Here's an example output: Receiving objects: 100% (5439/5439), 1.60 MiB | 636 KiB/s, done. Resolving deltas: 100% (4604/4604), done. From git://git.kernel.org/pub/scm/git/git ! [rejected] html -> origin/html (non fast forward) 136e631..f45e867 maint -> origin/maint (fast forward) 9850e2e..44dd7e0 man -> origin/man (fast forward) 3e4bb08..e3d6d56 master -> origin/master (fast forward) fa3665c..536f64a next -> origin/next (fast forward) + 4f6d9d6...768326f pu -> origin/pu (forced update) * [new branch] todo -> origin/todo Some portions of this patch have been extracted from earlier proposals by Jeff King and Shawn Pearce. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03gitweb: Use config file for repository description and URLsJakub Narebski
Allow to use configuration variable gitweb.description for repository description if there is no $GIT_DIR/description file, and multivalued configuration variable gitweb.url for URLs of a project (to clone or fetch from) if there is no $GIT_DIR/cloneurl file. While repository description is shown in the projects list page, so it is better to use file and not config variable for performance, it is I think better to use gitweb.url for URLs (as it is shown only on project summary page). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03gitweb: Read repo config using 'git config -z -l'Jakub Narebski
Change git_get_project_config to run git-config only once per repository, without changing its signature (its calling convention). This means for example that it returns 'true' or 'false' when called with second argument '--bool', and not true or false value. Instead of calling 'git config [<type>] --get gitweb.<key>' once for each config variable, call 'git config -z -l' only once, parsing and saving its output to %config variable. This makes possible to add new per repository configuration without paying cost of forking once per variable checked. We can now allow repository description and repository URLs to be stored in config file without badly affecting gitweb performance. For now only configuration variables for 'gitweb' section are stored. Multiple values for single configuration variable are stored as anonymous array reference; configuration variable with no value is stored as undef. Converting configuration variable values to boolean or integer value are done in Perl. Results differ from git-config in the fact that no conversion error is ever raised. For boolean values no value, 'true' (any case) and 'false' (any case) are considered true, numbers are true if not zero; all other values (even invalid for bool) are considered false. For integer values value suffix of 'k', 'm', or 'g' following decimal number will cause the value to be multiplied by 1024, 1048576, or 1073741824; other values are returned as-is, only whitespace stripped. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03gitweb: Add tests for overriding gitweb config with repo configJakub Narebski
Make blame view and snapshot support overridable by repository config. Test tree view with both features disabled, and with both features enabled. Test with features enabled also tests multiple formats snapshot support (in tree view). Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03test format-patch -s: make sure MIME content type is shown as neededJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-03cherry-pick/revert -m: add testsJunio C Hamano
This adds a new test to check cherry-pick/revert of a merge commit. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02Merge branch 'maint'Junio C Hamano
* maint: Fixing path quoting in git-rebase Remove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites. Documentation: quote commit messages consistently. Remove escaping of '|' in manpage option sections
2007-11-02Merge branch 'ph/parseopt'Junio C Hamano
* ph/parseopt: (24 commits) gc: use parse_options Fixed a command line option type for builtin-fsck.c Make builtin-pack-refs.c use parse_options. Make builtin-name-rev.c use parse_options. Make builtin-count-objects.c use parse_options. Make builtin-fsck.c use parse_options. Update manpages to reflect new short and long option aliases Make builtin-for-each-ref.c use parse-opts. Make builtin-symbolic-ref.c use parse_options. Make builtin-update-ref.c use parse_options Make builtin-revert.c use parse_options. Make builtin-describe.c use parse_options Make builtin-branch.c use parse_options. Make builtin-mv.c use parse-options Make builtin-rm.c use parse_options. Port builtin-add.c to use the new option parser. parse-options: allow callbacks to take no arguments at all. parse-options: Allow abbreviated options when unambiguous Add shortcuts for very often used options. parse-options: make some arguments optional, add callbacks. ... Conflicts: Makefile builtin-add.c
2007-11-02Merge branch 'np/progress'Junio C Hamano
* np/progress: Show total transferred as part of throughput progress make sure throughput display gets updated even if progress doesn't move return the prune-packed progress display to the inner loop add throughput display to git-push add some copyright notice to the progress display code add throughput display to index-pack add throughput to progress display relax usage of the progress API make struct progress an opaque type prune-packed: don't call display_progress() for every file Stop displaying "Pack pack-$ID created." during git-gc Teach prune-packed to use the standard progress meter Change 'Deltifying objects' to 'Compressing objects' fix for more minor memory leaks fix const issues with some functions pack-objects.c: fix some global variable abuse and memory leaks pack-objects: no delta possible with only one object in the list cope with multiple line breaks within sideband progress messages more compact progress display
2007-11-02Fixing path quoting in git-rebaseJonathan del Strother
git-rebase used to fail when run from a path containing a space. Signed-off-by: Jonathan del Strother <jon.delStrother@bestbefore.tv> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-11-02Merge branch 'br/gccfix'Junio C Hamano
* br/gccfix: transport.c: squelch a gcc 4.0.1 complaint about an uninitialized variable
2007-11-02Merge branch 'gp/maint-diffdoc'Junio C Hamano
* gp/maint-diffdoc: git-diff.txt: add section "output format" describing the diff formats
2007-11-02Merge branch 'bk/maint-cvsexportcommit' into maintJunio C Hamano
* bk/maint-cvsexportcommit: cvsexportcommit: fix for commits that do not have parents
2007-11-02Remove unecessary hard-coding of EDITOR=':' VISUAL=':' in some test suites.Kristian Høgsberg
They are already set and exoprted by sourcing ./test-lib.sh in all test scripts. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02Documentation: quote commit messages consistently.Sergei Organov
Documentation quotes commit messages 14 times with double-quotes, and 7 times with single-quotes. The patch turns everything to double-quotes. A nice side effect is that documentation becomes more Windoze-friendly as AFAIK single quotes won't work there. Signed-off-by: Sergei Organov <osv@javad.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>