summaryrefslogtreecommitdiff
path: root/test-subprocess.c
Commit message (Collapse)AuthorAgeFilesLines
* test-subprocess: fix segfault without argumentsRené Scharfe2012-04-101-3/+3
| | | | | | | | | | | Check if we even have a parameter before checking its value. Running this command without any arguments may not make a lot of sense, but reacting with a segmentation fault is unduly harsh. While we're at it, avoid casting argv by declaring it const right away. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Remove unused variablesJohannes Schindelin2011-03-221-2/+1
| | | | | | | Noticed by gcc 4.6.0. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* setup_work_tree: adjust relative $GIT_WORK_TREE after moving cwdNguyễn Thái Ngọc Duy2010-12-271-0/+21
When setup_work_tree() is called, it moves cwd to $GIT_WORK_TREE and makes internal copy of $GIT_WORK_TREE absolute. The environt variable, if set by user, remains unchanged. If the variable is relative, it is no longer correct because its base dir has changed. Instead of making $GIT_WORK_TREE absolute too, we just say "." and let subsequent git processes handle it. Reported-by: Michel Briand <michelbriand@free.fr> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>