aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Merge branch 'sp/refspec-match'Junio C Hamano2007-12-04
|\ | | | | | | | | | | | | | | * sp/refspec-match: refactor fetch's ref matching to use refname_match() push: use same rules as git-rev-parse to resolve refspecs add refname_match() push: support pushing HEAD to real branch name
| * refactor fetch's ref matching to use refname_match()Steffen Prohaska2007-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old rules used by fetch were coded as a series of ifs. The old rules are: 1) match full refname if it starts with "refs/" or matches "HEAD" 2) verify that full refname starts with "refs/" 3) match abbreviated name in "refs/" if it starts with "heads/", "tags/", or "remotes/". 4) match abbreviated name in "refs/heads/" This is replaced by the new rules a) match full refname b) match abbreviated name prefixed with "refs/" c) match abbreviated name prefixed with "refs/heads/" The details of the new rules are different from the old rules. We no longer verify that the full refname starts with "refs/". The new rule (a) matches any full string. The old rules (1) and (2) were stricter. Now, the caller is responsible for using sensible full refnames. This should be the case for the current code. The new rule (b) is less strict than old rule (3). The new rule accepts abbreviated names that start with a non-standard prefix below "refs/". Despite this modifications the new rules should handle all cases as expected. Two tests are added to verify that fetch does not resolve short tags or HEAD in remotes. We may even think about loosening the rules a bit more and unify them with the rev-parse rules. This would be done by replacing ref_ref_fetch_rules with ref_ref_parse_rules. Note, the two new test would break. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * push: use same rules as git-rev-parse to resolve refspecsSteffen Prohaska2007-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the rules for resolving refspecs to match the rules for resolving refs in rev-parse. git-rev-parse uses clear rules to resolve a short ref to its full name, which are well documented. The rules for resolving refspecs documented in git-send-pack were less strict and harder to understand. This commit replaces them by the rules of git-rev-parse. The unified rules are easier to understand and better resolve ambiguous cases. You can now push from a repository containing several branches ending on the same short name. Note, this may break existing setups. For example, "master" will no longer resolve to "origin/master" even when there is no other "master" elsewhere. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * add refname_match()Steffen Prohaska2007-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use at least two rulesets for matching abbreviated refnames with full refnames (starting with 'refs/'). git-rev-parse and git-fetch use slightly different rules. This commit introduces a new function refname_match (const char *abbrev_name, const char *full_name, const char **rules). abbrev_name is expanded using the rules and matched against full_name. If a match is found the function returns true. rules is a NULL-terminate list of format patterns with "%.*s", for example: const char *ref_rev_parse_rules[] = { "%.*s", "refs/%.*s", "refs/tags/%.*s", "refs/heads/%.*s", "refs/remotes/%.*s", "refs/remotes/%.*s/HEAD", NULL }; Asterisks are included in the format strings because this is the form required in sha1_name.c. Sharing the list with the functions there is a good idea to avoid duplicating the rules. Hopefully this facilitates unified matching rules in the future. This commit makes the rules used by rev-parse for resolving refs to sha1s available for string comparison. Before this change, the rules were buried in get_sha1*() and dwim_ref(). A follow-up commit will refactor the rules used by fetch. refname_match() will be used for matching refspecs in git-send-pack. Thanks to Daniel Barkalow <barkalow@iabervon.org> for pointing out that ref_matches_abbrev in remote.c solves a similar problem and care should be taken to avoid confusion. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * push: support pushing HEAD to real branch nameSteffen Prohaska2007-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This teaches "push <remote> HEAD" to resolve HEAD on the local side to its real branch name, e.g. master, and then act as if the real branch name was specified. So we have a shorthand for pushing the current branch. Besides HEAD, no other symbolic ref is resolved. Thanks to Daniel Barkalow <barkalow@iabervon.org> for suggesting this implementation, which is much simpler than the implementation proposed before. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Simplify crud() in ident.cAlex Riesen2007-12-04
| | | | | | | | | | Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Do not rely on the exit status of "unset" for unset variablesH.Merijn Brand2007-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX says that exit status "0" means that "unset" successfully unset the variable. However, it is kind of ambiguous if an environment variable which was not set could be successfully unset. At least the default shell on HP-UX insists on reporting an error in such a case, so just ignore the exit status of "unset". [Dscho: extended the patch to git-submodule.sh, as Junio realized that this is the only other place where we check the exit status of "unset".] Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | gitweb: use Perl built-in utf8 function for UTF-8 decoding.İsmail Dönmez2007-12-04
| | | | | | | | | | | | Signed-off-by: İsmail Dönmez <ismail@pardus.org.tr> Tested-by: Martin Koegler <mkoegler@auto.tuwien.ac.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | t9600: require cvsps 2.1 to perform testsJeff King2007-12-04
| | | | | | | | | | | | | | | | | | | | git-cvsimport won't run at all with less than cvsps 2.1, because it lacks the -A flag. But there's no point in preventing people who have an old cvsps from running the full testsuite. Tested-by: A Large Angry SCM <gitzilla@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | contrib: Make remotes2config.sh script more robustJakub Narebski2007-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remotes2config.sh script replaced all 'unsafe' characters in repo name with '.'; include '-' in the 'safe' characters set (the set is probably even larger). Script required also space after "URL:", "Push:" and "Pull:" in remotes file. This for example made the following remote URL: git://git.kernel.org/pub/scm/git/git.git Pull: refs/heads/master:refs/heads/origin Pull:+refs/heads/pu:refs/heads/pu miss 'pu' branch (forced branch) in config file after conversion. Allow for any number of whitespace after "URL:", "Push:", "Pull:". Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Use a strbuf for copying the command line for the reflog.Kristian Høgsberg2007-12-04
| | | | | | | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation/git.txt: typofixJunio C Hamano2007-12-04
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation: rerere is enabled by default these days.Junio C Hamano2007-12-04
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Formatting fix for Documentation/git-help.txtJunio C Hamano2007-12-04
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Update draft release notes for 1.5.4Junio C Hamano2007-12-03
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Allow ':/<oneline-prefix>' syntax to work with save_commit_buffer == 0Johannes Schindelin2007-12-03
| | | | | | | | | | | | | | | | | | Earlier, ':/<oneline-prefix>' would not work (i.e. die) with commands that set save_commit_buffer = 0, such as blame, describe, pack-objects, reflog and bundle. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add git-fast-export to list of commands.Junio C Hamano2007-12-03
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | fast-export: rename the signed tag mode 'ignore' to 'verbatim'Johannes Schindelin2007-12-03
| | | | | | | | | | | | | | | | | | The name 'verbatim' describes much better what this mode does with signed tags. While at it, fix the documentation what it actually does. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Add remote.<name>.proxySam Vilain2007-12-03
| | | | | | | | | | | | | | | | As well as allowing a default http.proxy option, allow it to be set per-remote. Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Allow HTTP proxy to be overridden in configSam Vilain2007-12-03
| | | | | | | | | | | | | | | | The http_proxy / HTTPS_PROXY variables used by curl to control proxying may not be suitable for git. Allow the user to override them in the configuration file. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Trace and quote with argv: get rid of unneeded count argument.Christian Couder2007-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that str_buf takes care of all the allocations, there is no more gain to pass an argument count. So this patch removes the "count" argument from: - "sq_quote_argv" - "trace_argv_printf" and all the callers. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | install-sh from automake does not like -m without delimiting spaceRobert Schiele2007-12-03
| | | | | | | | | | | | | | | | | | | | The install-sh script as shipped with automake requires a space between the -m switch and its argument. Since this is also the regular way of doing it with other install implementations this change inserts the missing space in all makefiles. Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Documentation: add a new man page for "git-help"Christian Couder2007-12-03
| | | | | | | | | | Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit documentation: fix unfinished sentence.Junio C Hamano2007-12-03
| | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit --allow-emptyJunio C Hamano2007-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It does not usually make sense to record a commit that has the exact same tree as its sole parent commit and that is why git-commit prevents you from making such a mistake, but when data from foreign scm is involved, it is a different story. We are equipped to represent such an (perhaps insane, perhaps by mistake, or perhaps done on purpose) empty change, and it is better to represent it bypassing the safety valve for native use. This is primarily for use by foreign scm interface scripts. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git-commit: Allow to amend a merge commit that does not change the treeJohannes Sixt2007-12-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, it should not be allowed to generate an empty commit. A merge commit generated with git 'merge -s ours' does not change the tree (along the first parent), but merges are not "empty" even if they do not change the tree. Hence, commit 8588452ceb7 allowed to amend a merge commit that does not change the tree, but 4fb5fd5d301 disallowed it again in an attempt to avoid that an existing commit is amended such that it becomes empty. With this change, a commit can be edited (create a new one or amend an existing one) either if there are changes or if there are at least two parents. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/prune-expire'Junio C Hamano2007-12-02
|\ \ | | | | | | | | | | | | * js/prune-expire: Add "--expire <time>" option to 'git prune'
| * | Add "--expire <time>" option to 'git prune'Johannes Schindelin2007-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier, 'git prune' would prune all loose unreachable objects. This could be quite dangerous, as the objects could be used in an ongoing operation. This patch adds a mode to expire only loose, unreachable objects which are older than a certain time. For example, by git prune --expire 14.days you can prune only those objects which are loose, unreachable and older than 14 days (and thus probably outdated). The implementation uses st.st_mtime rather than st.st_ctime, because it can be tested better, using 'touch -d <time>' (and omitting the test when the platform does not support that command line switch). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'js/export-with-assignment'Junio C Hamano2007-12-02
|\ \ \ | | | | | | | | | | | | | | | | * js/export-with-assignment: Replace instances of export VAR=VAL with VAR=VAL; export VAR
| * | | Replace instances of export VAR=VAL with VAR=VAL; export VARJohannes Schindelin2007-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It might be POSIX, but there are shells that do not like the expression 'export VAR=VAL'. To be on the safe side, rewrite them into 'VAR=VAL' and 'export VAR'. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/fast-export'Junio C Hamano2007-12-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/fast-export: Add 'git fast-export', the sister of 'git fast-import'
| * | | | Add 'git fast-export', the sister of 'git fast-import'Johannes Schindelin2007-12-02
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This program dumps (parts of) a git repository in the format that fast-import understands. For clarity's sake, it does not use the 'inline' method of specifying blobs in the commits, but builds the blobs before building the commits. Since signed tags' signatures will not necessarily be valid (think transformations after the export, or excluding revisions, changing the history), there are 4 modes to handle them: abort (default), ignore, warn and strip. The latter just turns the tags into unsigned ones. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/rebase-i-rerere'Junio C Hamano2007-12-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/rebase-i-rerere: rebase -i: give rerere a chance
| * | | | rebase -i: give rerere a chanceJohannes Schindelin2007-11-28
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like non-interactive rebase, interactive mode now calls rerere when appropriate. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'js/pull-rebase'Junio C Hamano2007-12-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * js/pull-rebase: Teach 'git pull' about --rebase
| * | | | Teach 'git pull' about --rebaseJohannes Schindelin2007-11-28
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling 'git pull' with the '--rebase' option, it performs a fetch + rebase instead of a fetch + merge. This behavior is more desirable than fetch + pull when a topic branch is ready to be submitted and needs to be update. fetch + rebase might also be considered a better workflow with shared repositories in any case, or for contributors to a centrally managed repository, such as WINE's. As a convenience, you can set the default behavior for a branch by defining the config variable branch.<name>.rebase, which is interpreted as a bool. This setting can be overridden on the command line by --rebase and --no-rebase. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'wc/rebase-insn'Junio C Hamano2007-12-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * wc/rebase-insn: Mention that git-rm can be an appropriate resolution as well as git-add. revert/cherry-pick: Allow overriding the help text by the calling Porcelain
| * | | | Mention that git-rm can be an appropriate resolution as well as git-add.David Symonds2007-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Especially when using git-cherry-pick, removing files that are unmerged can be a logical action. This patch merely changes the informative text to be less confusing. Signed-off-by: David Symonds <dsymonds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | revert/cherry-pick: Allow overriding the help text by the calling PorcelainWincent Colaiuta2007-11-30
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Porcelain command that uses cherry-pick or revert may make a commit out of resolved index itself, in which case telling the user to commit the result is not appropriate at all. This allows GIT_CHERRY_PICK_HELP environment variable to be set by the calling Porcelain in order to override the built-in help text. [jc: this is heavily modified from the original but should be equivalent in spirit] Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'jc/typebreak'Junio C Hamano2007-12-02
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | * jc/typebreak: Enable rewrite as well as rename detection in git-status rename: Break filepairs with different types.
| * | | | Enable rewrite as well as rename detection in git-statusJeff King2007-12-02
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | rename: Break filepairs with different types.Junio C Hamano2007-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we consider if a path has been totally rewritten, we did not touch changes from symlinks to files or vice versa. But a change that modifies even the type of a blob surely should count as a complete rewrite. While we are at it, modernise diffcore-break to be aware of gitlinks (we do not want to touch them). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'jc/color'Junio C Hamano2007-12-02
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jc/color: git-config --get-color: get configured color "color.diff = true" is not "always" anymore.
| * | | | | git-config --get-color: get configured colorJunio C Hamano2007-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new option allows scripts to grab color setting from the user configuration, translated to ANSI color escape sequence. Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | "color.diff = true" is not "always" anymore.Junio C Hamano2007-11-28
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Too many people got burned by setting color.diff and color.status to true when they really should have set it to "auto". This makes only "always" to do the unconditional colorization, and change the meaning of "true" to the same as "auto": colorize only when we are talking to a terminal. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'dc/gitweb'Junio C Hamano2007-12-02
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * dc/gitweb: gitweb: the commitdiff is very commonly used, it's needed on search page, too
| * | | | | gitweb: the commitdiff is very commonly used, it's needed on search page, tooDenis Cheng2007-12-02
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Acked-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | gitweb: Update and improve gitweb/README fileJakub Narebski2007-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update list of build configuration variables, add references to gitweb/INSTALL, add description of runtime and per-repository runtime configuration. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | git-stash: Display help message if git-stash is run with wrong sub-commandsKevin Leung2007-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current git-stash behaviour is very error prone to typos. For example, if you typed "git-stash llist", git-stash would think that you wanted to save to a stash named "llist", but in fact, you meant "git-stash list". Signed-off-by: Kevin Leung <kevinlsk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | git-am: catch missing author date early.Junio C Hamano2007-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though commit-tree would default to the current time if the incoming e-mail message somehow did not record the timestamp, it is safer to catch the breakage sooner. Signed-off-by: Junio C Hamano <gitster@pobox.com>