Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-26 10:53:05 +0300
committerJunio C Hamano <gitster@pobox.com>2008-01-30 08:48:57 +0300
commitbda3a31cc7982a7ef8ddb5137359d27c3c75ebed (patch)
tree513ecbeda8edf76f131ccca1cbe8296c3d694f95 /Documentation/git-rev-parse.txt
parent7720224cebde08186627ab7bdb06018905d84e30 (diff)
reflog-expire: Avoid creating new files in a directory inside readdir(3) loop
"git reflog expire --all" opened a directory in $GIT_DIR/logs/, read reflog files in there readdir(3), and rewrote the file by creating a new file and renaming it back inside the loop. This code structure can cause the newly created file to be returned by subsequent call to readdir(3), and fall into an infinite loop in the worst case. This separates the processing to two phase. Running for_each_reflog() to find out and collect all refs, and then iterate over them, calling expire_reflog(). This way, the program would behave exactly the same way as if all the refs were given by the user from the command line. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-rev-parse.txt')
0 files changed, 0 insertions, 0 deletions