aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* textconv: support for cat_fileClément Poulain2010-06-18
| | | | | | | | | | | | | Make the textconv_object function public, and add --textconv option to cat-file to perform conversion on blob objects. Using --textconv implies that we are working on a blob. As files drivers need to be initialized, a new config is required in addition to git_default_config. Therefore git_cat_file_config() is introduced Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* sha1_name: add get_sha1_with_context()Clément Poulain2010-06-18
| | | | | | | | | | | Textconv is defined by the diff driver, which is associated with a pathname, not a blob. This fonction permits to know the context for the sha1 you're looking for, especially his pathname Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* t/t8006: test textconv support for blameAxel Bonnet2010-06-18
| | | | | | | | | | Test the correct functionning of textconv with blame <file> and blame HEAD^ <file>. Test the case when no driver is specified. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* textconv: support for blameAxel Bonnet2010-06-18
| | | | | | | | | | | | | | | | | | | | | This patches enables to perform textconv with blame if a textconv driver is available fos the file. The main task is performed by the textconv_object function which prepares diff_filespec and if possible converts the file using diff textconv API. Only regular files are converted, so the mode of diff_filespec is faked. Textconv conversion is enabled by default (equivalent to the option --textconv), since blaming binary files is useless in most cases. The option --no-textconv is used to disable textconv conversion. The declarations of several functions are modified to give access to a diff_options, in order to know whether the textconv option is activated or not. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* textconv: make the API publicAxel Bonnet2010-06-11
| | | | | | | | | | | The textconv functionality allows one to convert a file into text before running diff. But this functionality can be useful to other features such as blame. Signed-off-by: Axel Bonnet <axel.bonnet@ensimag.imag.fr> Signed-off-by: Clément Poulain <clement.poulain@ensimag.imag.fr> Signed-off-by: Diane Gasselin <diane.gasselin@ensimag.imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2010-06-07
|\ | | | | | | | | * maint: Change C99 comments to old-style C comments
| * Change C99 comments to old-style C commentsTor Arntsen2010-06-07
| | | | | | | | | | Signed-off-by: Tor Arntsen <tor@spacetec.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2010-06-07
|\ \ | |/ | | | | | | * maint: commit.txt: clarify how --author argument is used
| * commit.txt: clarify how --author argument is usedJay Soffian2010-06-06
| | | | | | | | | | | | | | | | | | commit --author was added by 146ea06 (git commit --author=$name: look $name up in existing commits), but its documentation was sorely lacking compared to its excellent commit message. This commit tries to improve the documentation. Signed-off-by: Jay Soffian <jaysoffian@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2010-06-06
|\ \ | |/ | | | | | | * maint: setup: document prefix
| * setup: document prefixClemens Buchacher2010-06-05
| | | | | | | | | | Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | git svn: fix empty directory creationMichael J. Kiwala2010-06-03
| | | | | | | | | | | | | | | | | | | | | | | | Avoid attempts to stat() the contents of '', which could happen when the root directory is empty. Additionally, remove the unnecessary '_' stat optimization since it was confusing and possibly throwing off the non-existent case. [ew: fixed indentation, rewrote commit message] Acked-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Michael J. Kiwala <mkiwala@genome.wustl.edu>
* | Merge branch 'maint'Junio C Hamano2010-06-02
|\ \ | |/ | | | | | | | | | | * maint: git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIX Documentation: A...B shortcut for checkout and rebase Documentation/pretty-{formats,options}: better reference for "format:<string>"
| * git-compat-util.h: use apparently more common __sgi macro to detect SGI IRIXGary V. Vaughan2010-06-02
| | | | | | | | | | | | | | | | | | | | | | IRIX 6.5.26m does not define the 'sgi' macro, but it does define an '__sgi' macro. Since later IRIX versions (6.5.29m) define both macros, and since an underscore prefixed macro is preferred anyway, use '__sgi' to detect compilation on SGI IRIX. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation: A...B shortcut for checkout and rebaseMichael J Gruber2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | Describe the A...B shortcuts for checkout and rebase [-i] which were introduced in these commits: 619a64e ("checkout A...B" switches to the merge base between A and B, 2009-10-18) 61dfa1b ("rebase --onto A...B" replays history on the merge base between A and B, 2009-11-20) 230a456 (rebase -i: teach --onto A...B syntax, 2010-01-07) Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Documentation/pretty-{formats,options}: better reference for "format:<string>"Nazri Ramliy2010-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | In "git help log" (and friends) it's not easy to find the possible placeholder for <string> for the "--pretty=format:<string>" option to git log. This patch makes the placeholder easier to find by adding a reference to the "PRETTY FORMATS" section and repeating the "format:<string>" phrase. Signed-off-by: Nazri Ramliy <ayiehere@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'maint'Junio C Hamano2010-05-31
|\ \ | |/ | | | | | | | | * maint: Documentation/SubmittingPatches: Fix typo in GMail section Documentation/config: describe status.submodulesummary
| * Merge branch 'maint-1.7.0' into maintJunio C Hamano2010-05-31
| |\ | | | | | | | | | | | | * maint-1.7.0: Documentation/config: describe status.submodulesummary
| | * Documentation/config: describe status.submodulesummaryMichael J Gruber2010-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ac8d5af (builtin-status: submodule summary support, 2008-04-12) intoduced this variable and described it in git-status[1]. Include this description in git-config[1], as well. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | Documentation/SubmittingPatches: Fix typo in GMail sectionTim Henigan2010-05-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e498257d introduced a typo while improving the GMail section of SubmittingPatches. Signed-off-by: Tim Henigan <tim.henigan@gmail.com> Acked-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2010-05-28
|\ \ \ | |/ / | | | | | | | | | | | | | | | * maint: Makefile: reenable install with NO_CURL completion: --set-upstream option for git-branch get_cwd_relative(): do not misinterpret suffix as subdirectory
| * | Merge branch 'maint-1.7.0' into maintJunio C Hamano2010-05-28
| |\ \ | | |/ | | | | | | | | | * maint-1.7.0: Makefile: reenable install with NO_CURL
| | * Makefile: reenable install with NO_CURLMichael J Gruber2010-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting NO_CURL leaves some variables like REMOTE_CURL_ALIASES empty, which creates no fun when for-looping over $(REMOTE_CURL_ALIASES) unconditionally. Make it conditional. Reported-by: Paul Walker <PWalker752@aol.com> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | completion: --set-upstream option for git-branchMichael J Gruber2010-05-28
| | | | | | | | | | | | | | | Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | get_cwd_relative(): do not misinterpret suffix as subdirectoryClemens Buchacher2010-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the current working directory is the same as the work tree path plus a suffix, e.g. 'work' and 'work-xyz', then the suffix '-xyz' would be interpreted as a subdirectory of 'work'. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'maint'Junio C Hamano2010-05-25
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * maint: Documentation/SubmittingPatches: clarify GMail section and SMTP show-branch: use DEFAULT_ABBREV instead of 7 t7502-commit: fix spelling test get_git_work_tree() return value for NULL
| * | Documentation/SubmittingPatches: clarify GMail section and SMTPMichael J Gruber2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We keep getting mangled submissions from GMail's web interface. Try to be more proactive in SubmittingPatches by - pointing to MUA specific instructions early on, - structuring the GMail section more clearly, - putting send-email/SMTP before imap-send/IMAP. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | show-branch: use DEFAULT_ABBREV instead of 7Tay Ray Chuan2010-05-25
| | | | | | | | | | | | | | | Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | t7502-commit: fix spellingTay Ray Chuan2010-05-25
| | | | | | | | | | | | | | | | | | | | | s/subdirecotry/subdirectory/ Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | test get_git_work_tree() return value for NULLClemens Buchacher2010-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are in a git directory, get_git_work_tree() can return NULL. While trying to determine whether or not the given paths are outside the work tree, the following command would read from it anyways and trigger a segmentation fault. git diff / / Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'by/blame-doc-m-c'Junio C Hamano2010-05-21
|\ \ \ | | | | | | | | | | | | | | | | * by/blame-doc-m-c: blame-options.txt: Add default value for `-M/-C` options.
| * | | blame-options.txt: Add default value for `-M/-C` options.Bo Yang2010-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both `-M` and `-C` have default values and the <num> argument the last `-C` option takes effect. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'by/log-follow'Junio C Hamano2010-05-21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * by/log-follow: tests: rename duplicate t4205 Make git log --follow find copies among unmodified files. Make diffcore_std only can run once before a diff_flush Add a macro DIFF_QUEUE_CLEAR.
| * | | | tests: rename duplicate t4205Jeff King2010-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Make git log --follow find copies among unmodified files.Bo Yang2010-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'git log --follow <path>' don't track copies from unmodified files, and this patch fix it. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Make diffcore_std only can run once before a diff_flushBo Yang2010-05-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When file renames/copies detection is turned on, the second diffcore_std will degrade a 'C' pair to a 'R' pair. And this may happen when we run 'git log --follow' with hard copies finding. That is, the try_to_follow_renames() will run diffcore_std to find the copies, and then 'git log' will issue another diffcore_std, which will reduce 'src->rename_used' and recognize this copy as a rename. This is not what we want. So, I think we really don't need to run diffcore_std more than one time. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | Add a macro DIFF_QUEUE_CLEAR.Bo Yang2010-05-07
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the diff_queue_struct code, this macro help to reset the structure. Signed-off-by: Bo Yang <struggleyb.nku@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | Merge branch 'mg/advice-statushints'Junio C Hamano2010-05-21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * mg/advice-statushints: wt-status: take advice.statusHints seriously t7508: test advice.statusHints Conflicts: wt-status.c
| * | | | wt-status: take advice.statusHints seriouslyMichael J Gruber2010-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, status gives a lot of hints even when advice.statusHints is false. Change this so that all hints depend on the config variable. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | t7508: test advice.statusHintsMichael J Gruber2010-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | edf563f (status: make "how to stage" messages optional, 2009-09-09) introduced advice.statusHints without tests. Add a few tests to describe and test the status quo. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | Merge branch 'cb/maint-stash-orphaned-file'Junio C Hamano2010-05-21
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cb/maint-stash-orphaned-file: stash tests: stash can lose data in a file removed from the index stash: Don't overwrite files that have gone from the index
| * | | | | stash tests: stash can lose data in a file removed from the indexCharles Bailey2010-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a file is removed from the index and then modified in the working tree then stash will discard the working tree file with no way to recover the changes. This can might be done in one of a number of ways. git rm file vi file # edit a new version git stash or with git mv git mv file newfile vi file # make a new file with the old name git stash Signed-off-by: Charles Bailey <charles@hashpling.org>
| * | | | | stash: Don't overwrite files that have gone from the indexCharles Bailey2010-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of git add -u in create_stash isn't always complete. In particular, if a file has been removed from the index but changed in the work tree it will not be added to the stash's saved work tree tree object. When stash then resets the work tree to match HEAD, any changes will be lost. To be complete, any work tree file which differs from HEAD needs to be saved, regardless of whether it still appears in the index or not. This is achieved with a combination of a diff against HEAD and a call to update-index with an explicit list of paths that have changed. Signed-off-by: Charles Bailey <charles@hashpling.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | Merge branch 'jn/maint-bundle'Junio C Hamano2010-05-21
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * jn/maint-bundle: fix "bundle --stdin" segfault t5704 (bundle): add tests for bundle --stdin
| * | | | | | fix "bundle --stdin" segfaultJonathan Nieder2010-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passed an empty list, objects_array_remove_duplicates() corrupts it by changing the number of entries from 0 to 1. The problem lies in the condition of its main loop: for (ref = 0; ref < array->nr - 1; ref++) { The loop body manipulates the supplied object array. In the case of an empty array, it should not be doing anything at all. But array->nr is an unsigned quantity, so the code enters the loop, in particular increasing array->nr. Fix this by comparing (ref + 1 < array->nr) instead. This bug can be triggered by git bundle --stdin: $ echo HEAD | git bundle create some.bundle --stdin’ Segmentation fault (core dumped) The list of commits to bundle appears to be empty because of another bug: by the time the revision-walking machinery gets to look at it, standard input has already been consumed by rev-list, so this function gets an empty list of revisions. After this patch, git bundle --stdin still does not work; it just doesn’t segfault any more. Reported-by: Joey Hess <joey@kitenet.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | t5704 (bundle): add tests for bundle --stdinJonathan Nieder2010-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as no rev-list arguments are supplied on the command line, git bundle create --stdin currently segfaults. With added rev-list arguments, it does not segfault, but the revisions from stdin are ignored. Thanks to Joey Hess <joey@kitenet.net> for the report. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | Merge branch 'pb/patch-id-plus'Junio C Hamano2010-05-21
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pb/patch-id-plus: patch-id: Add support for mbox format patch-id: extract parsing one diff out of generate_id_list
| * | | | | | | patch-id: Add support for mbox formatPaolo Bonzini2010-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have an alias that takes two arguments and compares their patch IDs. I would like to use to make sure I've tested exactly what I submit (patch by patch), like git patch-cmp origin/master.. file-being-sent However, I cannot do that because git patch-id is fooled by the "-- " trailer that git format-patch puts, or likely by the MIME boundary. This patch adds hunk parsing logic to git patch-id in order to detect an out of place "-" line and split the patch when it comes. In addition, commit ids in the "From " lines are considered and printed in the output. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | | | | | patch-id: extract parsing one diff out of generate_id_listPaolo Bonzini2010-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies a bit the next patch, since it will have more than one condition to exit the loop. Signed-off-by: Paolo Bonzini <bonzini@gnu.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | | | | | | Merge branch 'rr/doc-submitting'Junio C Hamano2010-05-21
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rr/doc-submitting: SubmittingPatches: Add new section about what to base work on