summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-10-03commit: factor out clear_commit_marks_for_object_arrayRené Scharfe
Factor out the code to clear the commit marks for a whole struct object_array from builtin/checkout.c into its own exported function clear_commit_marks_for_object_array and use it in bisect and bundle as well. It handles tags and commits and ignores objects of any other type. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03checkout: use leak_pending flagRené Scharfe
Instead of going through all the references again when we clear the commit marks, do it like bisect and bundle and gain ownership of the list of pending objects which we constructed from those references. We simply copy the struct object_array that points to the list, set the flag leak_pending and then prepare_revision_walk won't destroy it and it's ours. We use it to clear the marks and free it at the end. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03bundle: use leak_pending flagRené Scharfe
Instead of creating a copy of the list of pending objects, copy the struct object_array that points to it, turn on leak_pending, and thus cause prepare_revision_walk to leave it to us. And free it once we're done. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03bisect: use leak_pending flagRené Scharfe
Instead of creating a copy of the list of pending objects, copy the struct object_array that points to it, turn on leak_pending, and thus cause prepare_revision_walk to leave it to us. And free it once we're done. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03revision: add leak_pending flagRené Scharfe
The new flag leak_pending in struct rev_info can be used to prevent prepare_revision_walk from freeing the list of pending objects. It will still forget about them, so it really is leaked. This behaviour may look weird at first, but it can be useful if the pointer to the list is saved before calling prepare_revision_walk. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03checkout: use add_pending_{object,sha1} in orphan checkRené Scharfe
Instead of building a list of textual arguments for setup_revisions, use add_pending_object and add_pending_sha1 to queue the objects directly. This is both faster and simpler. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03revision: factor out add_pending_sha1René Scharfe
This function is a combination of the static get_reference and add_pending_object. It can be used to easily queue objects by hash. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-10-03checkout: check for "Previous HEAD" notice in t2020René Scharfe
If we leave a detached head, exactly one of two things happens: either checkout warns about it being an orphan or describes it as a courtesy. Test t2020 already checked that the warning is shown as needed. This patch also checks for the description. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-26Git 1.7.6v1.7.6Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-26Merge branch 'maint'Junio C Hamano
* maint: completion: replace core.abbrevguard to core.abbrev
2011-06-24Merge branch 'maint-1.7.4' into maintJunio C Hamano
* maint-1.7.4: completion: replace core.abbrevguard to core.abbrev
2011-06-24completion: replace core.abbrevguard to core.abbrevNamhyung Kim
The core.abbrevguard config variable had removed and now core.abbrev has been used instead. Teach it. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22Git 1.7.6-rc3v1.7.6-rc3Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-22Merge branch 'maint'Junio C Hamano
* maint: Documentation: git diff --check respects core.whitespace
2011-06-22Documentation: git diff --check respects core.whitespaceChristof Krüger
Fix documentation on "git diff --check" by adopting the description from "git apply --whitespace". Signed-off-by: Christof Krüger <git@christof-krueger.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-21Merge branch 'maint'Junio C Hamano
* maint: gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabled
2011-06-21gitweb: 'pickaxe' and 'grep' features requires 'search' to be enabledJakub Narebski
Both 'pickaxe' (searching changes) and 'grep' (searching files) require basic 'search' feature to be enabled to work. Enabling e.g. only 'pickaxe' won't work. Add a comment about this. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20Merge branch 'mk/grep-pcre'Junio C Hamano
* mk/grep-pcre: t7810: avoid unportable use of "echo"
2011-06-20t7810: avoid unportable use of "echo"Junio C Hamano
Michael J Gruber noticed that under /bin/dash this test failed (as is expected -- \n in the string can be interpreted by the command), while it passed with bash. We probably could work it around by using backquote in front of it, but it is safer and more readable to avoid "echo" altogether in a case like this. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-20plug a few coverity-spotted leaksJim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-19Merge branch 'di/no-no-existant'Junio C Hamano
* di/no-no-existant: Fix typo: existant->existent
2011-06-19Merge branch 'maint'Junio C Hamano
* maint: builtin/gc.c: add missing newline in message
2011-06-19builtin/gc.c: add missing newline in messageAndreas Schwab
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-17tests: link shell libraries into valgrind directoryJeff King
When we run tests under valgrind, we symlink anything executable that starts with git-* or test-* into a special valgrind bin directory, and then make that our GIT_EXEC_PATH. However, shell libraries like git-sh-setup do not have the executable bit marked, and did not get symlinked. This means that any test looking for shell libraries in our exec-path would fail to find them, even though that is a fine thing to do when testing against a regular git build (or in a git install, for that matter). t2300 demonstrated this problem. The fix is to symlink these shell libraries directly into the valgrind directory. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-17t/Makefile: pass test opts to valgrind target properlyJeff King
The valgrind target just reinvokes make with GIT_TEST_OPTS set to "--valgrind". However, it does this using an environment variable, which means GIT_TEST_OPTS in your config.mak would override it, and "make valgrind" would simply run the test suite without valgrind on. Instead, we should pass GIT_TEST_OPTS on the command-line, overriding what's in config.mak, and take care to append to whatever the user has there already. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-17Merge branch 'ab/i18n-scripts-basic'Junio C Hamano
* ab/i18n-scripts-basic: sh-i18n--envsubst.c: do not #include getopt.h
2011-06-17sh-i18n--envsubst.c: do not #include getopt.hBrandon Casey
The getopt.h header file is not used. It's inclusion is left over from the original version of this source. Additionally, getopt.h does not exist on all platforms (SunOS 5.7) and will cause a compilation failure. So, let's remove it. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-16Fix typo: existant->existentDmitry Ivankov
refs.c had a error message "Trying to write ref with nonexistant object". And no tests relied on the wrong spelling. Also typo was present in some test scripts internals, these tests still pass. Signed-off-by: Dmitry Ivankov <divanorama@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-16Git 1.7.6-rc2v1.7.6-rc2Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-09gitweb: do not misparse nonnumeric content tag files that contain a digitJonathan Nieder
v1.7.6-rc0~27^2~4 (gitweb: Change the way "content tags" ('ctags') are handled, 2011-04-29) tried to make gitweb's tag cloud feature more intuitive for webmasters by checking whether the ctags/<label> under a project's .git dir contains a number (representing the strength of association to <label>) before treating it as one. With that change, after putting '$feature{'ctags'}{'default'} = [1];' in your $GITWEB_CONFIG, you could do echo Linux >.git/ctags/linux and gitweb would treat that as a request to tag the current repository with the Linux tag, instead of the previous behavior of writing an error page embedded in the projects list that triggers error messages from Chromium and Firefox about malformed XML. Unfortunately the pattern (\d+) used to match numbers is too loose, and the "XML declaration allowed only at the start of the document" error can still be experienced if you write "Linux-2.6" in place of "Linux" in the example above. Fix it by tightening the pattern to ^\d+$. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-09Git 1.7.6-rc1v1.7.6-rc1Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-09Merge branch 'maint'Junio C Hamano
* maint: fetch: do not leak a refspec
2011-06-09fetch: do not leak a refspecJim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-07Merge branch 'jc/magic-pathspec'Junio C Hamano
* jc/magic-pathspec: t3703: skip more tests using colons in file names on Windows
2011-06-07t3703: skip more tests using colons in file names on WindowsAlex Riesen
Use the same test and prerequisite as introduced in similar fix in 650af7ae8bdf92bd92df2. Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-06Merge branch 'jn/mime-type-with-params'Junio C Hamano
* jn/mime-type-with-params: gitweb: Fix usability of $prevent_xss
2011-06-06Merge branch 'jn/gitweb-docs'Junio C Hamano
* jn/gitweb-docs: gitweb: Move "Requirements" up in gitweb/INSTALL gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL gitweb: Move information about installation from README to INSTALL
2011-06-06Merge branch 'jk/diff-not-so-quick'Junio C Hamano
* jk/diff-not-so-quick: diff: futureproof "stop feeding the backend early" logic diff_tree: disable QUICK optimization with diff filter Conflicts: diff.c
2011-06-06Merge branch 'bc/maint-status-z-to-use-porcelain'Junio C Hamano
* bc/maint-status-z-to-use-porcelain: builtin/commit.c: set status_format _after_ option parsing t7508: demonstrate status's failure to use --porcelain format with -z Conflicts: builtin/commit.c
2011-06-05gitweb: Fix usability of $prevent_xssJakub Narebski
With XSS prevention on (enabled using $prevent_xss), blobs ('blob_plain') of all types except a few known safe ones are served with "Content-Disposition: attachment". However the check was too strict; it didn't take into account optional parameter attributes, media-type = type "/" subtype *( ";" parameter ) as described in RFC 2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 This fixes that, and it for example treats following as safe MIME media type: text/plain; charset=utf-8 Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-03gitweb: Move "Requirements" up in gitweb/INSTALLJakub Narebski
This way you can examine prerequisites at first glance, before detailed instructions on installing gitweb. Straightforward text movement. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALLJakub Narebski
The build-time configuration variables JSMIN and CSSMIN were mentioned only in Makefile; add their description to gitweb/INSTALL. This required moving description of GITWEB_JS up, near GITWEB_CSS and just introduced CSMIN and JSMIN. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-02gitweb: Move information about installation from README to INSTALLJakub Narebski
Almost straightformard moving of "How to configure gitweb for your local system" section from gitweb/README to gitweb/INSTALL, as it is about build time configuration. Updated references to it. Signed-off-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01Sync with 1.7.5.4v1.7.6-rc0Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01Git 1.7.5.4v1.7.5.4Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2011-06-01Merge branch 'jk/maint-config-alias-fix' into maintJunio C Hamano
* jk/maint-config-alias-fix: handle_options(): do not miscount how many arguments were used config: always parse GIT_CONFIG_PARAMETERS during git_config git_config: don't peek at global config_parameters config: make environment parsing routines static
2011-06-01Merge branch 'jc/fmt-req-fix' into maintJunio C Hamano
* jc/fmt-req-fix: userformat_find_requirements(): find requirement for the correct format
2011-06-01Merge branch 'jk/maint-docs' into maintJunio C Hamano
* jk/maint-docs: docs: fix some antique example output docs: make sure literal "->" isn't converted to arrow docs: update status --porcelain format docs: minor grammar fixes to git-status
2011-06-01Merge branch 'jn/doc-remote-helpers' into maintJunio C Hamano
* jn/doc-remote-helpers: Documentation: do not misinterpret refspecs as bold text
2011-06-01Merge branch 'kk/maint-prefix-in-config-mak' into maintJunio C Hamano
* kk/maint-prefix-in-config-mak: config.mak.in: allow "configure --sysconfdir=/else/where"