aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* sh-setup: don't let eval output to be shell-expanded.Pierre Habouzit2007-11-08
| | | | | | The previous patch missed the same construct in git-clone. Signed-off-by: Pierre Habouzit <madcoder@debian.org>
* git-sh-setup: fix parseopt `eval` string underquotingJunio C Hamano2007-11-07
| | | | | | | | | | The 'automagic parseopt' support corrupted non option parameters that had IFS characters in them. The worst case is when it had a non option parameter like this: $1=" * some string" Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Give git-am back the ability to add Signed-off-by lines.Johannes Sixt2007-11-06
| | | | | | | | This was lost in the migration to git-rev-parse --parseopt by commit 78443d90491c1b82afdffc3d5d2ab8c1a58928b5. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* git-rev-parse --parseoptJunio C Hamano2007-11-06
| | | | | | | | | | The "parseopt mode" of git-rev-parse does not need to be run inside a git repository, although the normal mode does. Most notabily, lack of this fix breaks git-clone script, as noticed by Nico. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* scripts: Add placeholders for OPTIONS_SPECJunio C Hamano2007-11-06
| | | | | | | | | --text follows this line-- These commands currently lack OPTIONS_SPEC; allow people to easily list with "git grep 'OPTIONS_SPEC=$'" what they can help improving. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-repack.sh to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-quiltimport.sh to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-checkout.sh to use git-rev-parse --parseopt --keep-dashdashPierre Habouzit2007-11-05
| | | | | | Also fix some space versus tabs issues. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-instaweb.sh to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-merge.sh to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-am.sh to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-clone to use git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Migrate git-clean.sh to use git-rev-parse --parseopt.Pierre Habouzit2007-11-05
| | | | | | | 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>
* Update git-sh-setup(1) to allow transparent use of git-rev-parse --parseoptPierre Habouzit2007-11-05
| | | | | | | | | | | | | | | 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>
* Add a parseopt mode to git-rev-parse to bring parse-options to shell scripts.Pierre Habouzit2007-11-05
| | | | | Signed-off-by: Pierre Habouzit <madcoder@debian.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2007-11-05
|\ | | | | | | | | | | | | | | | | * 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
| * Remove a couple of duplicated includeMarco Costalba2007-11-05
| | | | | | | | | | Signed-off-by: Marco Costalba <mcostalba@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * grep with unmerged indexJunio C Hamano2007-11-05
| | | | | | | | | | | | | | | | | | 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>
| * Merge branch 'gp/maint-diffdoc' into maintJunio C Hamano2007-11-05
| |\ | | | | | | | | | | | | * gp/maint-diffdoc: git-diff.txt: add section "output format" describing the diff formats
| * | git-daemon: fix remote port number in log entryGerrit Pape2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | git-svn: t9114: verify merge commit message in testEric Wong2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | git-svn: fix dcommit clobbering when committing a series of diffsEric Wong2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix comment in strbuf.h to use correct name strbuf_avail()Steffen Prohaska2007-11-05
| | | | | | | | | | | | | | | Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Some better parse-options documentation.Pierre Habouzit2007-11-05
| | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | gc: --prune prunes unreferenced objects.Junio C Hamano2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | t3502: Disambiguate between file and rev by adding --Brian Gernhardt2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add more tests for git-cleanShawn Bohrer2007-11-05
| | | | | | | | | | | | | | | Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Use parseopts in builtin-pushDaniel Barkalow2007-11-05
| | | | | | | | | | | | | | | Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Split off the pretty print stuff into its own fileJohannes Schindelin2007-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix an infinite loop in sq_quote_buf().Johannes Sixt2007-11-04
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'jc/format-patch-encoding'Junio C Hamano2007-11-04
|\ \ \ | | | | | | | | | | | | | | | | | | | | * 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
| * | | test format-patch -s: make sure MIME content type is shown as neededJunio C Hamano2007-11-02
| | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | format-patch -s: add MIME encoding header if signer's name requires soJunio C Hamano2007-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the body of the commit log message contains a non-ASCII character, format-patch correctly emitted the encoding header to mark the resulting message as such. However, if the original message was fully ASCII, the command line switch "-s" was given to add a new sign-off, and the signer's name was not ASCII only, the resulting message would have contained non-ASCII character but was not marked as such. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/revert-merge'Junio C Hamano2007-11-04
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/revert-merge: cherry-pick/revert -m: add tests revert/cherry-pick: work on merge commits as well Conflicts: builtin-revert.c
| * | | | cherry-pick/revert -m: add testsJunio C Hamano2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new test to check cherry-pick/revert of a merge commit. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | revert/cherry-pick: work on merge commits as wellJunio C Hamano2007-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually you cannot revert a merge because you do not know which side of the merge should be considered the mainline (iow, what change to reverse). With this patch, cherry-pick and revert learn -m (--mainline) option that lets you specify the parent number (starting from 1) of the mainline, so that you can: git revert -m 1 $merge to reverse the changes introduced by the $merge commit relative to its first parent, and: git cherry-pick -m 2 $merge to replay the changes introduced by the $merge commit relative to its second parent. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'ss/mailsplit'Junio C Hamano2007-11-04
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * ss/mailsplit: Make mailsplit and mailinfo strip whitespace from the start of the input
| * | | | | Make mailsplit and mailinfo strip whitespace from the start of the inputSimon Sasburg2007-11-02
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'np/pack'Junio C Hamano2007-11-04
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * np/pack: pack-objects: get rid of an ugly cast make the pack index version configurable Conflicts: builtin-pack-objects.c
| * | | | | pack-objects: get rid of an ugly castNicolas Pitre2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... when calling write_idx_file(). Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | make the pack index version configurableNicolas Pitre2007-11-02
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is a good idea to use pack index version 2 all the time since it has proper protection against propagation of certain pack corruptions when repacking which is not possible with index version 1, as demonstrated in test t5302. Hence this config option. The default is still pack index version 1. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jn/gitweb'Junio C Hamano2007-11-04
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | | | | gitweb: Use config file for repository description and URLsJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | gitweb: Read repo config using 'git config -z -l'Jakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | gitweb: Add tests for overriding gitweb config with repo configJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | gitweb: Use href(-replay=>1, action=>...) to generate alternate viewsJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use href(action=>..., -replay=>1) to generate links to alternate views of current page in the $formats_nav (bottom) part of page_nav navigation bar. This form is used only when all parameters are repeated, and when the replay form is shorter. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | gitweb: Use href(-replay=>1, page=>...) to generate pagination linksJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use href(-replay=>1, page=>$page-1) and href(-replay=>1, page=>$page+1) to generate previous page and next page links. Generate next page link only once. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | gitweb: Easier adding/changing parameters to current URLJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add boolean option '-replay' to href() subroutine, which is used to generate links in gitweb. This option "replays" current URL, overriding it with provided parameters. It means that current value of each CGI parameter is used unless otherwise provided. This change is meant to make it easier to generate links which differ from current page URL only by one parameter, for example the same view but sorted by different column: href(-replay=>1, order=>"age") or view which differs by some option, e.g. in log views href(-replay=>1, extra_options=>"--no-merges") or alternate view of the same object, e.g. in the 'blob' view href(-replay=>1, action=>"blob_plain") Actual use of this functionality is left for later. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | gitweb: Remove CGI::Carp::set_programname() call from t9500 gitweb testJakub Narebski2007-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It does appear to do nothing; gitweb is run as standalone program and not as CGI script in this test. This call caused problems later. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | gitweb: Add 'status_str' to parse_difftree_raw_line outputJakub Narebski2007-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'status_str' to diffinfo output, which stores status (also for merge commit) as a string. This allows for easy checking if there is given status among all for merge commit, e.g. $diffinfo->{'status_str'} =~ /D/; Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>